fix: cache concatenated module imports is not safe#11385
Conversation
✅ Deploy Preview for rspack canceled.
|
📦 Binary Size-limit
❌ Size increased by 1.75KB from 47.58MB to 47.59MB (⬆️0.00%) |
095a016 to
bb8fdd8
Compare
There was a problem hiding this comment.
Pull Request Overview
This PR fixes a caching issue for concatenated module imports by ensuring runtime context is included in the cache key. Previously, concatenated module imports were cached without considering the runtime, which could lead to incorrect cache hits when the same module is used in different runtime contexts.
- Updates the cache key for concatenated module entries to include runtime information
- Refactors the caching mechanism from module imports to module entries
- Adds
Clonetrait to concatenation entry types to support the new caching approach
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| crates/rspack_core/src/concatenated_module.rs | Updates cache key to include runtime, refactors concatenation entry types, and removes nested caching |
| crates/rspack_core/src/artifacts/module_graph_cache_artifact.rs | Renames and restructures cache from imports to entries with runtime-aware keys |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
CodSpeed Performance ReportMerging #11385 will not alter performanceComparing 🎉 Hooray!
|
Summary
concatenated module imports are related to runtime, should add it to cache key
Related links
Checklist