Add option to hide build command on compilation error to build_runner #8513
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I know #6673 is still open with no consensus for the long term improvement of cli errors, but with a project with a large number of C files added you get errors like this (~36,000 characters of build command) which is just actively hostile to a nice debugging experience.
This PR is a stopgap that is not intended to be permanent which adds
hide_build_command_on_error: bool
on builder and--hide-build-command-on-error
command line argument when usingzig build
The scope of this change is kept small with the flag only taken into account in
execFromStep
when encountering aExitCodeFailure
as this is the path that a normal failed compilation will execute, rather than checking this flag everytime a failed command is to be printed e.g. on file not found.