zig
zig copied to clipboard
Improve build runner error collection
Currently errors from build.zig are a bit messy: to display an error message the convention is to call warn and then return a dummy value.
This means that we have no ability to:
- print a header before error messages
- collect these errors into a machine printable form
Proposal:
markInvalidUserInputshould take an error message and append to an internal list of messages to display- the special build runner would emit those messages itself
Related cleanup PR: #7640
print a header before error messages collect these errors into a machine printable form
- Do you have any opinion how the errors should look like?
- What use cases should be covered?
- What is the existing tooling with tradeoffs on format usage?
- Should this be deferred after the build runner does parallel builds or is this orthogonal?