@@ -741,8 +741,10 @@ data Install
741 | InstallBadOutline Outline
741 | InstallBadOutline Outline
742 | InstallBadRegistry RegistryProblem
742 | InstallBadRegistry RegistryProblem
743 | InstallNoArgs FilePath
743 | InstallNoArgs FilePath
744− | InstallNoOnlineSolution
744+ | InstallNoOnlineAppSolution Pkg.Name
745− | InstallNoOfflineSolution
745+ | InstallNoOfflineAppSolution Pkg.Name
746+ | InstallNoOnlinePkgSolution Pkg.Name
747+ | InstallNoOfflinePkgSolution Pkg.Name
746 | InstallHadSolverTrouble Solver
748 | InstallHadSolverTrouble Solver
747 | InstallUnknownPackageOnline Pkg.Name [Pkg.Name]
749 | InstallUnknownPackageOnline Pkg.Name [Pkg.Name]
748 | InstallUnknownPackageOffline Pkg.Name [Pkg.Name]
750 | InstallUnknownPackageOffline Pkg.Name [Pkg.Name]
@@ -789,18 +791,75 @@ installToReport exit =
792− InstallNoOnlineSolution ->
794+ InstallNoOnlineAppSolution pkg ->
793− Help.report "UNSOLVABLE DEPENDENCIES" (Just "elm.json") -- TODO recommend using solver in `elm reactor`
795+ Help.report "CANNOT FIND COMPATIBLE VERSION" (Just "elm.json")
794− "This usually happens if you try to modify dependency constraints by\
796+ (
795− \ hand. I recommend deleting any dependency you added recently (or all\
797+ "I cannot find a version of " ++ Pkg.toChars pkg ++ " that is compatible\
796− \ of them if things are bad) and then adding them again with:"
798+ \ with your existing dependencies."
797− [ D.indent 4 $ D.green "elm install"
799+ )
801+ "I checked all the published versions. When that failed, I tried to find any\
802+ \ compatible combination of these packages, even if it meant changing all your\
803+ \ existing dependencies! That did not work either!"
798 , D.reflow $
804 , D.reflow $
799− "And do not be afaid to ask for help on Slack if you get stuck!"
805+ "This is most likely to happen when a package is not upgraded yet. Maybe a new\
806+ \ version of Elm came out recently? Maybe a common package was changed recently?\
807+ \ Maybe a better package came along, so there was no need to upgrade this one?\
808+ \ Try asking around https://elm-lang.org/community to learn what might be going on\
809+ \ with this package."
811+ "Whatever the case, please be kind to the relevant package authors! Having\
812+ \ friendly interactions with users is great motivation, and conversely, getting\
813+ \ berated by strangers on the internet sucks your soul dry. Furthermore, package\
814+ \ authors are humans with families, friends, jobs, vacations, responsibilities,\
815+ \ goals, etc. They face obstacles outside of their technical work you will never\
816+ \ know about, so please assume the best and try to be patient and supportive!"
802− InstallNoOfflineSolution ->
819+ InstallNoOfflineAppSolution pkg ->
803− error "TODO InstallNoOfflineSolution"
820+ Help.report "CANNOT FIND COMPATIBLE VERSION LOCALLY" (Just "elm.json")
822+ "I cannot find a version of " ++ Pkg.toChars pkg ++ " that is compatible\
823+ \ with your existing dependencies."
826+ "I was not able to connect to https://package.elm-lang.org/ though, so I was only\
827+ \ able to look through packages that you have downloaded in the past."
829+ "Try again later when you have internet!"
832+ InstallNoOnlinePkgSolution pkg ->
833+ Help.report "CANNOT FIND COMPATIBLE VERSION" (Just "elm.json")
835+ "I cannot find a version of " ++ Pkg.toChars pkg ++ " that is compatible\
836+ \ with your existing constraints."
839+ "With applications, I try to broaden the constraints to see if anything works,\
840+ \ but messing with package constraints is much more delicate business. E.g. making\
841+ \ your constraints stricter may make it harder for applications to find compatible\
842+ \ dependencies. So fixing something here may break it for a lot of other people!"
844+ "So I recommend making an application with the same dependencies as your package.\
845+ \ See if there is a solution at all. From there it may be easier to figure out\
846+ \ how to proceed in a way that will disrupt your users as little as possible. And\
847+ \ the solution may be to help other package authors to get their packages updated,\
848+ \ or to drop a dependency entirely."
851+ InstallNoOfflinePkgSolution pkg ->
852+ Help.report "CANNOT FIND COMPATIBLE VERSION LOCALLY" (Just "elm.json")
854+ "I cannot find a version of " ++ Pkg.toChars pkg ++ " that is compatible\
855+ \ with your existing constraints."
858+ "I was not able to connect to https://package.elm-lang.org/ though, so I was only\
859+ \ able to look through packages that you have downloaded in the past."
861+ "Try again later when you have internet!"
805 InstallHadSolverTrouble solver ->
864 InstallHadSolverTrouble solver ->
806 toSolverReport solver
865 toSolverReport solver
@@ -849,26 +908,6 @@ installToReport exit =
852−{- TODO detect if library has no 0.19.0 version. Maybe do this on website though?
853− Help.report "OLD DEPENDENCIES" (Just "elm.json")
854− ( "The following packages do not work with Elm " ++ V.toChars V.compiler ++ " right now:"
856− [ D.indent 4 $ D.vcat $ map (D.red . D.fromPackage) badPackages
858− "This may be because it is not upgraded yet. It may be because a\
859− \ better solution came along, so there was no need to upgrade it.\
860− \ Etc. Try asking around on Slack to learn more about the topic."
862− "Whatever the case, please be kind to the relevant package authors! Having\
863− \ friendly interactions with users is great motivation, and conversely, getting\
864− \ berated by strangers on the internet sucks your soul dry. Furthermore, package\
865− \ authors are humans with families, friends, jobs, vacations, responsibilities,\
866− \ goals, etc. They face obstacles outside of their technical work you will never\
867− \ know about, so please assume the best and try to be patient and supportive!"