next.js
9b0277f0 - Turbopack: Pass asset_suffix_path as Vc (#89899)

Commit
4 days ago
Turbopack: Pass asset_suffix_path as Vc (#89899) ## Summary - Pass `asset_suffix_path` as `Vc<Option<RcStr>>` instead of eagerly resolving it to `Option<RcStr>` in the chunking context option structs - Add filesystem cache size growth assertions to e2e tests to detect unbounded cache growth regressions ## Why Previously, `css_url_suffix` was eagerly awaited in `project.rs` before being passed into `ClientChunkingContextOptions`, `ServerChunkingContextOptions`, and `EdgeChunkingContextOptions`. This caused a new chunking context `Vc` to be created for every build, duplicating the entire build in cache and recompiling it. By keeping it as a `Vc`, the chunking context identity is stable across builds, preventing unnecessary cache duplication. ## How - Changed `css_url_suffix` field from `Option<RcStr>` to `Vc<Option<RcStr>>` in all three chunking context option structs - Removed `.owned().await?.clone()` in `project.rs` (3 call sites), passing the `Vc` directly - Added `.owned().await?` at the point of use in the 5 context builder functions - Added cache size measurements to `filesystem-cache.test.ts`: normal changes limited to 10% growth, renames allow up to 50% due to dead cache entries
Author
Parents
Loading