-
-
Notifications
You must be signed in to change notification settings - Fork 757
fix: make splitChunks more stable #12410
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
✅ Deploy Preview for rspack ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
📝 Benchmark detail: Open
Threshold exceeded: ["arco-pro_production-mode_persistent-hot + exec"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request addresses potential instability issues in the SplitChunksPlugin that could cause inconsistent output during incremental rebuilds. The changes focus on ensuring deterministic behavior by introducing stable key generation, sorting collections before iteration, and using content-based hashing instead of potentially unstable identifiers.
Key changes:
- Introduced stable chunk identifier computation based on chunk names and runtime information
- Added sorting to all collection iterations to ensure deterministic processing order
- Replaced local hash caching with shared, thread-safe caching using DashMap
- Generated stable keys for module groups and chunk combinations using sorted, content-based hashing
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
crates/rspack_plugin_split_chunks/src/plugin/module_group.rs |
Added stable chunk ID mapping, stable key generation and caching, sorting of module groups and invalid group keys, and tie-breaker logic for deterministic module group selection |
crates/rspack_plugin_split_chunks/src/plugin/mod.rs |
Added sorting of modules before processing to ensure deterministic order |
crates/rspack_plugin_split_chunks/src/plugin/max_size.rs |
Introduced generate_stable_key method for deterministic group naming, updated sorting to use stable keys instead of first node's key |
crates/rspack_ids/src/named_chunk_ids_plugin.rs |
Added sorting of name-to-items map before processing to ensure deterministic chunk ID assignment |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Rsdoctor Bundle Diff AnalysisFound 5 project(s) in monorepo. 📁 react-10kPath:
📦 Download Diff Report: react-10k Bundle Diff 📁 react-1kPath:
📦 Download Diff Report: react-1k Bundle Diff 📁 react-5kPath:
📦 Download Diff Report: react-5k Bundle Diff 📁 ui-componentsPath:
📦 Download Diff Report: ui-components Bundle Diff 📁 romePath:
📦 Download Diff Report: rome Bundle Diff Generated by Rsdoctor GitHub Action |
📦 Binary Size-limit
❌ Size increased by 27.00KB from 48.19MB to 48.21MB (⬆️0.05%) |
CodSpeed Performance ReportMerging #12410 will not alter performanceComparing Summary
|
b2f537b to
c41c08c
Compare
c41c08c to
c5ec153
Compare
|
📝 Benchmark detail: Open
|
Summary
I found some potential vulnerabilities of
SplitChunksPlugin, this can make output inconsistent during incremental rebuild.Related links
Checklist