Skip to content

with test: a fixture run in-process refuses a header arg that path cannot apply, and applies --prelude=alloc and --overflow= (#1048) - #2674

Merged
ehartford merged 1 commit into
fix-1041from
fix-1048
Oct 25, 2026
Merged

ehartford merged 1 commit into
fix-1041from
fix-1048

Conversation

@ehartford

@ehartford ehartford commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Root cause: run_test_file_env_applied (src/main.w) compiles a run-mode
fixture in-process and read //! args: only by name for -O0..-O3,
--no-std, --freestanding, --no-runtime, --alloc and the none/core/full
preludes; every other arg was dropped. A fixture naming --emit-c or
--bundle-corpus passed without exercising either, and the three tree
fixtures naming --overflow=wrap, --overflow=saturate and --prelude=alloc
ran in the default mode.

test_run_path_applies lists what this path applies, and it now applies
--prelude=alloc and --overflow= (Compilation.set_overflow_mode); any
other arg fails the fixture: "//! args: X has no effect on a test run
in-process; a check-only, expect-check-stdout or expect-build-fail fixture
passes it to the compiler".

Test: test/behavior/behav_1048_run_path_refuses_unapplied_args.w runs with test on a fixture with //! args: --no-such-flag-1048. The installed
compiler passes it ("ok: 1 test passed").

Closes #1048

…nnot apply, and applies --prelude=alloc and --overflow= (#1048)

Root cause: run_test_file_env_applied (src/main.w) compiles a run-mode
fixture in-process and read `//! args:` only by name for -O0..-O3,
--no-std, --freestanding, --no-runtime, --alloc and the none/core/full
preludes; every other arg was dropped. A fixture naming --emit-c or
--bundle-corpus passed without exercising either, and the three tree
fixtures naming --overflow=wrap, --overflow=saturate and --prelude=alloc
ran in the default mode.

test_run_path_applies lists what this path applies, and it now applies
--prelude=alloc and --overflow=<mode> (Compilation.set_overflow_mode); any
other arg fails the fixture: "//! args: `X` has no effect on a test run
in-process; a check-only, expect-check-stdout or expect-build-fail fixture
passes it to the compiler".

Test: test/behavior/behav_1048_run_path_refuses_unapplied_args.w runs `with
test` on a fixture with `//! args: --no-such-flag-1048`. The installed
compiler passes it ("ok: 1 test passed").
@ehartford
ehartford added this pull request to stack #2678 October 25, 2026 22:52
@ehartford ehartford changed the title fix 1048 with test: a fixture run in-process refuses a header arg that path cannot apply, and applies --prelude=alloc and --overflow= (#1048) Oct 25, 2026
@ehartford
ehartford marked this pull request as ready for review October 25, 2026 23:05
@ehartford
ehartford merged commit 863e5cf into main Oct 25, 2026
@ehartford
ehartford deleted the fix-1048 branch October 25, 2026 23:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant