pcbjam/scripts/common
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Gergő Törcsvári b5b1a0ac05
fix(wasm): dynCall signature-mismatch fallback + eeschema collab wire converters
Two things, both verified in the real web app (two-tab eeschema collab).

1. dynCall crash fix (all apps) — scripts/common/shims/dyncall-binding.js.tmpl.
   Programmatic editor edits trapped with 'indirect call signature mismatch': the
   asyncify-instrumented wasmExports[dynCall_<sig>] trampoline does call_indirect with a
   stale type for some table indices (post-asyncify+O2) even though the table entry is
   valid. Proven by patching the built js: at the trap getWasmTableEntry(index) SUCCEEDS
   where the trampoline fails. Fix: the shim now catches the 'signature mismatch'
   RuntimeError and falls back to getWasmTableEntry; the Asyncify unwind sentinel and real
   exceptions re-throw, so instrumentation/unwind is untouched for normal calls. This
   unblocks ALL programmatic edits, not just collab (e.g. eeschema SCH_ITEM::Move).

2. eeschema collab apply converters (wasm/bindings/eeschema_embind.cpp).
   doApply now handles added-item construction (build the SCH_ITEM with the delta's uuid
   via const_cast — as the s-expr parser does — + commit.Add) and richer SCH_LINE
   serialization (start/end/layer) so wire edits reconstruct on the peer. Implemented for
   SCH_LINE (wires) + SCH_JUNCTION; other types log 'no converter for added type' and are
   skipped (next batch). eeschema re-enabled in the web app collab gate.

Tests: eeschema-collab.spec snapshot (green); apply/two-tab skipped — they no-op headless
because the e2e harness's kicadOpenFile returns false (OpenProjectFiles bails before
building the connectivity graph), so SCH_COMMIT::Push doesn't persist. Verified in-app.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-05 13:56:42 +02:00
..
shims fix(wasm): dynCall signature-mismatch fallback + eeschema collab wire converters 2026-06-05 13:56:42 +02:00
apply-asyncify.sh docs: ✏️ cleanup and organize docs 2026-06-05 12:16:13 +02:00
apply-finalize.sh Fix clean build issues 2025-12-27 15:28:20 +01:00
env.sh fix(docker): Replace emsdk image with Ubuntu + emsdk from source 2026-03-19 12:44:26 +01:00
functions.sh fix(wasm): Fix asyncify rewind with asyncify-aware dynCall shims 2026-03-13 12:26:48 +01:00
get-wasm-opt.sh fix(wasm): Fix asyncify rewind with asyncify-aware dynCall shims 2026-03-13 12:26:48 +01:00
inject-dyncall-shims.sh fix(wasm): dynCall signature-mismatch fallback + eeschema collab wire converters 2026-06-05 13:56:42 +02:00
logging.sh chore: 🤖 add build monitor 2026-06-01 17:37:00 +02:00
stages.sh chore: 🤖 add build monitor 2026-06-01 17:37:00 +02:00
versions.sh fix(wasm): Fix asyncify rewind with asyncify-aware dynCall shims 2026-03-13 12:26:48 +01:00