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
t27b: lower std.debug.print by a plan in t27 (reel_particles_mux, zig_open_slice) #10449
specs/tri/t27b/debug_print_plan.t27 (the decision, new) and its generated gen/rust/tri/t27b/debug_print_plan.rs (t27c gen-rust).
specs/tri/t27b/builtin_plan.t27 and gen/rust/tri/t27b/builtin_plan.rs: the assert and eval-branch-quota decisions that lower.rs held inline move here.
specs/tri/t27b/conformance/discard_value.t27 (conformance cases; no new file).
cli/t27b/src/lower.rs glue only, net <= 0 lines.
docs/reports/t27b_expectations.json rows and .trinity/seals/ for the specs that move.
Out of scope: running the print (stderr is not observable to a verdict), std.debug.print with a non-literal format, any other std.* call.
User Scenarios
Given a spec whose main or helper fn calls std.debug.print("{d}:{d}\n", .{ i, f(i) }) (specs/compiler/zig_open_slice.t27, specs/t27f/reel_particles_mux.t27 main), when t27b compiles it, then it does not refuse with ExprCall(std.*); in a fn Zig analyzes the arguments run in order, once each, and in a fn nothing analyzed reaches nothing runs.
Given an analyzed fn whose format does not fit its tuple (a count mismatch, {d} of a bool, {s} of an integer), when t27b compiles it, then it refuses with a named reason, as the reference does not compile it.
Requirements
FR-001: t27b MUST skip a std.debug.print in a fn Zig never analyzes, without lowering its arguments.
FR-002: In an analyzed fn t27b MUST lower the arguments of std.debug.print(<string literal>, .{ ... }) left to right, once each, and drop the values, once debug_print_plan.t27check accepts the format against the argument kinds.
FR-003: t27b MUST refuse any other shape or a format that does not fit, with a name and detail from the plan.
FR-004: The choice and the measured format matrix MUST be recorded in debug_print_plan.t27 with tests.
Success Criteria
t27b test --blockers no longer lists ExprCall(std.*) for specs/t27f/reel_particles_mux.t27 or specs/compiler/zig_open_slice.t27.
t27b test --check agrees with t27c test-report on specs/tri/t27b/debug_print_plan.t27, specs/tri/t27b/conformance/discard_value.t27 and specs/tri/t27b/builtin_plan.t27.
docs/reports/t27b_expectations.json moves zig_open_slice to pass and max_not_pass falls from 75 to 74.
Seals are re-saved and the hand-written cli/t27b/src/lower.rs is net <= 0 lines (git diff --numstat).
Activity
t27b: std.debug.print lowers by a plan in t27 -- zig_open_slice passe…
t27b: std.debug.print lowers by a plan in t27 -- zig_open_slice passe…
t27b: std.debug.print lowers by a plan in t27 -- zig_open_slice passe…