@@ -751,7 +751,7 @@ data Install
751751 | InstallHadSolverTrouble Solver
752752 | InstallUnknownPackageOnline Pkg.Name [Pkg.Name]
753753 | InstallUnknownPackageOffline Pkg.Name [Pkg.Name]
754− | InstallHasBadDetails Pkg.Name Encode.Value
754+ | InstallBadDetails Details
755755
756756
757757installToReport :: Install -> Help.Report
@@ -895,20 +895,8 @@ installToReport exit =
895895 , D.reflow $ "Maybe you want one of these instead?"
896896 ]
897897
898− InstallHasBadDetails pkg outline ->
899− Help.report "INSTALL PROBLEM" Nothing
900− (
901− "I found a version of " ++ Pkg.toChars pkg ++ " that claims to be compatible with\
902− \ your existing dependencies, but I ran into an error when I tried to build it locally."
903− )
904− [ D.reflow $
905− "Here is an elm.json that should reproduce the error with a bit more information:"
906− , D.indent 4 $ D.dullyellow $ D.vcat $ map D.fromChars $
907− map BS_UTF8.toString $ BSC.lines $ LBS.toStrict $ B.toLazyByteString $
908− Encode.encode outline
909− , D.reflow $
910− "Maybe that can help figure out what is going on here."
911− ]
898+ InstallBadDetails details ->
899+ toDetailsReport details
912900
913901
914902
@@ -1334,7 +1322,7 @@ toDetailsReport details =
13341322 "I need the list of published packages to verify your dependencies"
13351323
13361324 DetailsBadDeps cacheDir deps ->
1337− case deps of
1325+ case List.sortOn toBadDepRank deps of
13381326 [] ->
13391327 Help.report "PROBLEM BUILDING DEPENDENCIES" Nothing
13401328 "I am not sure what is going wrong though."
@@ -1374,6 +1362,13 @@ toDetailsReport details =
13741362 ]
13751363
13761364
1365+toBadDepRank :: DetailsBadDep -> Int -- lower is better
1366+toBadDepRank badDep =
1367+ case badDep of
1368+ BD_BadDownload _ _ _ -> 0
1369+ BD_BadBuild _ _ _ -> 1
1370+
1371+
13771372
13781373-- PACKAGE PROBLEM
13791374