Skip to content

refactor: move build_chunk_graph result to build_chunk_graph_artifact#12917

Merged
hardfist merged 5 commits intomainfrom
codex/merge-data-in-compilation-and-buildchunkgraphartifact
Feb 5, 2026
Merged

refactor: move build_chunk_graph result to build_chunk_graph_artifact#12917
hardfist merged 5 commits intomainfrom
codex/merge-data-in-compilation-and-buildchunkgraphartifact

Conversation

@hardfist
Copy link
Contributor

@hardfist hardfist commented Feb 3, 2026

migrate all related compilation.xxx about chunk_graph into chunk_graph_artifact

@github-actions github-actions bot added the team The issue/pr is created by the member of Rspack. label Feb 3, 2026
@hardfist hardfist changed the title Codex-generated pull request refactor: remove duplicate clone of build_chunk_graph_artifact Feb 3, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Feb 3, 2026

Rsdoctor Bundle Diff Analysis

Found 5 projects in monorepo, 5 projects with changes.

📊 Quick Summary
Project Total Size Change
react-10k 5.7 MB -
react-1k 825.4 KB -
react-5k 2.7 MB -
rome 984.2 KB -
ui-components 2.2 MB -
📋 Detailed Reports (Click to expand)

📁 react-10k

Path: ../build-tools-performance/cases/react-10k/dist/rsdoctor-data.json

⚠️ No baseline data found - Unable to perform comparison analysis

Metric Current Baseline Change
📊 Total Size 5.7 MB - -
📄 JavaScript 5.7 MB - -
🎨 CSS 21.0 B - -
🌐 HTML 0 B - -
📁 Other Assets 0 B - -

📁 react-1k

Path: ../build-tools-performance/cases/react-1k/dist/rsdoctor-data.json

⚠️ No baseline data found - Unable to perform comparison analysis

Metric Current Baseline Change
📊 Total Size 825.4 KB - -
📄 JavaScript 825.4 KB - -
🎨 CSS 0 B - -
🌐 HTML 0 B - -
📁 Other Assets 0 B - -

📁 react-5k

Path: ../build-tools-performance/cases/react-5k/dist/rsdoctor-data.json

⚠️ No baseline data found - Unable to perform comparison analysis

Metric Current Baseline Change
📊 Total Size 2.7 MB - -
📄 JavaScript 2.7 MB - -
🎨 CSS 21.0 B - -
🌐 HTML 0 B - -
📁 Other Assets 0 B - -

📁 rome

Path: ../build-tools-performance/cases/rome/dist/rsdoctor-data.json

⚠️ No baseline data found - Unable to perform comparison analysis

Metric Current Baseline Change
📊 Total Size 984.2 KB - -
📄 JavaScript 984.2 KB - -
🎨 CSS 0 B - -
🌐 HTML 0 B - -
📁 Other Assets 0 B - -

📁 ui-components

Path: ../build-tools-performance/cases/ui-components/dist/rsdoctor-data.json

⚠️ No baseline data found - Unable to perform comparison analysis

Metric Current Baseline Change
📊 Total Size 2.2 MB - -
📄 JavaScript 2.0 MB - -
🎨 CSS 267.8 KB - -
🌐 HTML 0 B - -
📁 Other Assets 0 B - -

Generated by Rsdoctor GitHub Action

@github-actions
Copy link
Contributor

github-actions bot commented Feb 3, 2026

📦 Binary Size-limit

Comparing dbeb5e2 to chore(build): remove 'module.exports' export from dts for backward compatibility of TS < 5.6.2 (#12948) by Timeless0911

🎉 Size decreased by 1.38KB from 48.55MB to 48.55MB (⬇️0.00%)

@hardfist
Copy link
Contributor Author

hardfist commented Feb 3, 2026

@codex review

@codspeed-hq
Copy link

codspeed-hq bot commented Feb 3, 2026

Merging this PR will not alter performance

✅ 16 untouched benchmarks
⏩ 1 skipped benchmark1


Comparing codex/merge-data-in-compilation-and-buildchunkgraphartifact (dbeb5e2) with main (d97104c)

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.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f285a06463

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Feb 4, 2026

Deploying rspack with  Cloudflare Pages  Cloudflare Pages

Latest commit: da45a43
Status: ✅  Deploy successful!
Preview URL: https://01ffdd9d.rspack-v2.pages.dev
Branch Preview URL: https://codex-merge-data-in-compilat.rspack-v2.pages.dev

View logs

@hardfist hardfist force-pushed the codex/merge-data-in-compilation-and-buildchunkgraphartifact branch from ed9431c to b8be8be Compare February 4, 2026 12:14
@hardfist
Copy link
Contributor Author

hardfist commented Feb 5, 2026

@claude review

@hardfist
Copy link
Contributor Author

hardfist commented Feb 5, 2026

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b8be8be692

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@hardfist
Copy link
Contributor Author

hardfist commented Feb 5, 2026

@codex review

@chatgpt-codex-connector
Copy link

Codex Review: Didn't find any major issues. You're on a roll.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@hardfist hardfist changed the title refactor: remove duplicate clone of build_chunk_graph_artifact refactor: move build_chunk_graph result to build_chunk_graph_artifact Feb 5, 2026
@hardfist hardfist marked this pull request as ready for review February 5, 2026 09:20
Copilot AI review requested due to automatic review settings February 5, 2026 09:21
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 build chunk graph implementation by consolidating chunk graph-related data structures (chunk_by_ukey, chunk_graph, chunk_group_by_ukey, entrypoints, async_entrypoints, named_chunks, named_chunk_groups) from directly on the Compilation struct into a BuildChunkGraphArtifact struct. This change aims to improve code organization and enable better incremental caching by treating the chunk graph as a cohesive artifact that can be recovered and cloned as a unit.

Changes:

  • Moved 7 chunk graph-related fields from Compilation to BuildChunkGraphArtifact
  • Updated ~150+ files across the codebase to access these fields via compilation.build_chunk_graph_artifact.*
  • Enhanced the memory cache to properly snapshot and recover the BuildChunkGraphArtifact
  • Changed PassExt::after_pass signature from &Compilation to &mut Compilation to support cache operations

Reviewed changes

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

Show a summary per file
File Description
crates/rspack_core/src/artifacts/build_chunk_graph_artifact.rs Restructured artifact to include chunk graph fields directly; added recovery logic
crates/rspack_core/src/compilation/mod.rs Removed 7 chunk graph fields from Compilation struct; updated accessor methods
crates/rspack_core/src/cache/memory.rs Added snapshot mechanism for build_chunk_graph_artifact to support incremental rebuilds
crates/rspack_core/src/compilation/pass.rs Changed after_pass to take mutable compilation reference
All other files Updated field accesses from compilation.X to compilation.build_chunk_graph_artifact.X

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

@hardfist hardfist merged commit d440f8a into main Feb 5, 2026
47 of 50 checks passed
@hardfist hardfist deleted the codex/merge-data-in-compilation-and-buildchunkgraphartifact branch February 5, 2026 10:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

codex 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.

2 participants