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
{{ message }}
Repository navigation
test/internals is not wired into any build.w test target #559
test/internals/ holds compiler-internal unit tests (intern_pool_test.w, arena_test.w, source_map_*.w, and now conan_recipe_link_metadata_test.w from #550), but no target in build.w or build/*.w references the directory — with build :test runs behavior/compile-error/codegen/spec/phase/CLI-selfhost/emit-C only. The internals tests run fine manually (with run test/internals/<file>.w from the repo root resolves use compiler.*), they just never run in CI.
A test that exists but never runs reads as coverage that isn't there.
Proposed fix
Add an internals-tests Test target (test/internals/*.w) to build.w and hook it into the test group. First run may surface stale tests — fix or remove them rather than excluding the target.
Status: 1 of 11 internals tests passes today. All use //! expect-stdout: ok and run via the standard external-test path (<compiler> test --quiet <file>), so the harness works — the test programs no longer compile.
Two distinct root causes for the 10 failures:
0c06fbd4 "Enforce module pub visibility" (2026-06-10) broke 10/11. None of src/compiler/foundation/*.w mark any symbol pub (grep -c "^pub" = 0 across Ids/Arena/SourceMap/Types/Values), so every test importing them gets symbol '...' is private to module .... The compiler itself still builds because the live build only imports compiler.foundation.Types/Values in type-annotation position. This is exactly the silent rot this issue predicted: enforcement landed, the tests never ran, nobody noticed.
Latent bug at src/compiler/foundation/InternPool.w:10: extern fn with_hashmap_new_at(base: &T, ...) — T is undefined (live src/InternPool.w:11 uses &i8). Never caught because nothing in the live build imports compiler.foundation.InternPool.
History note: the exclusion was deliberate once — d5ec2f11 ("Reorganize test directory") excluded lexer/parser/internals citing "known codegen bugs with compiler internal APIs". That claim is stale: today's failures are visibility + one bad extern decl, and conan_recipe_link_metadata_test.w passes, proving the path works.
Fix shape (one logical change):
Fix &T → &i8 in src/compiler/foundation/InternPool.w:10.
Add pub to the consumed API surface of src/compiler/foundation/*.w (these modules are the Wave-1 internal API surface per src/compiler/README.md, so pub matches intent — normal pub, not @[c_export]).
In build.w, add after native-phase-tests (~line 847), following the existing pattern:
var internals_tests = target_new(.Test, "internals-tests", "test/internals/*.w")
internals_tests = internals_tests.arg("compiler=" ++ release_compiler_bin("with"))
internals_tests = internals_tests.dep("build")
internals_tests = internals_tests.dep("selfcheck")
out = out.add_target(internals_tests)
and tests = tests.dep("internals-tests") in the test group (~line 948). The selfcheck dep matches the other compiler-source-touching targets.
Steps 1–2 touch files compiled into the compiler, so the full build/fixpoint chain must be re-verified.
test/lexer/ and test/parser/ have the same disease (sampled: parser test passes, lexer test fails on the same new visibility rule) — filed separately.
Activity
Extract system link metadata from Conan recipes
ehartford commentedon Jun 12, 2026
Investigation results (against current HEAD):
Status: 1 of 11 internals tests passes today. All use
//! expect-stdout: okand run via the standard external-test path (<compiler> test --quiet <file>), so the harness works — the test programs no longer compile.Two distinct root causes for the 10 failures:
0c06fbd4"Enforce module pub visibility" (2026-06-10) broke 10/11. None ofsrc/compiler/foundation/*.wmark any symbolpub(grep -c "^pub"= 0 across Ids/Arena/SourceMap/Types/Values), so every test importing them getssymbol '...' is private to module .... The compiler itself still builds because the live build only importscompiler.foundation.Types/Valuesin type-annotation position. This is exactly the silent rot this issue predicted: enforcement landed, the tests never ran, nobody noticed.src/compiler/foundation/InternPool.w:10:extern fn with_hashmap_new_at(base: &T, ...)—Tis undefined (livesrc/InternPool.w:11uses&i8). Never caught because nothing in the live build importscompiler.foundation.InternPool.History note: the exclusion was deliberate once —
d5ec2f11("Reorganize test directory") excluded lexer/parser/internals citing "known codegen bugs with compiler internal APIs". That claim is stale: today's failures are visibility + one bad extern decl, andconan_recipe_link_metadata_test.wpasses, proving the path works.Fix shape (one logical change):
&T→&i8insrc/compiler/foundation/InternPool.w:10.pubto the consumed API surface ofsrc/compiler/foundation/*.w(these modules are the Wave-1 internal API surface persrc/compiler/README.md, sopubmatches intent — normalpub, not@[c_export]).build.w, add afternative-phase-tests(~line 847), following the existing pattern:tests = tests.dep("internals-tests")in thetestgroup (~line 948). Theselfcheckdep matches the other compiler-source-touching targets.test/lexer/andtest/parser/have the same disease (sampled: parser test passes, lexer test fails on the same new visibility rule) — filed separately.Wire test/lexer and test/parser into the build test group