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
t27c: a use path through the keyword test is dropped by the parser and counted as a discard #11101
Part of the night-loop epic #11063 and the compiler defects of #5980. Found while landing tri coverage (PR #11096): use tri::test::report::verdict; is accepted by the use-splice (the spec compiles and its tests run) but the parser drops the tokens of every such line: t27c parse-complete reports DISCARDED 63 top-level token(s) for nine of them and the corpus ratchet fails with UNEXPECTED FAILURES: specs/tri/coverage/coverage.t27 [parse-no-discard]. The path goes through the keyword test.
Goal
A use path whose middle segment is the word test (the module tri::test::report, specs/tri/test/report.t27) parses as a use declaration, so a spec can import from it without being counted as a discard.
Requirements
FR-001: The parser MUST accept an identifier-position test inside a use path and consume every token of the declaration, so t27c parse-complete prints DISCARD 0 for a spec that imports from tri::test::report.
FR-002: The change MUST NOT alter how a test "name" { } block is recognised and MUST keep every existing parse-conform vector unchanged.
FR-003: Because compiler.rs is frozen, the change MUST follow the FROZEN_HASH standing rule (net lines not positive, corpus byte-identical, tests green) or be written in .t27 where the compiler is ported.
Scenarios
Given a spec with use tri::test::report::verdict;, when t27c parse-complete runs on it, then it reports 0 discarded tokens.
Given a spec with a test "x" { } block after that use line, then the block still runs as a test.
Boundary
bootstrap/src/compiler.rs
bootstrap/src/lexer.rs
specs/tri/coverage/coverage.t27
Success Criteria
t27c parse-complete --specs-dir <dir holding specs/tri/coverage/coverage.t27 as shipped before the workaround> exits 0 and prints parse but DISCARD 0.
t27c parse-conform exits 0 with the same vector counts as before the change.
The ledger entry added for specs/tri/coverage/coverage.t27 in docs/reports/suite_expectations.json is removed in the same PR and max_entries goes back down by 1.
Activity
tri coverage: restore the use lines the spec needs and record the par…
tri coverage: five coverage facts per spec, the rules in specs/tri/co…