Build: auto-invalidate WASM cache when island dependencies change #46
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
make distuses Docker named volumes (hero-wasm-target,hero-cargo-registry,hero-cargo-git) to cache WASM compilation. When island Cargo.toml dependencies change (e.g. addingpulldown-cmark), cargo inside the container may not detect the change and reuse stale artifacts.This caused a wasted debug cycle in Session 18 — the markdown rendering fix was compiled on the host but wasm-pack used cached old WASM.
Current workaround
docker volume rm hero-wasm-targetbeforemake distFix options
build-local.sh, hash all islandCargo.tomlfiles and compare with a stored hash in the volume. If changed, clean the volume automatically.--forceor removepkg/directories before wasm-pack runs inbuild-wasm.shhero_services/README.mdor Makefile help about the cacheOption 1 is best — automatic invalidation with no manual steps.
mik-tf referenced this issue2026-03-19 02:54:39 +00:00