diff --git a/.gitmodules b/.gitmodules index 2833d4664..3fae692ed 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,3 +4,19 @@ [submodule "vendor/elm-format"] path = vendor/elm-format url = git@github.com:lamdera/elm-format.git +[submodule "extra/package-replacements/elm/virtual-dom"] + path = extra/package-replacements/elm/virtual-dom + url = git@github.com:lydell/virtual-dom.git + branch = hot-reload-stop +[submodule "extra/package-replacements/elm/browser"] + path = extra/package-replacements/elm/browser + url = git@github.com:lydell/browser.git + branch = lamdera +[submodule "extra/package-replacements/elm/html"] + path = extra/package-replacements/elm/html + url = git@github.com:lydell/html.git + branch = safe +[submodule "extra/package-replacements/elm/core"] + path = extra/package-replacements/elm/core + url = git@github.com:lydell/core.git + branch = lamdera diff --git a/builder/src/Elm/Details.hs b/builder/src/Elm/Details.hs index 29af1b519..4958697f9 100644 --- a/builder/src/Elm/Details.hs +++ b/builder/src/Elm/Details.hs @@ -63,6 +63,8 @@ import qualified Stuff import qualified Lamdera import Lamdera ((&)) import qualified Lamdera.Extensions +import qualified Lamdera.PackageReplacements +import qualified Lamdera.Version -- DETAILS @@ -405,7 +407,7 @@ verifyDep (Env key _ _ cache manager _ _) depsMVar solution pkg details@(Solver. then do Reporting.report key Reporting.DCached maybeCache <- File.readBinary (Stuff.package cache pkg vsn "artifacts.dat") - & Lamdera.alternativeImplementation (File.readBinary (Stuff.package cache pkg vsn "artifacts.x.dat")) + & Lamdera.alternativeImplementation (File.readBinary (Stuff.package cache pkg vsn Lamdera.Version.artifacts)) case maybeCache of Nothing -> build key cache depsMVar pkg details fingerprint Set.empty @@ -500,7 +502,7 @@ build key cache depsMVar pkg (Solver.Details vsn _) f fs = Just results -> let path = Stuff.package cache pkg vsn "artifacts.dat" - & Lamdera.alternativeImplementation (Stuff.package cache pkg vsn "artifacts.x.dat") + & Lamdera.alternativeImplementation (Stuff.package cache pkg vsn Lamdera.Version.artifacts) ifaces = gatherInterfaces exposedDict results objects = gatherObjects results artifacts = Artifacts ifaces objects @@ -622,6 +624,7 @@ crawlModule foreignDeps mvar pkg src docsStatus name = crawlFile :: Map.Map ModuleName.Raw ForeignInterface -> MVar StatusDict -> Pkg.Name -> FilePath -> DocsStatus -> ModuleName.Raw -> FilePath -> IO (Maybe Status) crawlFile foreignDeps mvar pkg src docsStatus expectedName path = do bytes <- File.readUtf8 path + & Lamdera.alternativeImplementationPassthrough (Lamdera.PackageReplacements.get pkg expectedName Lamdera.PackageReplacements.elm) case Parse.fromByteString (Parse.Package pkg) bytes of Right modul@(Src.Module (Just (A.At _ actualName)) _ _ imports _ _ _ _ _) | expectedName == actualName -> do deps <- crawlImports foreignDeps mvar pkg src imports @@ -649,6 +652,7 @@ crawlKernel foreignDeps mvar pkg src name = if exists then do bytes <- File.readUtf8 path + & Lamdera.alternativeImplementationPassthrough (Lamdera.PackageReplacements.get pkg name Lamdera.PackageReplacements.kernel) case Kernel.fromByteString pkg (Map.mapMaybe getDepHome foreignDeps) bytes of Nothing -> return Nothing diff --git a/builder/src/Stuff.hs b/builder/src/Stuff.hs index 6d3f56568..62a05bbd9 100644 --- a/builder/src/Stuff.hs +++ b/builder/src/Stuff.hs @@ -36,6 +36,7 @@ import qualified Elm.Version as V import Lamdera ((&)) import qualified Lamdera +import qualified Lamdera.Version -- PATHS @@ -43,6 +44,7 @@ import qualified Lamdera stuff :: FilePath -> FilePath stuff root = root "elm-stuff" compilerVersion + & Lamdera.alternativeImplementation (root "elm-stuff" Lamdera.Version.medium) details :: FilePath -> FilePath diff --git a/compiler/src/Generate/Html.hs b/compiler/src/Generate/Html.hs index b572d0509..875371d15 100644 --- a/compiler/src/Generate/Html.hs +++ b/compiler/src/Generate/Html.hs @@ -84,7 +84,7 @@ sandwich_ root moduleName javascript = -

+