Skip to content

refactor: use temporary data to replace unsupported Module#11652

Merged
jerrykingxyz merged 3 commits intomainfrom
jerry/pc
Sep 12, 2025
Merged

refactor: use temporary data to replace unsupported Module#11652
jerrykingxyz merged 3 commits intomainfrom
jerry/pc

Conversation

@jerrykingxyz
Copy link
Copy Markdown
Contributor

@jerrykingxyz jerrykingxyz commented Sep 12, 2025

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

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

Copilot AI review requested due to automatic review settings September 12, 2025 07:21
@netlify
Copy link
Copy Markdown

netlify bot commented Sep 12, 2025

Deploy Preview for rspack canceled.

Name Link
🔨 Latest commit 84ccbbb
🔍 Latest deploy log https://app.netlify.com/projects/rspack/deploys/68c3d53e530907000892f6fb

@github-actions github-actions bot added release: refactor team The issue/pr is created by the member of Rspack. labels Sep 12, 2025
Copy link
Copy Markdown
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

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 MakeArtifactState by removing the Uninitialized variant's parameters
  • Introduces TempModule and TempDependency as 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.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Sep 12, 2025

📦 Binary Size-limit

Comparing 84ccbbb to perf: introduce pre-computed hashing for ArcPath (#11651) by Cong-Cong Pan

❌ Size increased by 13.88KB from 47.43MB to 47.45MB (⬆️0.03%)

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Sep 12, 2025

CodSpeed Performance Report

Merging #11652 will not alter performance

Comparing jerry/pc (84ccbbb) with main (cf49fa2)

🎉 Hooray! codspeed-rust just leveled up to 2.7.2!

A heads-up, this is a breaking change and it might affect your current performance baseline a bit. But here's the exciting part - it's packed with new, cool features and promises improved result stability 🥳!
Curious about what's new? Visit our releases page to delve into all the awesome details about this new version.

Summary

✅ 17 untouched

@jerrykingxyz jerrykingxyz merged commit bbe54ce into main Sep 12, 2025
68 of 70 checks passed
@jerrykingxyz jerrykingxyz deleted the jerry/pc branch September 12, 2025 08:42
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