-
-
Notifications
You must be signed in to change notification settings - Fork 757
refactor: make compilation readonly for module ids hook #12588
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 canceled.
|
📦 Binary Size-limit
❌ Size increased by 1.75KB from 47.85MB to 47.85MB (⬆️0.00%) |
Rsdoctor Bundle Diff AnalysisFound 5 projects in monorepo, 0 projects with changes. 📊 Quick Summary
Generated by Rsdoctor GitHub Action |
CodSpeed Performance ReportMerging #12588 will not alter performanceComparing Summary
Footnotes
|
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 PR refactors the CompilationModuleIds hook signature to accept an immutable compilation reference alongside mutable module ID artifacts and collected diagnostics, improving the API design by separating read-only and mutable concerns.
- Updated hook signature from
(&mut Compilation)to(&Compilation, &mut ModuleIdsArtifact, &mut Vec<Diagnostic>) - Modified the hook call site to extract and pass module IDs artifact and diagnostics separately
- Adapted all five module ID plugins (deterministic, natural, named, progress, rsdoctor) to the new signature
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| crates/rspack_core/src/compilation/mod.rs | Defines the new hook signature and updates the call site to extract module_ids_artifact and diagnostics before calling the hook |
| crates/rspack_ids/src/deterministic_module_ids_plugin.rs | Adapts to new hook signature, using separate parameters for compilation, module_ids, and diagnostics |
| crates/rspack_ids/src/natural_module_ids_plugin.rs | Adapts to new hook signature, using separate parameters for compilation, module_ids, and diagnostics |
| crates/rspack_ids/src/named_module_ids_plugin.rs | Adapts to new hook signature, using separate parameters for compilation, module_ids_artifact, and diagnostics |
| crates/rspack_plugin_progress/src/lib.rs | Updates hook implementation to match new signature with unused mutable parameters |
| crates/rspack_plugin_rsdoctor/src/plugin.rs | Updates hook implementation to accept separate module_ids and diagnostics parameters |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
CompilationModuleIdshook to take an immutable compilation alongside mutable module id artifacts and collected diagnostics, updating the call site accordingly.Related links
Checklist
Codex Task