Skip to content

Conversation

@hardfist
Copy link
Contributor

Summary

  • allow the CompilationModuleIds hook to take an immutable compilation alongside mutable module id artifacts and collected diagnostics, updating the call site accordingly.
  • adjust module id plugins (deterministic, natural, named, progress, rsdoctor) to the new hook signature and diagnostic handling.

Related links

  • N/A

Checklist

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

Codex Task

@netlify
Copy link

netlify bot commented Dec 30, 2025

Deploy Preview for rspack canceled.

Name Link
🔨 Latest commit 092a68c
🔍 Latest deploy log https://app.netlify.com/projects/rspack/deploys/6953b482da2e5a000883c547

@github-actions github-actions bot added team The issue/pr is created by the member of Rspack. release: refactor labels Dec 30, 2025
@github-actions
Copy link
Contributor

📦 Binary Size-limit

Comparing 092a68c to fix: remove error log while lazy compilation can't find module to invildate (#12566) by pshu

❌ Size increased by 1.75KB from 47.85MB to 47.85MB (⬆️0.00%)

@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 823.4 KB 0
react-5k 2.7 MB 0
rome 984.4 KB 0
ui-components 2.1 MB 0

Generated by Rsdoctor GitHub Action

@codspeed-hq
Copy link

codspeed-hq bot commented Dec 30, 2025

CodSpeed Performance Report

Merging #12588 will not alter performance

Comparing codex/change-mut-to-for-module_ids-hooks (092a68c) with main (4497ff2)

Summary

✅ 16 untouched
⏩ 1 skipped1

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 marked this pull request as ready for review December 30, 2025 11:47
Copilot AI review requested due to automatic review settings December 30, 2025 11:47
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 CompilationModuleIds hook signature to accept an immutable compilation reference alongside mutable module ID artifacts and collected diagnostics, improving the API design by separating read-only and mutable concerns.

  • Updated hook signature from (&mut Compilation) to (&Compilation, &mut ModuleIdsArtifact, &mut Vec<Diagnostic>)
  • Modified the hook call site to extract and pass module IDs artifact and diagnostics separately
  • Adapted all five module ID plugins (deterministic, natural, named, progress, rsdoctor) to the new signature

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
crates/rspack_core/src/compilation/mod.rs Defines the new hook signature and updates the call site to extract module_ids_artifact and diagnostics before calling the hook
crates/rspack_ids/src/deterministic_module_ids_plugin.rs Adapts to new hook signature, using separate parameters for compilation, module_ids, and diagnostics
crates/rspack_ids/src/natural_module_ids_plugin.rs Adapts to new hook signature, using separate parameters for compilation, module_ids, and diagnostics
crates/rspack_ids/src/named_module_ids_plugin.rs Adapts to new hook signature, using separate parameters for compilation, module_ids_artifact, and diagnostics
crates/rspack_plugin_progress/src/lib.rs Updates hook implementation to match new signature with unused mutable parameters
crates/rspack_plugin_rsdoctor/src/plugin.rs Updates hook implementation to accept separate module_ids and diagnostics parameters

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

@hardfist hardfist enabled auto-merge (squash) December 31, 2025 02:34
@hardfist hardfist changed the title refactor: update module ids hook signature refactor: make compilation readonly for module ids hook Dec 31, 2025
@hardfist hardfist merged commit 01555bf into main Dec 31, 2025
64 checks passed
@hardfist hardfist deleted the codex/change-mut-to-for-module_ids-hooks branch December 31, 2025 02:35
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.

3 participants