hotfix(codegen/js): handle Pattern::Or, Expr::Todo, Expr::Panic#720
Merged
Conversation
Main is broken: PRs #706 (todo/panic) and #709 (or-pattern) added new AST variants, then PR #713 added src/codegen/js.rs without arms for them. Every PR's CI build job has been failing on E0004 non-exhaustive match since. Adds the missing arms: - Pattern::Or → JS disjunction: `subj === a || subj === b` - Expr::Todo → `(() => { throw new Error('TODO: ' + msg) })()` - Expr::Panic → same shape with 'PANIC:' prefix Drive-by clippy fixes in src/parser/mod.rs (needless return, saturating sub) and tests/capability_flags.rs (missing `env` field after Caps gained env-policy support). Regression test: tests/regression_js_emit_new_variants.rs exercises all three variants via `ilo --emit js`. ai.txt regen included.
❌ 1 Tests Failed:
View the full list of 1 ❄️ flaky test(s)
To view more test analytics, go to the Test Analytics Dashboard |
4 tasks
danieljohnmorris
added a commit
that referenced
this pull request
May 22, 2026
hotfix(codegen/js): handle Pattern::Or, Expr::Todo, Expr::Panic
danieljohnmorris
added a commit
that referenced
this pull request
May 22, 2026
hotfix(codegen/js): handle Pattern::Or, Expr::Todo, Expr::Panic
danieljohnmorris
added a commit
that referenced
this pull request
May 22, 2026
hotfix(codegen/js): handle Pattern::Or, Expr::Todo, Expr::Panic
danieljohnmorris
added a commit
that referenced
this pull request
May 22, 2026
hotfix(codegen/js): handle Pattern::Or, Expr::Todo, Expr::Panic
danieljohnmorris
added a commit
that referenced
this pull request
May 22, 2026
hotfix(codegen/js): handle Pattern::Or, Expr::Todo, Expr::Panic
danieljohnmorris
added a commit
that referenced
this pull request
May 22, 2026
hotfix(codegen/js): handle Pattern::Or, Expr::Todo, Expr::Panic
danieljohnmorris
added a commit
that referenced
this pull request
May 22, 2026
hotfix(codegen/js): handle Pattern::Or, Expr::Todo, Expr::Panic
danieljohnmorris
added a commit
that referenced
this pull request
May 22, 2026
hotfix(codegen/js): handle Pattern::Or, Expr::Todo, Expr::Panic
danieljohnmorris
added a commit
that referenced
this pull request
May 22, 2026
hotfix(codegen/js): handle Pattern::Or, Expr::Todo, Expr::Panic
danieljohnmorris
added a commit
that referenced
this pull request
May 22, 2026
hotfix(codegen/js): handle Pattern::Or, Expr::Todo, Expr::Panic
danieljohnmorris
added a commit
that referenced
this pull request
May 22, 2026
hotfix(codegen/js): handle Pattern::Or, Expr::Todo, Expr::Panic
danieljohnmorris
added a commit
that referenced
this pull request
May 22, 2026
hotfix(codegen/js): handle Pattern::Or, Expr::Todo, Expr::Panic
danieljohnmorris
added a commit
that referenced
this pull request
May 22, 2026
hotfix(codegen/js): handle Pattern::Or, Expr::Todo, Expr::Panic
danieljohnmorris
added a commit
that referenced
this pull request
May 22, 2026
hotfix(codegen/js): handle Pattern::Or, Expr::Todo, Expr::Panic
danieljohnmorris
added a commit
that referenced
this pull request
May 22, 2026
hotfix(codegen/js): handle Pattern::Or, Expr::Todo, Expr::Panic
danieljohnmorris
added a commit
that referenced
this pull request
May 22, 2026
hotfix(codegen/js): handle Pattern::Or, Expr::Todo, Expr::Panic
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.
Summary
Main is broken —
cargo buildfails on E0004 non-exhaustive match insrc/codegen/js.rs. PRs #706 (todo/panic, ILO-410) and #709 (|match alternatives, ILO-411) added new AST variants; #713 addedsrc/codegen/js.rswithout arms for them. Every PR's CI build job has been red since.Diff
src/codegen/js.rs— match arms for the new variantssrc/parser/mod.rs— drive-by clippy fixestests/capability_flags.rs— backfill missingenvfield on 4Caps::Restrictedliteralstests/regression_js_emit_new_variants.rs(new) — exercises all 3 variantsai.txt— regeneratedTest plan
cargo buildgreencargo clippy -- -D warningscleancargo fmt --checkclean