Skip to content

Commit

Permalink
Remove all wire2 code
Browse files Browse the repository at this point in the history
  • Loading branch information
supermario committed Jan 3, 2024
1 parent 5abef42 commit 563f43e
Show file tree
Hide file tree
Showing 13 changed files with 3 additions and 3,348 deletions.
9 changes: 1 addition & 8 deletions compiler/src/Compile.hs
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,6 @@ import qualified Type.Solve as Type

-- import System.IO.Unsafe (unsafePerformIO)


-- @DEPRECATED for alpha12 release migration only
import qualified Lamdera.Wire2.Core
import qualified Lamdera.Wire2.Interfaces

import qualified Lamdera.Wire3.Core
import qualified Lamdera.Wire3.Interfaces
import qualified Lamdera.Wire3.Helpers as Lamdera.Wire
Expand Down Expand Up @@ -67,16 +62,14 @@ compile pkg ifaces modul = do
let modul_ =
modul
& Lamdera.Wire3.Interfaces.modifyModul pkg ifaces
-- & Lamdera.Wire2.Interfaces.modifyModul pkg ifaces
-- moduleName = T.pack $ Data.Utf8.toChars $ Src.getName modul

-- () <- debugPassText "starting canonical" "" (pure ())
canonical0 <- canonicalize pkg ifaces modul_
-- () <- debugPassText "starting canonical2" moduleName (pure ())

-- Add Canonical Wire gens, i.e. the `w2_[en|de]code_TYPENAME` functions
-- Add Canonical Wire gens, i.e. the `w3_[en|de]code_TYPENAME` functions
canonical2 <- Lamdera.Wire3.Core.addWireGenerations canonical0 pkg ifaces modul_
-- canonical2 <- Lamdera.Wire2.Core.addWireGenerations canonical1 pkg ifaces modul_

-- () <- unsafePerformIO $ do
-- case (pkg, Src.getName modul) of
Expand Down
9 changes: 1 addition & 8 deletions elm.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -264,12 +264,6 @@ Executable lamdera
Lamdera.Types
Lamdera.Update
Lamdera.Version
Lamdera.Wire2.Core
Lamdera.Wire2.Decoder
Lamdera.Wire2.Encoder
Lamdera.Wire2.Graph
Lamdera.Wire2.Helpers
Lamdera.Wire2.Interfaces
Lamdera.Wire3.Core
Lamdera.Wire3.Decoder
Lamdera.Wire3.Encoder
Expand Down Expand Up @@ -298,8 +292,7 @@ Executable lamdera

-- Lamdera Legacy --
Lamdera.Legacy
-- Wire.Source
-- Wire.Source2
-- Wire.Source3

-- Fusion
-- Fusion.Types
Expand Down
3 changes: 0 additions & 3 deletions extra/Lamdera/Evergreen/MigrationHarness.hs
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@ decodeAndUpgradeFor migrationSequence nextVersion valueType = do
[text|
$nextVersion_ ->
decodeType $valueTypeInt version bytes T$nextVersion_.w3_decode_$valueType
|> fallback (\_ -> decodeType $valueTypeInt version bytes T$nextVersion_.w2_decode_$valueType)
|> upgradeIsCurrent
|> otherwiseError
|]
Expand Down Expand Up @@ -262,7 +261,6 @@ migrationForType migrationSequence migrationsForVersion startVersion finalVersio
then
[text|
decodeType $valueTypeInt $finalVersion_ bytes T$finalVersion_.w3_decode_$tipe
|> fallback (\_ -> decodeType $valueTypeInt $finalVersion_ bytes T$finalVersion_.w2_decode_$tipe)
|> upgradeSucceeds
|> otherwiseError
|]
Expand All @@ -278,7 +276,6 @@ migrationForType migrationSequence migrationsForVersion startVersion finalVersio
then
[text|
decodeType $valueTypeInt $startVersion_ bytes T$startVersion_.w3_decode_$tipe
|> fallback (\_ -> decodeType $valueTypeInt $startVersion_ bytes T$startVersion_.w2_decode_$tipe)
$intermediateMigrationsFormatted
|> upgradeSucceeds
|> otherwiseError
Expand Down
Loading

0 comments on commit 563f43e

Please sign in to comment.