on master help sign in
give fairly general error when zip fails to build in publish checks
commit593a183362081effb154e0c32bb88f930307175f authorEvan Czaplicki <evancz@users.noreply.github.com> dateWed 19 Jun 2019, 11:18 (7 years ago) parentd69d1e2
1 file changed+25−13
builder/src/Reporting/Exit.hs+25−13
builder/src/Reporting/Exit.hs+25−13
@@ -223,7 +223,7 @@ diffToReport diff =
223223 toDetailsReport details
224224
225225 DiffBadBuild buildProblem ->
226− error "TODO DiffBadBuild" buildProblem
226+ toBuildProblemReport buildProblem
227227
228228
229229
@@ -610,17 +610,17 @@ publishToReport publish =
610610 ++ vsn ++ "` and publish your code from there."
611611 ]
612612
613− PublishZipBadDetails details ->
614− error "TODO PublishZipBadDetails" details
613+ PublishZipBadDetails _ ->
614+ badZipReport
615615
616616 PublishZipApplication ->
617− error "TODO PublishZipApplication"
617+ badZipReport
618618
619619 PublishZipNoExposed ->
620− error "TODO PublishZipNoExposed"
620+ badZipReport
621621
622− PublishZipBuildProblem buildProblem ->
623− error "TODO PublishZipBuildProblem" buildProblem
622+ PublishZipBuildProblem _ ->
623+ badZipReport
624624
625625
626626toBadReadmeReport :: String -> String -> Help.Report
@@ -637,12 +637,24 @@ toBadReadmeReport title summary =
637637 \ most common usage scenario. Show people what they can expect if\
638638 \ they learn more!"
639639 , D.toSimpleNote $
640− "By publishing your package, you are inviting people to invest time\
641− \ in understanding your work. Spending an hour to communicate your\
642− \ knowledge more clearly can save the community days or weeks of time\
643− \ in aggregate, and saving time in aggregate is the whole point of\
644− \ publishing packages! People really appreciate it, and it makes the\
645− \ whole ecosystem feel nicer!"
640+ "By publishing your package, you are inviting people to invest time in\
641+ \ understanding your work. Spending an hour on your README to communicate your\
642+ \ knowledge more clearly can save the community days or weeks of time in\
643+ \ aggregate, and saving time in aggregate is the whole point of publishing\
644+ \ packages! People really appreciate it, and it makes the whole ecosystem feel\
645+ \ nicer!"
646+ ]
647+
648+
649+badZipReport :: Help.Report
650+badZipReport =
651+ Help.report "PROBLEM VERIFYING PACKAGE" Nothing
652+ "Before publishing packages, I download the code from GitHub and try to build it\
653+ \ from scratch. That way I can be more confident that it will work for other\
654+ \ people too. But I am not able to build it!"
655+ [ D.reflow $
656+ "I was just able to build your local copy though. Is there some way the version\
657+ \ on GitHub could be different?"
646658 ]
647659
648660