Skip to content

refactor: move exports info out of module graph#13055

Merged
hardfist merged 4 commits intomainfrom
split-exports-info
Feb 14, 2026
Merged

refactor: move exports info out of module graph#13055
hardfist merged 4 commits intomainfrom
split-exports-info

Conversation

@ahabhgk
Copy link
Contributor

@ahabhgk ahabhgk commented Feb 13, 2026

Summary

Move exports info out of module graph

Remaining todo: currently ExportsInfoArtifact::Pass is BUILD_MODULE_GRAPH, because it's initialized at module factorize, we may consider move it to FINISH_MODULES and initilizing at finish_modules pass (which is a breaking change) in the future PR

Related links

Checklist

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

Copilot AI review requested due to automatic review settings February 13, 2026 05:10
Copy link
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

This PR refactors the codebase to separate exports information from the module graph by introducing a new ExportsInfoArtifact. The refactoring moves exports-related data and operations out of the ModuleGraph into a dedicated artifact, improving separation of concerns and enabling better incremental compilation support.

Changes:

  • Introduces ExportsInfoArtifact to manage exports information separately from the module graph
  • Updates compilation hooks and plugin interfaces to pass the new artifact
  • Refactors module graph to remove exports info storage and operations
  • Updates all plugins and dependencies to use the new artifact structure

Reviewed changes

Copilot reviewed 124 out of 124 changed files in this pull request and generated no comments.

Show a summary per file
File Description
crates/rspack_core/src/artifacts/exports_info_artifact.rs New artifact implementation managing exports information
crates/rspack_core/src/module_graph/mod.rs Removed exports info storage and related methods
crates/rspack_core/src/module_graph/module.rs Removed exports field from ModuleGraphModule
crates/rspack_core/src/module_graph/exports_info.rs Deleted file - functionality moved to artifact
crates/rspack_core/src/compilation/mod.rs Added exports_info_artifact field and helper methods
crates/rspack_core/src/compilation/optimize_dependencies/mod.rs Updated to steal and restore exports info artifact
crates/rspack_core/src/compilation/finish_modules/mod.rs Split into separate pass with artifact checkpointing
crates/rspack_core/src/compilation/build_module_graph/* Updated graph building to create and manage exports info
crates/rspack_plugin_*/ Updated all plugins to accept and use ExportsInfoArtifact
crates/rspack_core/src/exports/*.rs Updated target resolution and export info operations
crates/rspack_core/src/cache/*.rs Updated cache implementations for new artifact

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ahabhgk ahabhgk changed the title refactor: split exports info out of module graph refactor: move exports info out of module graph Feb 13, 2026
@ahabhgk ahabhgk requested a review from hardfist February 13, 2026 09:47
@github-actions
Copy link
Contributor

Rsdoctor Bundle Diff Analysis

Found 5 projects in monorepo, 0 projects with changes.

📊 Quick Summary
Project Total Size Change
react-10k 5.7 MB 0
react-1k 825.4 KB 0
react-5k 2.7 MB 0
rome 984.2 KB 0
ui-components 2.2 MB 0

Generated by Rsdoctor GitHub Action

@github-actions
Copy link
Contributor

📦 Binary Size-limit

Comparing 704dcc4 to feat(progress-plugin)!: replace handler rest args with structured info object (#13049) by neverland

❌ Size increased by 35.88KB from 48.68MB to 48.72MB (⬆️0.07%)

@codspeed-hq
Copy link

codspeed-hq bot commented Feb 13, 2026

Merging this PR will not alter performance

✅ 17 untouched benchmarks
⏩ 1 skipped benchmark1


Comparing split-exports-info (704dcc4) with main (6d6c47a)

Open in CodSpeed

Footnotes

  1. 1 benchmark was skipped, so the baseline result was used instead. If it was deleted from the codebase, click here and archive it to remove it from the performance reports.

@hardfist hardfist merged commit 0570e64 into main Feb 14, 2026
49 checks passed
@hardfist hardfist deleted the split-exports-info branch February 14, 2026 03:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants