Skip to content

Conversation

@chenjiahan
Copy link
Member

Summary

This PR introduces a deprecate() helper to improve deprecation warning messages.

Before

Screenshot 2025-12-22 at 17 09 58

After

Screenshot 2025-12-22 at 17 35 33

Checklist

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

@chenjiahan chenjiahan requested a review from hardfist as a code owner December 22, 2025 10:34
Copilot AI review requested due to automatic review settings December 22, 2025 10:34
@netlify
Copy link

netlify bot commented Dec 22, 2025

Deploy Preview for rspack canceled.

Name Link
🔨 Latest commit ce12eb6
🔍 Latest deploy log https://app.netlify.com/projects/rspack/deploys/69491ed2b870b20008ec6384

@github-actions github-actions bot added the release: feature release: feature related release(mr only) label Dec 22, 2025
@netlify
Copy link

netlify bot commented Dec 22, 2025

Deploy Preview for rspack canceled.

Name Link
🔨 Latest commit 294f648
🔍 Latest deploy log https://app.netlify.com/projects/rspack/deploys/694a0c1061148800070ee2cc

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 introduces a deprecate() helper function to standardize and improve deprecation warning messages across the Rspack codebase. The new helper ensures deprecation warnings are only shown once per message by tracking them in a Set, and provides consistent formatting with a [Rspack Deprecation] prefix.

Key changes:

  • Added a new deprecate() helper function that deduplicates warnings and formats them consistently
  • Replaced all util.deprecate() calls from Node.js with the new helper function
  • Updated deprecation messages to be more concise and consistent in tone

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
packages/rspack/src/util/index.ts Added new deprecate() helper function with message deduplication; updated error messages in unsupported() to use consistent branding
packages/rspack/src/rspack.ts Replaced util.deprecate() with new deprecate() helper for watch option warning
packages/rspack/src/config/types.ts Added JSDoc deprecation notice for topLevelAwait option
packages/rspack/src/config/normalization.ts Replaced all util.deprecate() calls with new deprecate() helper; updated deprecation messages to be more concise and consistent
packages/rspack/src/builtin-plugin/lazy-compilation/middleware.ts Replaced console.warn() calls with deprecate() helper for automatic deduplication; removed manual warning tracking logic

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

@github-actions
Copy link
Contributor

github-actions bot commented Dec 22, 2025

Rsdoctor Bundle Diff Analysis

⚠️ Note: The latest commit (da9254b193) does not have baseline artifacts. Using commit be5d0ef3f5 for baseline comparison instead. If this seems incorrect, please wait a few minutes and try rerunning the workflow.

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.3 KB 0
ui-components 2.1 MB 0

Generated by Rsdoctor GitHub Action

@github-actions
Copy link
Contributor

github-actions bot commented Dec 22, 2025

📦 Binary Size-limit

Comparing 294f648 to fix: SRI plugin runtime module check for Module Federation (#12519) by harpsealjs

🙈 Size remains the same at 47.87MB

@codspeed-hq
Copy link

codspeed-hq bot commented Dec 22, 2025

CodSpeed Performance Report

Merging #12524 will not alter performance

Comparing deprecation_logs_1222 (294f648) with main (9c290ed)1

Summary

✅ 16 untouched
⏩ 1 skipped2

Footnotes

  1. No successful run was found on main (da9254b) during the generation of this report, so 9c290ed was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

  2. 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) December 23, 2025 03:39
@chenjiahan chenjiahan merged commit 9c26ab0 into main Dec 23, 2025
52 checks passed
@chenjiahan chenjiahan deleted the deprecation_logs_1222 branch December 23, 2025 05:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release: feature release: feature related release(mr only)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants