fix: compare async block values in code splitting cache - #14904
Conversation
📦 Binary Size-limit
⏳ The base commit triggered a linux binding build, but its binary size data has not been generated yet, so the size comparison is skipped. Please re-run this workflow once the ecosystem-benchmark data for that commit is published. Warning Reference only — not the real baseline. The base commit's data isn't ready yet, so this compares against the nearest earlier commit that has data ( ❌ Size increased by 28.00KB from 66.71MB to 66.74MB (⬆️0.04%) |
Rsdoctor Bundle Diff AnalysisFound 5 projects in monorepo, 0 projects with changes. 📊 Quick Summary
Generated by Rsdoctor GitHub Action |
Merging this PR will not alter performance
Comparing Footnotes
|
Summary
AsyncDependenciesBlockIdentifierfrom the parent module and the block's module-local indexWhy
Async block identity previously included dependency resource data and source location. A loc-only edit could therefore change the block key even when its code-splitting topology was unchanged.
Identity is now a stable module-local slot used for graph lookup. Cache reuse is decided separately from the block's code-splitting value. When the value is unchanged, the cached chunk graph is reused and its origin
module,loc, andrequestare updated. When a block points to different modules or changes its group/runtime behavior, the chunk graph is rebuilt.This keeps loc-only rebuilds on the fast path without allowing stale chunk topology or origin metadata.
Validation
corepack pnpm run build:jscorepack pnpm run build:binding:devcargo clippy -p rspack_core --lib -- -D warningscargo fmt --all --checkcorepack pnpm run test:base -t "watchCases/build-chunk-graph/async-block-value"corepack pnpm run test:base -t "watchCases/build-chunk-graph/skip-building-chunk-graph"