refactor: use temporary data to replace unsupported Module#11652
refactor: use temporary data to replace unsupported Module#11652jerrykingxyz merged 3 commits intomainfrom
Conversation
✅ Deploy Preview for rspack canceled.
|
There was a problem hiding this comment.
Pull Request Overview
Refactors the persistent cache system by simplifying the MakeArtifactState enum and introducing temporary data alternatives to handle unsupported modules. This change removes the complex initialization state tracking and replaces it with a simpler approach using temporary placeholder types.
- Simplifies
MakeArtifactStateby removing theUninitializedvariant's parameters - Introduces
TempModuleandTempDependencyas alternatives for unsupported serialization cases - Updates the cache recovery mechanism to generate entry dependencies on-the-fly
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| crates/rspack_core/src/compilation/make/mod.rs | Removes force build dependencies and isolated modules handling from make function |
| crates/rspack_core/src/compilation/make/graph_updater/mod.rs | Removes UpdateParam variants for force build deps and isolated modules |
| crates/rspack_core/src/compilation/make/graph_updater/cutout/mod.rs | Removes handling of ForceBuildDeps and CheckIsolatedModules parameters |
| crates/rspack_core/src/compilation/make/artifact.rs | Simplifies MakeArtifactState enum by removing parameters from Uninitialized variant |
| crates/rspack_core/src/cache/persistent/occasion/make/module_graph.rs | Refactors serialization with temporary alternatives and simplifies recovery logic |
| crates/rspack_core/src/cache/persistent/occasion/make/mod.rs | Updates recovery method to return simplified tuple and create complete artifact |
| crates/rspack_core/src/cache/persistent/occasion/make/alternatives/module.rs | Adds TempModule implementation as fallback for unsupported module serialization |
| crates/rspack_core/src/cache/persistent/occasion/make/alternatives/mod.rs | Module exports for temporary alternatives |
| crates/rspack_core/src/cache/persistent/occasion/make/alternatives/dependency.rs | Adds TempDependency implementation as fallback for unsupported dependency serialization |
| crates/rspack_core/src/cache/persistent/mod.rs | Updates cache state checking to use simplified MakeArtifactState |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
📦 Binary Size-limit
❌ Size increased by 13.88KB from 47.43MB to 47.45MB (⬆️0.03%) |
e029f2a to
7886563
Compare
CodSpeed Performance ReportMerging #11652 will not alter performanceComparing 🎉 Hooray!
|
7886563 to
19874da
Compare
19874da to
84ccbbb
Compare
Summary
The persistent cache has a lot of logic when restoring to be compatible with modules that do not support serialization.
This PR will replace the module that does not support serialization with a temporary module to ensure its data integrity and no additional processing is required for alignment during recovery.
Related links
Checklist