Skip to content

Conversation

@hardfist
Copy link
Contributor

@hardfist hardfist commented Jan 8, 2026

Summary

move all artifact logic into the it's own build_artifact implementation

Related links

Checklist

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

@netlify
Copy link

netlify bot commented Jan 8, 2026

Deploy Preview for rspack canceled.

Name Link
🔨 Latest commit 8c1b704
🔍 Latest deploy log https://app.netlify.com/projects/rspack/deploys/695f8b8a042da5000881bb71

@github-actions github-actions bot added release: refactor team The issue/pr is created by the member of Rspack. labels Jan 8, 2026
@hardfist hardfist force-pushed the yj/unify-artifact-clear branch from 3c2eabc to b04516e Compare January 8, 2026 10:02
@github-actions
Copy link
Contributor

github-actions bot commented Jan 8, 2026

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 825.4 KB 0
react-5k 2.7 MB 0
ui-components 2.1 MB 0
rome 984.3 KB 0

Generated by Rsdoctor GitHub Action

@github-actions
Copy link
Contributor

github-actions bot commented Jan 8, 2026

📦 Binary Size-limit

Comparing 8c1b704 to fix: incremental rebuild no code generation entry panic (#12643) by jinrui

🎉 Size decreased by 512bytes from 47.87MB to 47.87MB (⬇️0.00%)

@hardfist hardfist force-pushed the yj/unify-artifact-clear branch from b04516e to c456fb1 Compare January 8, 2026 10:39
@hardfist hardfist marked this pull request as ready for review January 8, 2026 10:47
Copilot AI review requested due to automatic review settings January 8, 2026 10:47
@hardfist hardfist force-pushed the yj/unify-artifact-clear branch from c456fb1 to 8c1b704 Compare January 8, 2026 10:48
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 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.

@codspeed-hq
Copy link

codspeed-hq bot commented Jan 8, 2026

Merging this PR will not alter performance

Summary

✅ 16 untouched benchmarks
⏩ 1 skipped benchmark1


Comparing yj/unify-artifact-clear (8c1b704) with main (2feb455)

Open in CodSpeed

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 enabled auto-merge (squash) January 8, 2026 11:05
@hardfist hardfist merged commit 70ffab9 into main Jan 8, 2026
52 checks passed
@hardfist hardfist deleted the yj/unify-artifact-clear branch January 8, 2026 11:12
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