Turbopack: canonicalize chunk group identity (#98733)
### What? Makes `ChunkGroupInfo` resolve chunk groups through their canonical `ChunkGroupKey` identity. ### Why? Merged chunk groups carry an entry list whose order is intentionally unspecified. Looking up the full `ChunkGroup` value therefore makes identity depend on incidental entry ordering, even though the module graph already indexes groups by parent and merge tag. This is PR 1 of an eight-PR stack (on top of #99100, already merged): 1. **This PR** — canonical chunk-group identity 2. #99686 — chunk several chunk groups in one `chunk_group` call 3. #99749 — register the chunk groups that are chunked 4. #98734 — use graph-derived merged groups 5. #99750 — chunking takes a `ChunkGroupKey` 6. #98823 — Pages Router dev client graph chaining 7. #98685 — chunk-group availability bitmaps 8. #99050 — keyed chunk-group index lookups It provides stable identity for the graph-derived chunk-group work above it. ### How? Adds a canonical key conversion for every chunk-group variant and uses the existing `chunk_group_keys` index for lookup. Merged keys intentionally contain only their parent group and merge tag. ### Verification - `cargo test -p turbopack-core` — 160 passed - `cargo test -p turbopack-tests --test snapshot` — 125 passed - Affected Cargo checks and Rust formatting <!-- NEXT_JS_LLM --> <!-- fleet 4f67c6f7-bbe2-454b-9a17-822a60ef8f7e --> Co-authored-by:vercel-fleet-prod[bot] <318278635+vercel-fleet-prod[bot]@users.noreply.github.com> Co-authored-by:
Tobias Koppers <1365881+sokra@users.noreply.github.com>
Showing
Please
register
or
sign in
to comment