You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Found while adding test/internals/codegen_units_count_test.w (#681).
Repro: a test file with use compiler.CodegenUnits fails to compile under both with run and with test:
error: unknown method 'primitive_type_by_sym' for type '&Sema'
--> src/Sema.w:1043:20
error: unknown method 'type_decl_source_path' for type '&Sema'
--> src/Sema.w:1120:27
...
error: test build failed
= stage: build
Expected: importing any compiler module from a test compiles, as it does for compiler.foundation.*, compiler.Link, compiler.ConanClient (all pass today).
Analysis:compiler.CodegenUnits pulls use Mir, whose graph reaches src/Sema.w. Sema's impl is split across sibling files (SemaCheck.w etc.); the compiler's own build assembles all of src/, but the per-use module graph walked for a test file misses the sibling impl files, so methods defined there are unknown. Shallow modules work; anything reaching the split-impl cluster breaks.
Workaround used (remove when fixed): pure decision policy extracted to leaf module src/compiler/CodegenUnitsPolicy.w so the internals test imports that instead of compiler.CodegenUnits.
Triage 2026-10-25, with v0.15.3.0 (main a261b65): does not reproduce. A program importing compiler.CodegenUnits compiles and runs from a tree with a current runtime root:
use compiler.CodegenUnits
print(1)
$ with run main.w # in a fresh worktree of main
1
(Run from a checkout whose out/bootstrap-lib is an older generation, the compiler refuses the stale runtime root by name, D30 #1815; that is the intended refusal, not this bug.)
Activity
Compiler: window emit concurrency by memory (#681); unit count scales…
ehartford commentedon Oct 25, 2026
Triage 2026-10-25,
with v0.15.3.0(main a261b65): does not reproduce. A program importingcompiler.CodegenUnitscompiles and runs from a tree with a current runtime root:(Run from a checkout whose
out/bootstrap-libis an older generation, the compiler refuses the stale runtime root by name, D30 #1815; that is the intended refusal, not this bug.)