Summary
test_edge_closures.ts fails to compile with:
error: redefinition of global '@perry_global_test_edge_closures_ts__22'
✗ ENTRY MODULE FAILED TO COMPILE — REFUSING TO LINK
Pre-existing — reproduces on v0.5.502 / v0.5.503 / v0.5.510 unchanged. Surfaced during v0.5.510 release-CI gate audit; was previously not in test-parity/known_failures.json and started failing the parity gate when the empty {} known_failures + this test's drift collided on a recent commit.
Repro
./target/release/perry test-files/test_edge_closures.ts -o /tmp/test_edge_closures
Fails with the redefinition error.
Suspected root cause
The numeric suffix on @perry_global_<module>__<id> globals is allocated per-module. A closure-related lowering path in test_edge_closures.ts is emitting the same id twice — likely a next_global_id counter not being incremented on one of two emission sites. Worth grepping crates/perry-codegen/src/codegen.rs and crates/perry-codegen/src/expr.rs for perry_global_ emissions where the same id can be produced twice (e.g. one branch increments before emit, another increments after).
Workaround
Test is currently entered into test-parity/known_failures.json so CI passes. Underlying bug should be fixed in a follow-up.
Summary
test_edge_closures.tsfails to compile with:Pre-existing — reproduces on v0.5.502 / v0.5.503 / v0.5.510 unchanged. Surfaced during v0.5.510 release-CI gate audit; was previously not in
test-parity/known_failures.jsonand started failing the parity gate when the empty{}known_failures + this test's drift collided on a recent commit.Repro
Fails with the redefinition error.
Suspected root cause
The numeric suffix on
@perry_global_<module>__<id>globals is allocated per-module. A closure-related lowering path intest_edge_closures.tsis emitting the same id twice — likely anext_global_idcounter not being incremented on one of two emission sites. Worth greppingcrates/perry-codegen/src/codegen.rsandcrates/perry-codegen/src/expr.rsforperry_global_emissions where the same id can be produced twice (e.g. one branch increments before emit, another increments after).Workaround
Test is currently entered into
test-parity/known_failures.jsonso CI passes. Underlying bug should be fixed in a follow-up.