ReviewOS

zig-utils/zig-js

Build: wire generated wasm options into the focused JIT gate

#1025
Closed glennmichael123 opened this 9 days ago ·
9 days ago

Parent: #494 Discovered while verifying #1024.

Reproduction

On current main:

zig build test-jit -j1

The focused JIT root imports the production module closure, including src/wasm/api.zig's test at line 4681. That test imports wasm_test_options, but the focused_jit_tests root in build.zig only receives private_abi_options.

Observed compiler error:

src/wasm/api.zig:4681:38: error: no module named 'wasm_test_options' available within module 'root'

The ordinary full-test root already creates and installs this options module at build.zig:1447-1449; the focused JIT root at build.zig:1491-1508 does not.

Scope

  • Wire the existing generated wasm_test_options module into focused_jit_tests, or narrow the focused root so unrelated wasm test bodies are not part of its semantic closure.
  • Keep zig build test-jit a genuinely focused feedback command rather than running the full unit inventory.
  • Add a build-step regression check that reaches the compile phase from a clean cache.

Definition of done

  • zig build test-jit -j1 compiles and runs on a checkout with the real zig-gc dependency.
  • The focused gate's executed-test denominator is documented and substantially smaller than the full unit suite.
  • zig build test-parallel remains unchanged.
9 days ago

Completed in b4f5544 and pushed directly to main. The focused JIT root now installs the same generated wasm_test_options module as the full test root and defaults its runtime selection to the JIT-owned namespace while preserving explicit -Dtest-filter overrides. A fully isolated clean local/global cache build against zig-gc 0285ef8 linked 2,283 tests and executed 132: 131 passed, one platform skip, zero failed, zero leaked. This is substantially smaller than the full inventory and completes in about 1.4 seconds after linking. The existing CI focused-engine leg at .github/workflows/ci.yml continues to invoke test-jit, so the compile-path regression remains continuously gated. docs-link-check passes all 377 files and the checked BunPress build passes all 51 pages. The unchanged authoritative test-parallel wiring also passes against the real collector: 2,560 passed, one skipped, zero failed, zero leaked across two shards. This flips 0 test262 cases.

Sign in to comment on this issue.