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
use A.B inlines at AST level; no real multi-file libraries shippable. gen_imports + verify-boundary exist for hand-assembled callers. Blocks INT-04/05/07/09/12 and every multi-file satellite. Ledger: INT-01 (S1, substrate).
Finding (compiler-as-oracle): the emission substrate already works for the canonical form.
lib/codegen.ml gen_imports emits a real (import "Mod" "fn" (func ...)) for use Mod::{fn} / use Mod::*, and the .wasm path feeds the import-shaped program. Two separately-compiled .wasm modules link and execute: compiled CrossCallee.affine → callee (exports consume) and cross_caller_ok.affine → caller (imports CrossCallee.consume), instantiated linked in Deno, main() returned 42 via the cross-module call.
What was missing was the guarantee (existing xmod tests are structural Tw_interface only). Now locked by PR #244:
Hermetic structural test in the gate (270 → 271): caller emits import (CrossCallee . consume), callee exports consume.
use Mod::{fn} / use Mod::* multi-file libraries are shippable, proven, regression-locked.
Remaining (distinct — issue kept open):use Mod; + qualified value call Mod.fn(x) hits a resolution error (post-#228 qualified-value resolution is unwired; fails before codegen). This is a separate follow-up, not the emission substrate. Ledger truthed: docs/TECH-DEBT.adoc + docs/ECOSYSTEM.adoc INT-01.
Closing as completed — the emission substrate (this issue's scope) is done, proven, and regression-locked.
PR #244 merged (2026-05-19): lib/codegen.ml gen_imports emits real (import "Mod" "fn" (func ...)) for use Mod::{fn} / use Mod::*; two separately-compiled .wasm modules link and execute (main() → 42). Now guaranteed by a hermetic structural test in the gate (270 → 271) plus a reproducible Deno link+execute harness at tests/modules/xmod-link/. use Mod::{fn} / use Mod::* multi-file libraries are shippable, proven, regression-locked. Ledger truthed in docs/TECH-DEBT.adoc + docs/ECOSYSTEM.adoc (INT-01).
The merge check governance / Language / package anti-pattern policy failed on pre-existing ReScript files (packages/affine-res/, affinescriptiser/examples/) entirely outside this PR's diff (test + docs only, 0 .res files) — baseline rot, not a PR defect; the affine oracle (build/dune test gate) was green. Admin-merged on that basis.
The remaining distinct item — use Mod; + qualified value call Mod.fn(x) failing at resolution (post-#228 qualified-value resolution unwired, fails before codegen) — is not the emission substrate and is split out to #249.
Activity
hyperpolymath commentedon May 19, 2026
Finding (compiler-as-oracle): the emission substrate already works for the canonical form.
lib/codegen.ml gen_importsemits a real(import "Mod" "fn" (func ...))foruse Mod::{fn}/use Mod::*, and the.wasmpath feeds the import-shaped program. Two separately-compiled.wasmmodules link and execute: compiledCrossCallee.affine→ callee (exportsconsume) andcross_caller_ok.affine→ caller (importsCrossCallee.consume), instantiated linked in Deno,main()returned 42 via the cross-module call.What was missing was the guarantee (existing xmod tests are structural
Tw_interfaceonly). Now locked by PR #244:(CrossCallee . consume), callee exportsconsume.tests/modules/xmod-link/(run.sh+link.mjs+ README).use Mod::{fn}/use Mod::*multi-file libraries are shippable, proven, regression-locked.Remaining (distinct — issue kept open):
use Mod;+ qualified value callMod.fn(x)hits a resolution error (post-#228 qualified-value resolution is unwired; fails before codegen). This is a separate follow-up, not the emission substrate. Ledger truthed:docs/TECH-DEBT.adoc+docs/ECOSYSTEM.adocINT-01.test(xmod): INT-01 — prove + regression-lock cross-module wasm linkin…
hyperpolymath commentedon May 19, 2026
Closing as completed — the emission substrate (this issue's scope) is done, proven, and regression-locked.
PR #244 merged (
2026-05-19):lib/codegen.ml gen_importsemits real(import "Mod" "fn" (func ...))foruse Mod::{fn}/use Mod::*; two separately-compiled.wasmmodules link and execute (main()→ 42). Now guaranteed by a hermetic structural test in the gate (270 → 271) plus a reproducible Deno link+execute harness attests/modules/xmod-link/.use Mod::{fn}/use Mod::*multi-file libraries are shippable, proven, regression-locked. Ledger truthed indocs/TECH-DEBT.adoc+docs/ECOSYSTEM.adoc(INT-01).The merge check
governance / Language / package anti-pattern policyfailed on pre-existing ReScript files (packages/affine-res/,affinescriptiser/examples/) entirely outside this PR's diff (test + docs only, 0.resfiles) — baseline rot, not a PR defect; the affine oracle (build/dune test gate) was green. Admin-merged on that basis.The remaining distinct item —
use Mod;+ qualified value callMod.fn(x)failing at resolution (post-#228 qualified-value resolution unwired, fails before codegen) — is not the emission substrate and is split out to #249.feat(loader): INT-02 host-agnostic loader bridge — fix SAT-02 (Refs #179
feat(loader): INT-02 host-agnostic loader bridge — fix SAT-02 (Refs #179
feat(resolve): INT-01 — wire qualified-value path use Mod; Mod.fn(x) …
feat(resolve): INT-01 — wire qualified-value path use Mod; Mod.fn(x) …
docs(estate): #229 foundation — post-#228 re-audit, RS inventory, can…
docs(estate): #229 foundation — post-#228 re-audit, RS inventory, can…
feat(typecheck): module-qualified type/effect path resolution (ADR-014,…