Skip to content

Conversation

@hardfist
Copy link
Contributor

@hardfist hardfist commented Dec 27, 2025

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

  • Tests updated (or not required).
  • Documentation updated (or not required).

@netlify
Copy link

netlify bot commented Dec 27, 2025

Deploy Preview for rspack canceled.

Name Link
🔨 Latest commit 795ddda
🔍 Latest deploy log https://app.netlify.com/projects/rspack/deploys/694f6320a2379300089d65e8

@github-actions github-actions bot added release: refactor team The issue/pr is created by the member of Rspack. labels Dec 27, 2025
@github-actions
Copy link
Contributor

📦 Binary Size-limit

Comparing 795ddda to feat: mangle exports of css modules (#12563) by harpsealjs

🎉 Size decreased by 896bytes from 48.00MB to 48.00MB (⬇️0.00%)

@github-actions
Copy link
Contributor

Rsdoctor Bundle Diff Analysis

Found 5 projects in monorepo, 0 projects with changes.

📊 Quick Summary
Project Total Size Change
react-10k 5.7 MB 0
react-1k 823.4 KB 0
react-5k 2.7 MB 0
rome 984.3 KB 0
ui-components 2.1 MB 0

Generated by Rsdoctor GitHub Action

@codspeed-hq
Copy link

codspeed-hq bot commented Dec 27, 2025

CodSpeed Performance Report

Merging #12567 will not alter performance

Comparing yj/remove-option (795ddda) with main (0da6599)

Summary

✅ 16 untouched
⏩ 1 skipped1

Footnotes

  1. 1 benchmark was skipped, so the baseline result was used instead. If it was deleted from the codebase, click here and archive it to remove it from the performance reports.

@hardfist hardfist marked this pull request as ready for review December 27, 2025 04:56
Copilot AI review requested due to automatic review settings December 27, 2025 04:56
Copy link
Contributor

Copilot AI left a 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 modules field type from RollbackMap<ModuleIdentifier, Option<BoxModule>> to RollbackMap<ModuleIdentifier, BoxModule>
  • Updated all module access methods to remove unnecessary Option unwrapping
  • Replaced modules.insert(*module_id, None) with modules.remove(module_id) in revoke_module()

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@chenjiahan chenjiahan merged commit 2ca0498 into main Dec 27, 2025
64 checks passed
@chenjiahan chenjiahan deleted the yj/remove-option branch December 27, 2025 07:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release: refactor team The issue/pr is created by the member of Rspack.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants