@@ -22,8 +22,9 @@ data Exit
2222 = CorruptVersionCache FilePath Pkg.Name
2323 | PackageNotFound Pkg.Name [Pkg.Name]
2424 -- verify
25− | AppBadElm Pkg.Version
2625 | PkgBadElm Con.Constraint
26+ | AppBadElm Pkg.Version
27+ | AppMissingTrans [(Pkg.Name, Pkg.Version)]
2728 | BadDeps
2829 | BuildFailure FilePath Pkg.Name Pkg.Version
2930
@@ -59,8 +60,19 @@ toReport exit =
5960 , "But check <https://package.elm-lang.org> to see all possibilities!"
6061 ]
6162
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
67+ , D.fillSep
68+ [ "But", "you", "are", "using", "Elm"
69+ , D.red (D.fromString (Pkg.versionToString Compiler.version))
70+ , "right", "now."
71+ ]
72+ ]
73+
6274 AppBadElm version ->
63− Help.report "ELM VERSION MISMATCH" Nothing
75+ Help.report "ELM VERSION MISMATCH" (Just "elm.json")
6476 "Your elm.json says this application needs a different version of Elm."
6577 [ D.fillSep
6678 [ "It", "requires"
@@ -71,19 +83,23 @@ toReport exit =
7183 ]
7284 ]
7385
74− PkgBadElm constraint ->
75− Help.report "ELM VERSION MISMATCH" Nothing
76− "Your elm.json says this package needs a version of Elm in this range:"
77− [ D.indent 4 $ D.dullyellow $ D.fromString $ Con.toString constraint
86+ AppMissingTrans missingDeps ->
87+ let
88+ toEntry (pkg, vsn) =
89+ "\"" ++ Pkg.toString pkg ++ "\": \"" ++ Pkg.versionToString vsn ++ "\""
90+ in
91+ Help.report "MISSING DEPENDENCIES" (Just "elm.json")
92+ "Your elm.json is missing some \"transitive-dependencies\" entries:"
93+ [ D.indent 4 $ D.dullyellow $ D.vcat $ map (D.fromString . toEntry) missingDeps
7894 , D.fillSep
79− [ "But", "you", "are", "using", "Elm"
80− , D.red (D.fromString (Pkg.versionToString Compiler.version))
81− , "right", "now."
95+ ["This","usually","means","you","are","editing","elm.json","by","hand."
96+ ,"It","is","much","more","reliable","to","use","the"
97+ ,D.green "elm install","command","instead."
8298 ]
8399 ]
84100
85101 BadDeps ->
86− Help.report "CLASHING PACKAGE DEPENDENCIES" Nothing
102+ Help.report "CLASHING PACKAGE DEPENDENCIES" (Just "elm.json")
87103 "The dependencies in your elm.json are not compatible."
88104 [ D.reflow $
89105 "Did you change them by hand? Try to change it back! It is much\