feat(wasm-dom): tests for context menus + scrollbars; fix clean wx build

- Standalone wx test apps (contextmenu, scrollbar) + e2e specs proving the
  wxScrollBar control, the wxScrolledWindow gutter, and DoPopupMenu.
- KiCad in-app specs: pl_editor + pcbnew canvas right-click context menus and
  scrolled-panel scrollbar gutters, with baseline screenshots.
- build-wx-wasm.sh: serial -j1 fallback when the parallel build trips the
  intermittent clean-build race (a generated header read mid-rewrite by
  concurrent compiles; never happens at -j1). Recovery resumes from built
  objects; a genuine error still fails the serial pass.
- Bump wxwidgets submodule (context menus + draggable scrollbars).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Viktor Vaczi 2026-06-13 23:15:49 +02:00
commit 68430fa87c
19 changed files with 742 additions and 3 deletions

View file

@ -188,7 +188,23 @@ fi
kw_stage wxwidgets-compile
echo ""
echo "=== Building wxWidgets (using ${JOBS} parallel jobs) ==="
emmake make -j${JOBS}
# A clean -jN build occasionally fails non-deterministically: a burst of GUI
# translation units (toplevel.cpp, dirdlgg.cpp, the generic colour/dir dialogs,
# ...) all abort at once with bogus "incomplete type 'wxBitmap'" / "wxIcon has
# no member IsOk" / "unknown type 'wxTranslations'" errors, while neighbouring
# files compile fine. It never happens at -j1 (the host default) — it's a
# parallel-build race over a generated/regenerated header (config.status can
# re-emit wx/setup.h, and emscripten warms its cache on first use), so some
# compiles read a file mid-rewrite. The same source builds cleanly on a retry.
# Rather than serialize the whole (slow) build, fall back to a serial pass only
# when the parallel one trips: it resumes from the already-built objects, so it
# just recompiles the few that lost the race. A genuine error still fails the
# -j1 pass and surfaces. (Same spirit as the serial PCRE pre-build above.)
if ! emmake make -j${JOBS}; then
echo ""
echo "=== Parallel build failed; retrying serially to clear the clean-build race ==="
emmake make -j1
fi
# Create library symlinks (remove -emscripten suffix for CMake compatibility)
echo ""