-
-
Notifications
You must be signed in to change notification settings - Fork 757
refactor: align IncrementalPass with rspack hooks naming #12817
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
Rsdoctor Bundle Diff AnalysisFound 5 projects in monorepo, 5 projects with changes. 📊 Quick Summary
📋 Detailed Reports (Click to expand)📁 react-1kPath:
📦 Download Diff Report: react-1k Bundle Diff 📁 react-10kPath:
📦 Download Diff Report: react-10k Bundle Diff 📁 romePath:
📦 Download Diff Report: rome Bundle Diff 📁 react-5kPath:
📦 Download Diff Report: react-5k Bundle Diff 📁 ui-componentsPath:
📦 Download Diff Report: ui-components Bundle Diff Generated by Rsdoctor GitHub Action |
Deploying rspack-v2 with
|
| Latest commit: |
c0d989b
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://0e713067.rspack-v2.pages.dev |
| Branch Preview URL: | https://yj-refactor-pass.rspack-v2.pages.dev |
📦 Binary Size-limit
🎉 Size decreased by 2.38KB from 47.70MB to 47.70MB (⬇️0.00%) |
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.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d120117924
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
d120117 to
722b7f5
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 naming of IncrementalPass properties to align with rspack/webpack hooks naming conventions instead of internal artifact names. The changes provide better clarity by matching the incremental pass names with their corresponding webpack compilation lifecycle hooks.
Changes:
- Renamed five incremental pass properties:
make→buildModuleGraph,inferAsyncModules/providedExports/dependenciesDiagnostics→finishModules,sideEffects→optimizeDependencies, andchunksRender→chunkAsset - Updated all Rust code, TypeScript types, bindings, documentation, and test snapshots to use the new naming
- Added comprehensive documentation comments in Rust code linking to webpack hooks for reference
Reviewed changes
Copilot reviewed 27 out of 28 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| crates/rspack_core/src/incremental/mod.rs | Core bitflags definition with new pass names and helpful webpack hook references |
| packages/rspack/src/config/types.ts | TypeScript type definitions updated with new property names |
| packages/rspack/src/config/normalization.ts | Normalization logic updated for 'safe' preset configuration |
| packages/rspack/src/config/defaults.ts | Default values updated to use new pass names |
| website/docs/en/config/incremental.mdx | English documentation updated with new naming |
| website/docs/zh/config/incremental.mdx | Chinese documentation updated with new naming |
| crates/rspack_core/src/artifacts/*.rs | All artifact implementations updated to use new pass constants |
| crates/rspack_plugin_javascript/src/plugin/*.rs | Plugin implementations updated with new pass names and logger names |
| crates/rspack_binding_api/src/raw_options/raw_experiments/raw_incremental.rs | Binding API updated to use new field names |
| tests/rspack-test/defaultsCases/default/base.js | Test snapshot updated with new property names |
| crates/rspack/tests/snapshots/defaults__default_options.snap | Snapshot test updated |
| crates/node_binding/napi-binding.d.ts | NAPI TypeScript bindings updated |
| packages/rspack/etc/core.api.md | API documentation updated |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Merging this PR will not alter performance
Comparing Footnotes
|
Summary
some of the IncrementalPass naming according to artifact but these artifact is actually not related to rspack pass directly, so change the naming to match rspack pass(which is nearly identical to hooks name)
Related links
Checklist