Skip to content

fix!: remove deprecated readResourceForScheme hook#13027

Merged
chenjiahan merged 1 commit intomainfrom
remove_readResourceForScheme_0210
Feb 10, 2026
Merged

fix!: remove deprecated readResourceForScheme hook#13027
chenjiahan merged 1 commit intomainfrom
remove_readResourceForScheme_0210

Conversation

@chenjiahan
Copy link
Copy Markdown
Member

@chenjiahan chenjiahan commented Feb 10, 2026

Summary

Remove the NormalModule.getCompilationHooks(compilation).readResourceForScheme() hook because it was never implemented in Rspack and has been deprecated in webpack (https://github.com/webpack/webpack/blob/124ba79918269ecc6018915655c993327947ff12/lib/NormalModule.js#L289-L290).

It appears that it is not used by any popular plugins: https://github.com/search?q=readResourceForScheme&type=code

Checklist

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

Copilot AI review requested due to automatic review settings February 10, 2026 09:08
@chenjiahan chenjiahan requested a review from hardfist as a code owner February 10, 2026 09:08
@github-actions github-actions bot added release: bug fix release: bug related release(mr only) team The issue/pr is created by the member of Rspack. labels Feb 10, 2026
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

Removes the deprecated NormalModule.getCompilationHooks(compilation).readResourceForScheme() hook from Rspack’s NormalModule compilation hooks API, aligning with webpack’s deprecation and reflecting that the hook was never actually implemented in Rspack.

Changes:

  • Removed readResourceForScheme from NormalModuleCompilationHooks and from getCompilationHooks hook initialization.
  • Deleted the internal deprecation/fake-hook plumbing that only existed to support readResourceForScheme.
  • Updated the public API surface documentation (core.api.md) to remove the hook.

Reviewed changes

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

File Description
packages/rspack/src/NormalModule.ts Drops readResourceForScheme and the supporting fake/deprecation hook wrapper logic from the runtime API.
packages/rspack/etc/core.api.md Removes readResourceForScheme from the documented API surface to match the implementation change.

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

@github-actions
Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor

📦 Binary Size-limit

Comparing cd2e6d7 to refactor: wrap artifact in StealCell (#12979) by hardfist

❌ Size increased by 25.50KB from 48.65MB to 48.68MB (⬆️0.05%)

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Feb 10, 2026

Merging this PR will not alter performance

✅ 17 untouched benchmarks
⏩ 1 skipped benchmark1


Comparing remove_readResourceForScheme_0210 (cd2e6d7) with main (2865b34)

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.

@chenjiahan chenjiahan enabled auto-merge (squash) February 10, 2026 09:57
@chenjiahan chenjiahan merged commit 93fba1a into main Feb 10, 2026
85 of 87 checks passed
@chenjiahan chenjiahan deleted the remove_readResourceForScheme_0210 branch February 10, 2026 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release: bug fix release: bug related release(mr only) 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