Conversation
✅ Deploy Preview for rspack canceled.
|
📦 Binary Size-limit
❌ Size increased by 2.50KB from 47.45MB to 47.45MB (⬆️0.01%) |
CodSpeed Performance ReportMerging #12186 will not alter performanceComparing Summary
|
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the compilation process by splitting the "make" phase into two distinct phases: build_module_graph (which builds the module graph) and collect_build_module_graph_effects (which collects diagnostics and mutations). This separation provides clearer semantics and prevents artifact overlap.
Key changes:
- Renamed
make()tobuild_module_graph()andfinish()tofinish_build_module_graph() - Introduced new
collect_build_module_graph_effects()phase for collecting diagnostics and mutations - Renamed
MakeArtifacttoBuildModuleGraphArtifactthroughout the codebase
Reviewed Changes
Copilot reviewed 25 out of 34 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
crates/rspack_core/src/compiler/mod.rs |
Splits compile flow into build_module_graph() and adds collect_build_module_graph_effects() call |
crates/rspack_core/src/compiler/rebuild.rs |
Updates references to renamed artifact swap method |
crates/rspack_core/src/compilation/mod.rs |
Renames methods and artifact type, splits finish logic into two phases |
crates/rspack_core/src/compilation/build_module_graph/* |
Module renamed from make with all internal types and functions updated |
crates/rspack_core/src/cache/* |
Updates cache trait methods to use new artifact type and naming |
crates/rspack_plugin_library/src/modern_module_library_plugin.rs |
Updates artifact field reference |
crates/rspack_core/src/stats/mod.rs |
Updates import path and artifact field reference |
crates/rspack_core/src/lib.rs |
Updates public exports from renamed module |
crates/rspack_binding_api/src/compilation/mod.rs |
Updates artifact field reference in JS bindings |
xtask/benchmark/benches/groups/build_chunk_graph.rs |
Updates benchmark to use new method names |
Comments suppressed due to low confidence (7)
crates/rspack_core/src/compilation/build_module_graph/module_executor/mod.rs:37
- The field name
make_artifactis inconsistent with the typeBuildModuleGraphArtifact. Consider renaming the field tobuild_module_graph_artifactfor consistency and clarity throughout the struct.
crates/rspack_core/src/compilation/build_module_graph/mod.rs:59 - The comment still refers to "make stage" but should be updated to "build_module_graph stage" or "build module graph stage" to match the new naming convention.
crates/rspack_core/src/compilation/build_module_graph/mod.rs:21 - The comment still refers to "make phase" but should be updated to "build_module_graph phase" or "build module graph phase" to match the new naming convention.
crates/rspack_core/src/compilation/build_module_graph/artifact.rs:26 - The comment refers to "Make Artifact" in the description but should be updated to "Build Module Graph Artifact" for consistency with the renamed type.
crates/rspack_core/src/compilation/build_module_graph/artifact.rs:17 - The comment still refers to "Make stage" but should be updated to "BuildModuleGraph stage" or "build module graph stage" to match the new naming convention.
crates/rspack_core/src/compilation/build_module_graph/mod.rs:61 - The comment references "make and finish_make" which should be updated to "build_module_graph and finish_build_module_graph" to match the new naming convention.
crates/rspack_core/src/compilation/build_module_graph/graph_updater/cutout/mod.rs:159 - The comment reference to "MakeArtifact" should be updated to "BuildModuleGraphArtifact" for consistency.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
| Ok(()) | ||
| } | ||
|
|
||
| #[instrument("Compiler:compile", target=TRACING_BENCH_TARGET,skip_all)] |
There was a problem hiding this comment.
Should we add the instrument back?
Summary
split make phase into build_module_graph and collect_build_module_graph_effects phase which makes artifacts no overlap and has more accurate meaning
Followup:
Related links
Checklist