-
-
Notifications
You must be signed in to change notification settings - Fork 757
refactor: remove option for modules #12567
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 decreased by 896bytes from 48.00MB to 48.00MB (⬇️0.00%) |
Rsdoctor Bundle Diff AnalysisFound 5 projects in monorepo, 0 projects with changes. 📊 Quick Summary
Generated by Rsdoctor GitHub Action |
CodSpeed Performance ReportMerging #12567 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 module storage in ModuleGraph by removing the unnecessary Option wrapper around BoxModule. The change simplifies the code by relying on RollbackMap's native remove() method and undo mechanism instead of using Option<BoxModule> with None values to track removed modules.
- Changed
modulesfield type fromRollbackMap<ModuleIdentifier, Option<BoxModule>>toRollbackMap<ModuleIdentifier, BoxModule> - Updated all module access methods to remove unnecessary
Optionunwrapping - Replaced
modules.insert(*module_id, None)withmodules.remove(module_id)inrevoke_module()
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
remove unnecesary option for modules, the option is used before to flag a module is removed in overlay mg, but it's not needed since we already use tombstone to flag to item is removed in overlaymap https://github.com/web-infra-dev/rspack/blob/main/crates/rspack_core/src/module_graph/rollback/overlay_map.rs#L11
Related links
Checklist