@@ -1145,8 +1145,8 @@ toDetailsReport details =
1145 toRegistryProblemReport "PROBLEM LOADING PACKAGE LIST" problem $
1145 toRegistryProblemReport "PROBLEM LOADING PACKAGE LIST" problem $
1146 "I need the list of published packages to figure out if your project has compatible dependencies"
1146 "I need the list of published packages to figure out if your project has compatible dependencies"
1148− DetailsCannotBuildPackage name version problem ->
1148+ DetailsCannotBuildPackage pkg vsn problem ->
1149− error "TODO DetailsCannotBuildPackage" name version problem
1149+ toPackageProblemReport pkg vsn problem
@@ -1155,10 +1155,68 @@ toDetailsReport details =
1156data PackageProblem
1156data PackageProblem
1157 = PP_BadEndpointRequest Http.Error
1157 = PP_BadEndpointRequest Http.Error
1158− | PP_BadEndpointContent
1158+ | PP_BadEndpointContent String
1159 | PP_BadArchiveRequest Http.Error
1159 | PP_BadArchiveRequest Http.Error
1160− | PP_BadArchiveContent
1160+ | PP_BadArchiveContent String
1161− | PP_BadArchiveHash String String
1161+ | PP_BadArchiveHash String String String
1164+toPackageProblemReport :: Pkg.Name -> V.Version -> PackageProblem -> Help.Report
1165+toPackageProblemReport pkg vsn problem =
1168+ Pkg.toChars pkg ++ " " ++ V.toChars vsn
1171+ PP_BadEndpointRequest httpError ->
1172+ toHttpErrorReport "PROBLEM DOWNLOADING PACKAGE" httpError $
1173+ "I need to find the latest download link for " ++ thePackage
1175+ PP_BadEndpointContent url ->
1176+ Help.report "PROBLEM DOWNLOADING PACKAGE" Nothing
1178+ "I need to find the latest download link for " ++ thePackage ++ ", but I ran into corrupted information from:"
1180+ [ D.indent 4 $ D.dullyellow $ D.fromChars url
1182+ "Is something weird with your internet connection. We have gotten reports that\
1183+ \ schools, businesses, airports, etc. sometimes intercept requests and add things\
1184+ \ to the body or change its contents entirely. Could that be the problem?"
1187+ PP_BadArchiveRequest httpError ->
1188+ toHttpErrorReport "PROBLEM DOWNLOADING PACKAGE" httpError $
1189+ "I was trying to download the source code for " ++ thePackage
1191+ PP_BadArchiveContent url ->
1192+ Help.report "PROBLEM DOWNLOADING PACKAGE" Nothing
1194+ "I downloaded the source code for " ++ thePackage ++ " from:"
1196+ [ D.indent 4 $ D.dullyellow $ D.fromChars url
1198+ "But I was unable to unzip the data. Maybe there is something weird with\
1199+ \ your internet connection. We have gotten reports that schools, businesses,\
1200+ \ airports, etc. sometimes intercept requests and add things to the body or\
1201+ \ change its contents entirely. Could that be the problem?"
1204+ PP_BadArchiveHash url expectedHash actualHash ->
1205+ Help.report "CORRUPT PACKAGE DATA" Nothing
1207+ "I downloaded the source code for " ++ thePackage ++ " from:"
1209+ [ D.indent 4 $ D.dullyellow $ D.fromChars url
1210+ , D.reflow "But it looks like the hash of the archive has changed since publication:"
1211+ , D.vcat $ map D.fromChars $
1212+ [ " Expected: " ++ expectedHash
1213+ , " Actual: " ++ actualHash
1216+ "This usually means that the package author moved the version\
1217+ \ tag, so report it to them and see if that is the issue. Folks\
1218+ \ on Elm slack can probably help as well."