Rework reportBuildFailures to include build logs
Reporting build logs is important as we otherwise have no real info for why deps failed to build. It does make the presentation more difficult however because build logs can be long and in principle there can be several, which means it can take up more than a single screen in a console. The first thing users notice is typically the last few messages, so in the case that we're presenting long build logs then its important to also include a short summary at the end. So our approach is this: for packages where we want to show a build log, we dump those first, in full, each with a header to indicate which package it is, log file name (for later reference), plus any extra detail we have from the phase of the failure or the exception. Then after all build logs we end with a short summary of the failure(s). For packages where we do not show a build log (e.g. local packages that dump live to the console) we only present a summary at the end, but we include a little more detail than for the packages that had a build log since this is the only thing we report for them. So we include details of the exception.
Showing
- cabal-install/Distribution/Client/CmdBuild.hs 1 addition, 1 deletioncabal-install/Distribution/Client/CmdBuild.hs
- cabal-install/Distribution/Client/CmdRepl.hs 1 addition, 1 deletioncabal-install/Distribution/Client/CmdRepl.hs
- cabal-install/Distribution/Client/ProjectOrchestration.hs 94 additions, 44 deletionscabal-install/Distribution/Client/ProjectOrchestration.hs
Please register or sign in to comment