-
-
Notifications
You must be signed in to change notification settings - Fork 754
refactor: use DerfOpt's take/replace assist artifact mutation #12659
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.
|
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 handling of build_module_graph_artifact to use the DerefOption::take() method instead of std::mem::take(), attempting to make the code more consistent with the custom DerefOption API. However, the PR introduces a critical bug in how the value is restored.
- Replaced
mem::take()withDerefOption::take()for extracting the artifact value - Attempted to use
swap()method for restoring the artifact (incorrect approach)
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
📦 Binary Size-limit
❌ Size increased by 128bytes from 47.87MB to 47.87MB (⬆️0.00%) |
Rsdoctor Bundle Diff AnalysisFound 5 projects in monorepo, 0 projects with changes. 📊 Quick Summary
Generated by Rsdoctor GitHub Action |
507c8ca to
644b566
Compare
Merging this PR will not alter performanceSummary
Comparing Footnotes
|
9099eb9 to
2a408af
Compare
2a408af to
6e1cfd2
Compare
* refactor: remove Default trait of DerefOption * refactor: `replace` is better than `insert`
Summary
Remove Default trait of DerefOption
Introduce take/replace paired API to transfer artifact in/out
Related links
Checklist