fix: CI blockers + const codegen + #92 gen_imports regression#101
Merged
Conversation
Scanner exits 1 on infra errors (Dependabot API unreachable, etc.) unrelated to actual security findings. Critical findings are caught by the separate Check step. Make the scan step non-blocking.
- dune (root): add blank line after comment before (dirs) stanza — dune fmt required it, causing all PR builds to fail the @fmt check - rsr-antipattern.yml: remove orphaned second Python block that leaked into bash after the first PYEOF closed the heredoc; bash was trying to execute BUILTIN_GLOBS as a command (exit 127) on every PR run
ExprVar name lookup fell through to UnboundVariable after checking locals and variant_tags, never reaching func_indices where TopConst bindings are stored (negative sentinel: global_idx = -(k+1)). Add a GlobalGet fallback so const identifiers used inside fn bodies compile correctly. check already passed; compile now passes too.
…rules PR #92 introduced three bugs on top of the cross-module infrastructure that landed in #90: 1. Removed gen_imports from lib/codegen.ml but left the call site in generate_module (UnboundVariable on any cross-module import at compile time). 2. Changed generate_module to drop the ?loader parameter but did not update bin/main.ml or test/test_e2e.ml callers (type error at build time). 3. Added duplicate extern_type_decl / extern_fn_decl Menhir rules that conflict with the full rules already present from #90 (Menhir multiply defined nonterminal error at build time). Fixes: - Restore gen_imports and the ?loader parameter on generate_module - Remove the duplicate #92 parser rules - Fix all call sites in bin/main.ml and test/test_e2e.ml 207/207 tests pass.
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
Bundles 5 fixes that were blocked from landing cleanly:
1. fix(ci): Hypatia scan continue-on-error
Scanner exits 1 on infra errors (Dependabot API unreachable, etc.). Makes step non-blocking; critical findings still block via the separate Check step.
2. fix(ci): dune @fmt + rsr-antipattern BUILTIN_GLOBS crash
dunewas missing blank line → @fmt check failed on every PRBUILTIN_GLOBS: command not foundon every PR3. fix(codegen): resolve top-level const refs in ExprVar — closes #73
ExprVarname lookup never checkedfunc_indiceswhereTopConstbindings live. AddsGlobalGetfallback.4. fix(#92 regression): restore gen_imports + deduplicate extern parser rules
PR #92 introduced three build-breaking regressions:
gen_importsfromlib/codegen.mlbut left the call site →UnboundVariableon any cross-module import?loaderfromgenerate_modulebut did not updatebin/main.ml/test/test_e2e.ml→ type error at build timeextern_type_decl/extern_fn_declMenhir rules that conflict with the feat: typed-wasm xmod + Node backend + extern + VS Code (#35, #42) #90 rules → Menhir "multiply defined nonterminal" build errorTest plan
dune test)constbindings (typecheck OK, compile fails) #73 compiles cleanlyGenerated with Claude Code