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
[tests] lib/test harness (bench/runner/testing) stale and unreferenced #1066
The lib/test/ harness sources (bench.w, runner.w, testing.w) do not compile at 450733e (same drift family as #1053/#1055/#1063, distinct files) and have no callers or build
wiring, so the in-repo test-harness API exists only as stale
text.
Evidence (executed)
with-stage1 check: runner.w:12 (-> void: unknown type), bench.w:31 (&mut T rejected per §15.1), testing.w:141
(old match-subject syntax). Caller search (lib.test / lib/test over tests/, lib/, src/, tools/, build.w, docs/):
only the three files reference each other (plus unrelated testpkg scaffolding and completed-design docs).
Notes
Migrate or remove: either bring them to current syntax and wire
one suite onto them (proving the harness works), or delete them
so-owned-by-nobody helpers stop rotting. The committed suites'
local assert copies are unaffected either way.
Verdict. Reproduced: the three lib/test/ harness files do not compile, with the exact drift the report cites. But "no callers or build wiring" is not accurate for bench.w: the with bench command synthesizes a program that does use test.bench and calls into it, so bench.w is the bench harness, not dead text — and because it does not compile, the with bench path is broken, which is a bigger deal than stale helpers. runner.w/testing.w do appear unreferenced.
Tested.
Source
main @ 5809ac1 (2026-09-14); lib/test/*.w unchanged since the reported revision 450733e
Compiler
with v0.15.2.1 built from 5809ac1 (staging worktree)
Platform
macOS Darwin 25.6.0 arm64
with check, each file (matches the report):
lib/test/runner.w:12: error: unknown type 'void' (pub fn begin() -> void).
lib/test/bench.w:31: error: '&mut T' is not part of safe With (§15.1) (fn Bench.set_bytes(self: &mut Bench, ...)).
lib/test/testing.w:141: error: expected ':' or '{' after match subject (old match env(...) syntax).
Correction: bench.w is reached by with bench.synthesize_bench_main_source in src/main.w:3341-3346 emits use test.bench into the program it builds for with bench <file> (run_bench_file, :4040-4058), and the LSP offers use test. completion (src/Lsp.w:1156-1157). So test.bench is a real, intended module. In my environment with bench on a bench_-function file failed with import module not found: 'test.bench' (build-generated modules live under out/gen); module resolution would map test.bench to lib/test/bench.w (the lib/<rel> strategy) when run from the repo, but that file then fails to compile on the &mut error. Either way the bench command cannot use the shipped harness.
Root cause. Syntax rot (-> void, &mut T, old match) plus a harness that is embedded/wired incompletely — lib/test is not in the embedded-stdlib set (build.w embeds only lib/std), yet with bench depends on test.bench. No compiler defect in the drift itself.
Severity. Low for runner.w/testing.w (unreferenced dead text). Higher for bench.w: it makes with bench non-functional, which the report understates by grouping all three as "dead."
Related.#1053/#1055/#1063 (same drift family in tests/). No open PR.
Recommendation — champion for bench.w, owner's call for the other two. Migrate bench.w to current syntax (mut self/owned param instead of &mut, -> Unit), make test.bench resolvable to with bench (embed lib/test or stage it to out/gen as the error message implies), and add a smoke test that with bench runs a trivial bench_ function. For runner.w/testing.w, either migrate and wire one suite onto them to prove they work, or delete them. Acceptance criteria: with bench compiles and runs a bench_noop; with check lib/test/*.w passes for whatever is kept.
Blockers / not tested. I did not fully trace how test.bench is meant to reach out/gen in a complete build, so whether with bench works in a fully-built tree is uncertain; the three files' compile failures and with bench's dependency on test.bench are the established facts. Linux/Windows not exercised.
Triage 2026-10-25, with v0.15.3.0 (main a261b65): reproduced; none of the three harness files compiles.
$ with check lib/test/runner.w
error: unknown type 'void'; With uses Unit for no value and c_void for C void pointers
--> lib/test/runner.w:12:19
$ with check lib/test/bench.w
error: `&mut T` is not part of safe With (§3.1); …
--> lib/test/bench.w:31:26
$ with check lib/test/testing.w
error: expected ':' or '{' after match subject
--> lib/test/testing.w:141:33
post-release: stale internal sources; repair or removal is a cleanup.
Activity
ehartford commentedon Sep 16, 2026
Review: reproduced (one characterization corrected)
Verdict. Reproduced: the three
lib/test/harness files do not compile, with the exact drift the report cites. But "no callers or build wiring" is not accurate forbench.w: thewith benchcommand synthesizes a program that doesuse test.benchand calls into it, sobench.wis the bench harness, not dead text — and because it does not compile, thewith benchpath is broken, which is a bigger deal than stale helpers.runner.w/testing.wdo appear unreferenced.Tested.
main@ 5809ac1 (2026-09-14);lib/test/*.wunchanged since the reported revision 450733ewith v0.15.2.1built from 5809ac1 (staging worktree)with check, each file (matches the report):lib/test/runner.w:12:error: unknown type 'void'(pub fn begin() -> void).lib/test/bench.w:31:error: '&mut T' is not part of safe With (§15.1)(fn Bench.set_bytes(self: &mut Bench, ...)).lib/test/testing.w:141:error: expected ':' or '{' after match subject(oldmatch env(...)syntax).Correction:
bench.wis reached bywith bench.synthesize_bench_main_sourceinsrc/main.w:3341-3346emitsuse test.benchinto the program it builds forwith bench <file>(run_bench_file, :4040-4058), and the LSP offersuse test.completion (src/Lsp.w:1156-1157). Sotest.benchis a real, intended module. In my environmentwith benchon abench_-function file failed withimport module not found: 'test.bench' (build-generated modules live under out/gen); module resolution would maptest.benchtolib/test/bench.w(thelib/<rel>strategy) when run from the repo, but that file then fails to compile on the&muterror. Either way the bench command cannot use the shipped harness.Root cause. Syntax rot (
-> void,&mut T, oldmatch) plus a harness that is embedded/wired incompletely —lib/testis not in the embedded-stdlib set (build.w embeds onlylib/std), yetwith benchdepends ontest.bench. No compiler defect in the drift itself.Severity. Low for
runner.w/testing.w(unreferenced dead text). Higher forbench.w: it makeswith benchnon-functional, which the report understates by grouping all three as "dead."Related. #1053/#1055/#1063 (same drift family in
tests/). No open PR.Recommendation — champion for
bench.w, owner's call for the other two. Migratebench.wto current syntax (mut self/owned param instead of&mut,-> Unit), maketest.benchresolvable towith bench(embedlib/testor stage it toout/genas the error message implies), and add a smoke test thatwith benchruns a trivialbench_function. Forrunner.w/testing.w, either migrate and wire one suite onto them to prove they work, or delete them. Acceptance criteria:with benchcompiles and runs abench_noop;with check lib/test/*.wpasses for whatever is kept.Blockers / not tested. I did not fully trace how
test.benchis meant to reachout/genin a complete build, so whetherwith benchworks in a fully-built tree is uncertain; the three files' compile failures andwith bench's dependency ontest.benchare the established facts. Linux/Windows not exercised.ehartford commentedon Oct 25, 2026
Triage 2026-10-25,
with v0.15.3.0(main a261b65): reproduced; none of the three harness files compiles.post-release: stale internal sources; repair or removal is a cleanup.
Issues batch D: crypto known answers that run (#1053 #1055 #1063); de…
ehartford commentedon Nov 11, 2026
Merged to main ae20d89 (#3251): lib/test is deleted; nothing imported it (law 9). The harness in use is std.testing and
with test.