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
#178 said "use A.B inlines at AST level; no real multi-file libraries
shippable". Empirically falsified for the canonical form: `gen_imports`
(lib/codegen.ml) already emits real `(import "Mod" "fn" (func …))` for
`use Mod::{fn}` / `use Mod::*`, and the .wasm caller path feeds the
import-shaped program. What was missing was the *guarantee* — emission
was correct but never execution-tested; the existing cross-module tests
are structural (Tw_interface) only.
This locks the substrate in:
1. Hermetic structural gate test (test/test_e2e.ml, "E2E Boundary
Verify › INT-01 #178"): compiles CrossCallee.affine +
cross_caller_ok.affine, asserts the caller emits import
(CrossCallee . consume) and the callee exports `consume` — i.e. the
two separately-compiled modules are link-compatible. Pure OCaml on
the emitted Wasm.wasm_module; no external runtime; gate 270→271.
2. Reproducible execution proof (tests/modules/xmod-link/): run.sh
compiles both fixtures and deno-links them; link.mjs instantiates
callee.wasm, passes its `consume` export as the caller's
`CrossCallee.consume` import, runs `main()`, asserts 42. Verified:
"PASS: cross-module call CrossCallee.consume(42) === 42". Kept out of
the hermetic gate by design (needs a wasm engine); documented in the
directory README.
Honest status (ledger truthed — docs/TECH-DEBT.adoc + ECOSYSTEM.adoc
INT-01): `use Mod::{fn}` / `use Mod::*` cross-module libraries are
*shippable, proven, regression-locked*. The `use Mod;` + qualified value
call `Mod.fn(x)` form is a *distinct resolution gap* (post-#228
qualified-value resolution is unwired — `Resolution error`, before
codegen) — explicitly NOT folded into this emission substrate; tracked
as the remaining INT-01 follow-up.
No compiler change — emission was already correct; this proves and
guards it. Refs #178 (not Closes — qualified-value-call follow-up
remains; owner-gated).
Co-authored-by: hyperpolymath <hyperpolymath@users.noreply.github.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments