Commit256bcb33Recorded11 Jun 2026Repositorysigil-site
Bundle the REPL's own lib last so it wins conflicts
Message
generate-web-bundle lets later dirs override earlier ones, but the bundle assembly put the freshly built REPL lib first and the peer example libs after it. A stale peer build could therefore override core/stdlib bytecode: sigil-sxml's old dev lib shipped a v7 sigil/core.sgb over the REPL's v9 one and broke the live REPL with 'unsupported bytecode version 7 (expected 9)'. Peers now merge first and the REPL lib last.
Changed
publish.sh | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)Diff
publish.shmodified
@@ -353,14 +353,20 @@ REDIR_EOF
353
echo " Copying WASM artifacts..." 354
cp "$REPL_BUILD/sigil-web-repl.wasm" "$SCRIPT_DIR/assets/repl/" 355
−356
# Generate merged lib.bundle (web-repl modules + extras for REPL examples)−357
BUNDLE_DIRS="\"$REPL_BUILD/lib\""+356
# Generate merged lib.bundle (web-repl modules + extras for REPL examples).+357
# generate-web-bundle lets LATER dirs override earlier ones, so the+358
# REPL's own lib goes last: it is the coherent, freshly built set,+359
# and a stale peer build must never override its core/stdlib+360
# bytecode (a v7 sigil/core.sgb from an old sigil-sxml build once+361
# shipped over the fresh v9 one and broke the live REPL).+362
BUNDLE_DIRS="" 363
for peer in sigil-sxml sigil-match; do 364
if [[ -d "$PARENT_DIR/$peer/build/dev/lib" ]]; then 365
echo " Adding modules from $peer..." 366
BUNDLE_DIRS="$BUNDLE_DIRS \"$PARENT_DIR/$peer/build/dev/lib\"" 367
fi 368
done+369
BUNDLE_DIRS="$BUNDLE_DIRS \"$REPL_BUILD/lib\"" 370
371
echo " Generating lib.bundle..." 372
$SIGIL eval "(import (sigil build))