@@ -68,6 +68,7 @@ import qualified Reporting.Render.Code as Code
6868import Lamdera
6969import qualified Lamdera.Error
7070import qualified Elm.Constraint as Con
71+ import qualified Lamdera.Version
7172
7273-- RENDERERS
7374
@@ -961,6 +962,8 @@ data Outline
961962 | OutlineNoAppCore
962963 | OutlineNoAppJson
963964 | OutlineLamderaMissingDeps
965+ | OutlineLamderaReplacementPackageVersionTooLow Pkg. Name V. Version V. Version
966+ | OutlineLamderaReplacementPackageVersionTooHigh Pkg. Name V. Version V. Version
964967
965968
966969data OutlineProblem
@@ -1061,6 +1064,25 @@ toOutlineReport problem =
10611064 , D. reflow " Note: if you're trying to run a normal Elm app, use the elm binary instead."
10621065 ]
10631066
1067+ OutlineLamderaReplacementPackageVersionTooLow name replacedVersion elmJsonVersion ->
1068+ Help. report " UNSUPPORTED VERSION" (Just " elm.json" )
1069+ (" This version of the Lamdera compiler supports the following range for \" " <> Pkg. toChars name <> " \" :" )
1070+ [ D. indent 4 $ D. green $ " \" " <> D. fromVersion (Lamdera.Version. resetPatch replacedVersion) <> " <= v <= " <> D. fromVersion replacedVersion <> " \" "
1071+ , D. reflow " But your elm.json contains:"
1072+ , D. indent 4 $ D. red $ " \" " <> D. fromPackage name <> " \" : \" " <> D. fromVersion elmJsonVersion <> " \" "
1073+ , D. reflow " You need to update that package!"
1074+ ]
1075+
1076+ OutlineLamderaReplacementPackageVersionTooHigh name replacedVersion elmJsonVersion ->
1077+ Help. report " UNSUPPORTED VERSION" (Just " elm.json" )
1078+ (" This version of the Lamdera compiler supports the following range for \" " <> Pkg. toChars name <> " \" :" )
1079+ [ D. indent 4 $ D. green $ " \" " <> D. fromVersion (Lamdera.Version. resetPatch replacedVersion) <> " <= v <= " <> D. fromVersion replacedVersion <> " \" "
1080+ , D. reflow " But your elm.json contains:"
1081+ , D. indent 4 $ D. red $ " \" " <> D. fromPackage name <> " \" : \" " <> D. fromVersion elmJsonVersion <> " \" "
1082+ , D. reflow " You need to update the Lamdera compiler. And if there is no later version, ask the Lamdera community to release a new version!"
1083+ , D. reflow " You can also downgrade that package for now."
1084+ ]
1085+
10641086
10651087toOutlineProblemReport :: FilePath -> Code. Source -> Json. Context -> A. Region -> OutlineProblem -> Help. Report
10661088toOutlineProblemReport path source _ region problem =
0 commit comments