Reproduction
Repository: https://github.com/hardfist/rspack-persistent-cache-make-recovery-repro
This is a Node-level repro using the public @rspack/core compiler API. It pins the latest published package at the time of filing, @rspack/core@2.1.4; it does not build or call Rspack's Rust crates.
Run:
The script creates a real filesystem persistent cache, corrupts the first value in occasion_make_module_graph/0.pack, recomputes that pack's integrity hash, and starts a fresh Rspack process against the cache.
On @rspack/core@2.1.4, the child aborts with:
unexpected module graph deserialize failed
The parent reports BUG REPRODUCED and exits 0.
Expected behavior
A malformed persistent-cache entry should return a recovery error so the cache context can invalidate/reset that scope. It should not abort the process.
Environment
@rspack/core@2.1.4
- Node.js 24.16.0
- macOS arm64
Reproduction
Repository: https://github.com/hardfist/rspack-persistent-cache-make-recovery-repro
This is a Node-level repro using the public
@rspack/corecompiler API. It pins the latest published package at the time of filing,@rspack/core@2.1.4; it does not build or call Rspack's Rust crates.Run:
The script creates a real filesystem persistent cache, corrupts the first value in
occasion_make_module_graph/0.pack, recomputes that pack's integrity hash, and starts a fresh Rspack process against the cache.On
@rspack/core@2.1.4, the child aborts with:The parent reports
BUG REPRODUCEDand exits 0.Expected behavior
A malformed persistent-cache entry should return a recovery error so the cache context can invalidate/reset that scope. It should not abort the process.
Environment
@rspack/core@2.1.4