note: rebuild does NOT fix the WASM 'try' deprecation (tested) — needs toolchain upgrade
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 43s

Ran build-all.sh with wasm_of_ocaml 6.3.2: output .wasm units came out byte-identical to
the Jun-29 backup (same hashes, diff -rq clean), so 6.3.2 still emits legacy 'try'. A plain
rebuild is a dead end; the fix needs a newer wasm_of_ocaml (or flag) that emits try_table.
No harm done — deployed artifacts unchanged, live SPA intact. apt wabt/wasm2wat can't read
these wasm-GC binaries (0x5e); need wasm-tools or a real-browser check.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-30 15:51:44 +00:00
parent 7fc67497c4
commit 7d07ac7e4a

View File

@@ -19,14 +19,16 @@ interactive picker need the kernel).
## Fix ## Fix
1. **Rebuild the kernel with the current toolchain.** `bash hosts/ocaml/browser/build-all.sh` 1. **A plain rebuild does NOT fix it — TESTED 2026-06-30, dead end.** Ran
(dune builds `browser/sx_browser.bc.wasm.js`), then `bundle.sh` syncs to `bash hosts/ocaml/browser/build-all.sh` with the current `wasm_of_ocaml 6.3.2`. The output
`shared/static/wasm/`. Modern wasm_of_ocaml 6.x *may* emit `try_table` by default → a fresh `.wasm` units came out **byte-identical** to the Jun-29 backup (same content hashes, e.g.
rebuild alone could fix #1. **Verify:** disassemble a `.wasm` unit (`wasm-tools print` / grep `dune__exe__Sx_browser-4878f9e1.wasm`; `diff -rq` clean). So 6.3.2 still emits the legacy
for `try_table` vs `try`), then boot it in a REAL up-to-date browser (not just the older `try` — rebuilding gains nothing. **The fix needs a newer `wasm_of_ocaml` (or a flag) that
Playwright chromium, which still accepts `try`) and confirm no deprecation warning + SxKernel emits `try_table`** — a toolchain *upgrade* (`opam upgrade wasm_of_ocaml-compiler` to a
registers. If 6.3.2 still emits legacy `try`, check for a wasm_of_ocaml flag or bump the version that defaults to `try_table`, or find the relevant `--enable` flag), then rebuild +
compiler. verify. (Disassembly check note: apt's `wasm2wat`/wabt is too old for these wasm-GC binaries —
`error: unexpected type form (got 0x5e)`; need `wasm-tools` for wasm-GC, or verify in a real
up-to-date browser. Playwright's older chromium still accepts `try`, so it won't tell you.)
2. **`loadManifest` → async.** Change to an async fetch and restructure the boot so the manifest 2. **`loadManifest` → async.** Change to an async fetch and restructure the boot so the manifest
is awaited before module loading (it's currently consumed synchronously). Contained to is awaited before module loading (it's currently consumed synchronously). Contained to
`hosts/ocaml/browser/sx-platform.js` + its copy in `shared/static/wasm/`. `hosts/ocaml/browser/sx-platform.js` + its copy in `shared/static/wasm/`.