@@ -22,8 +22,9 @@ data Exit
22 = CorruptVersionCache FilePath Pkg.Name
22 = CorruptVersionCache FilePath Pkg.Name
23 | PackageNotFound Pkg.Name [Pkg.Name]
23 | PackageNotFound Pkg.Name [Pkg.Name]
25− | AppBadElm Pkg.Version
26 | PkgBadElm Con.Constraint
25 | PkgBadElm Con.Constraint
26+ | AppBadElm Pkg.Version
27+ | AppMissingTrans [(Pkg.Name, Pkg.Version)]
28 | BuildFailure FilePath Pkg.Name Pkg.Version
29 | BuildFailure FilePath Pkg.Name Pkg.Version
@@ -59,8 +60,19 @@ toReport exit =
59 , "But check <https://package.elm-lang.org> to see all possibilities!"
60 , "But check <https://package.elm-lang.org> to see all possibilities!"
63+ PkgBadElm constraint ->
64+ Help.report "ELM VERSION MISMATCH" (Just "elm.json")
65+ "Your elm.json says this package needs a version of Elm in this range:"
66+ [ D.indent 4 $ D.dullyellow $ D.fromString $ Con.toString constraint
68+ [ "But", "you", "are", "using", "Elm"
69+ , D.red (D.fromString (Pkg.versionToString Compiler.version))
62 AppBadElm version ->
74 AppBadElm version ->
63− Help.report "ELM VERSION MISMATCH" Nothing
75+ Help.report "ELM VERSION MISMATCH" (Just "elm.json")
64 "Your elm.json says this application needs a different version of Elm."
76 "Your elm.json says this application needs a different version of Elm."
65 [ D.fillSep
77 [ D.fillSep
66 [ "It", "requires"
78 [ "It", "requires"
@@ -71,19 +83,23 @@ toReport exit =
74− PkgBadElm constraint ->
86+ AppMissingTrans missingDeps ->
75− Help.report "ELM VERSION MISMATCH" Nothing
87+ let
76− "Your elm.json says this package needs a version of Elm in this range:"
88+ toEntry (pkg, vsn) =
89+ "\"" ++ Pkg.toString pkg ++ "\": \"" ++ Pkg.versionToString vsn ++ "\""
91+ Help.report "MISSING DEPENDENCIES" (Just "elm.json")
92+ "Your elm.json is missing some \"transitive-dependencies\" entries:"
77− [ D.indent 4 $ D.dullyellow $ D.fromString $ Con.toString constraint
93+ [ D.indent 4 $ D.dullyellow $ D.vcat $ map (D.fromString . toEntry) missingDeps
78 , D.fillSep
94 , D.fillSep
79− [ "But", "you", "are", "using", "Elm"
95+ ["This","usually","means","you","are","editing","elm.json","by","hand."
80− , D.red (D.fromString (Pkg.versionToString Compiler.version))
96+ ,"It","is","much","more","reliable","to","use","the"
81− , "right", "now."
97+ ,D.green "elm install","command","instead."
85 BadDeps ->
101 BadDeps ->
86− Help.report "CLASHING PACKAGE DEPENDENCIES" Nothing
102+ Help.report "CLASHING PACKAGE DEPENDENCIES" (Just "elm.json")
87 "The dependencies in your elm.json are not compatible."
103 "The dependencies in your elm.json are not compatible."
88 [ D.reflow $
104 [ D.reflow $
89 "Did you change them by hand? Try to change it back! It is much\
105 "Did you change them by hand? Try to change it back! It is much\