Commit53445b23Recorded12 Jun 2026Repositorysigil-site

Clean the REPL web build before bundling

Message

The bundle step globs everything under the REPL's build/web/lib, and the REPL build is incremental, so modules orphaned by dependency or toolchain changes survive rebuilds indefinitely. Seven March-era v7 modules (match, sxml, fn, format, seq, sxml/reader, srfi-9) rode along this way and broke the match/sxml REPL examples on the live site after the rest of the bundle moved to v9. Remove build/web before building so the bundle only ever contains what the current build produces.

Changed
 publish.sh | 6 ++++++
 1 file changed, 6 insertions(+)
Diff
publish.shmodified
@@ -329,6 +329,12 @@ if [[ "$WITH_REPL" == "true" ]]; then
329
REPL_SRC="$PARENT_DIR/sigil-web-repl"
330
cd "$REPL_SRC"
331
+332
# Clean build: the bundle step globs everything under build/web/lib,
+333
# so orphaned modules from older builds survive incremental rebuilds
+334
# and ship stale bytecode (March-era v7 match/sxml modules rode along
+335
# this way and broke those REPL examples on the live site).
+336
rm -rf build/web
+337
338
# Install deps or use redirects to local monorepo
339
if [[ -d "$PARENT_DIR/sigil" ]]; then
340
REDIR_FILE=$(mktemp)