Repository navigation
v2.17.1
Patch Notes — v2.17.1
Improvements
WASM cache — per-symbol hashing replaces whole-file hashing
Files: pkg/helpers/wasm/wasm_cache.go, pkg/helpers/wasm/wasm_scan.go, pkg/helpers/wasm/wasm.go
The WASM cache now hashes only the specific declarations that each page's ClientSideState actually uses, rather than every non-generated .go file in the package. This eliminates spurious rebuilds when unrelated code in the same package changes.
Before (v2.17.0): changing any symbol in state.go would rebuild the WASM for every page in the package, even pages that don't use the changed symbol.
After (v2.17.1-beta.1): only pages that directly use the changed declaration are rebuilt.
// state.go
const CounterStep = 5 // ← change this → only /counter rebuilds
const UnusedValue = 42 // ← change this → no rebuilds at all
How it works: ExtractUsedHelpers already returned the exact []ast.Decl nodes each page uses. These are now serialised via go/format, sorted for determinism, and stored on WasmPage.UsedDeclSources. The cache hashes those source strings instead of whole files.
Cache Phase B (external local package hashing, added in v2.17.0) is unchanged — it still hashes whole files for imported packages, which is correct because the per-symbol extraction only operates on same-package helpers.