Repository navigation
Print each failed grammar's full error in the build summary - #29
Merged
Merged
Conversation
`build wasm grammars` builds grammars in parallel, so their streamed
output interleaves and the final error only named the failed grammars
("1 of 12 grammar(s) failed: luau"). The actual reason was buried
mid-log.
- `run`/`runCapture` now reject with a `CommandError` carrying the
child's full stderr. Its message includes the last 20 lines, so the
per-step `[FAILED: ...]` lines show the reason without getting long.
- The end-of-run summary lists each failed grammar's failing step,
command, and complete stderr.
- `collectErrors` moves to the root list. Nested listr2 lists share the
root's `errors` array, which is null unless the root collects, so the
per-grammar list's own `collectErrors: true` was a no-op.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
build wasm grammarsbuilds grammars in parallel, so their streamed output interleaves. When one fails, the final error only names it:The reason is buried mid-log. In the #28 CI run it was an
emcc: error: undefined exported symbol: "_tree_sitter_luau_external_scanner_create"line surrounded by other grammars' output.Change
cli/src/lib/util.ts:run/runCapturenow reject with aCommandErrorcarrying the child's full stderr. The error message includes the last 20 lines, so the per-step✖ … [FAILED: …]lines show the reason without getting long.cli/src/commands/build/wasm/grammars.ts: the end-of-run summary lists each failed grammar's failing step, command, and complete stderr:collectErrorsmoves to the root list. Nested listr2 lists share the root'serrorsarray, which isnullunless the root collects, so the per-grammar list's owncollectErrors: truenever did anything. Adding the options argument made Biome re-indentbuildAll, so the diff looks bigger than it is.Testing
tsc --noEmitand Biome pass for the CLI.run()and thefailureReasonsource, and had one grammar's step write 30 lines of stderr and exit 1. Its step lines showed lines 11–30, and the final summary showed all 30.🤖 Generated with Claude Code