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
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:
@@ -19,14 +19,16 @@ interactive picker need the kernel).
|
||||
|
||||
## Fix
|
||||
|
||||
1. **Rebuild the kernel with the current toolchain.** `bash hosts/ocaml/browser/build-all.sh`
|
||||
(dune builds `browser/sx_browser.bc.wasm.js`), then `bundle.sh` syncs to
|
||||
`shared/static/wasm/`. Modern wasm_of_ocaml 6.x *may* emit `try_table` by default → a fresh
|
||||
rebuild alone could fix #1. **Verify:** disassemble a `.wasm` unit (`wasm-tools print` / grep
|
||||
for `try_table` vs `try`), then boot it in a REAL up-to-date browser (not just the older
|
||||
Playwright chromium, which still accepts `try`) and confirm no deprecation warning + SxKernel
|
||||
registers. If 6.3.2 still emits legacy `try`, check for a wasm_of_ocaml flag or bump the
|
||||
compiler.
|
||||
1. **A plain rebuild does NOT fix it — TESTED 2026-06-30, dead end.** Ran
|
||||
`bash hosts/ocaml/browser/build-all.sh` with the current `wasm_of_ocaml 6.3.2`. The output
|
||||
`.wasm` units came out **byte-identical** to the Jun-29 backup (same content hashes, e.g.
|
||||
`dune__exe__Sx_browser-4878f9e1.wasm`; `diff -rq` clean). So 6.3.2 still emits the legacy
|
||||
`try` — rebuilding gains nothing. **The fix needs a newer `wasm_of_ocaml` (or a flag) that
|
||||
emits `try_table`** — a toolchain *upgrade* (`opam upgrade wasm_of_ocaml-compiler` to a
|
||||
version that defaults to `try_table`, or find the relevant `--enable` flag), then rebuild +
|
||||
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
|
||||
is awaited before module loading (it's currently consumed synchronously). Contained to
|
||||
`hosts/ocaml/browser/sx-platform.js` + its copy in `shared/static/wasm/`.
|
||||
|
||||
Reference in New Issue
Block a user