-
-
Notifications
You must be signed in to change notification settings - Fork 757
refactor: unify artifact clear logic #12677
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.
|
3c2eabc to
b04516e
Compare
Rsdoctor Bundle Diff AnalysisFound 5 projects in monorepo, 0 projects with changes. 📊 Quick Summary
Generated by Rsdoctor GitHub Action |
📦 Binary Size-limit
🎉 Size decreased by 512bytes from 47.87MB to 47.87MB (⬇️0.00%) |
b04516e to
c456fb1
Compare
c456fb1 to
8c1b704
Compare
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 artifact clearing logic to centralize it in the compilation module's build implementation, removing duplicated clearing code from individual plugins and else branches.
- Moves artifact clearing checks to a unified location before each incremental pass
- Updates plugin code to use simplified if-let chains for diagnostic handling
- Removes duplicate
clear()calls from else branches and individual plugins
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
crates/rspack_core/src/compilation/mod.rs |
Adds centralized artifact clearing checks for MODULE_IDS, CHUNK_IDS, MODULES_HASHES, CHUNKS_RUNTIME_REQUIREMENTS, CHUNKS_RENDER, and CHUNKS_HASHES passes; removes duplicate clear() calls from else branches |
crates/rspack_plugin_javascript/src/plugin/module_concatenation_plugin.rs |
Removes manual artifact clearing and simplifies diagnostic handling with chained if-let pattern |
crates/rspack_plugin_javascript/src/plugin/mangle_exports_plugin.rs |
Removes cgm_hash_artifact.clear() call and simplifies diagnostic handling |
crates/rspack_plugin_javascript/src/plugin/inline_exports_plugin.rs |
Removes commented-out artifact clearing code |
crates/rspack_plugin_javascript/src/plugin/flag_dependency_usage_plugin.rs |
Removes commented-out artifact clearing code |
crates/rspack_core/src/compilation/build_chunk_graph/code_splitter.rs |
Removes chunk_render_artifact.clear() call |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Merging this PR will not alter performanceSummary
Comparing Footnotes
|
Summary
move all artifact logic into the it's own build_artifact implementation
Related links
Checklist