Skip to content

hadrian: always report both stdout and stderr when running a builder fails

From the commit message:

The idea being that when a builder('s command) fails, we quite likely want to have all the information available to figure out why. Depending on the builder and the particular problem, the useful bits of information can be printed on stdout or stderr.

We accomplish this by defining a simple wrapper for Shake's cmd function, that just always captures both streams in case the command returns a non-zero exit code, and by using this wrapper everywhere in hadrian/src/Builder.hs.

Fixes #18089 (closed).

The original issue was only with GHC, but it felt like this made sense for all builders and was a better use of development time than a case-by-case analysis of where each builder outputs information for each possible error scenario.

Edited by Alp Mestanogullari

Merge request reports