Skip to content

Conversation

@chenjiahan
Copy link
Member

Summary

  • add color utility functions (red, yellow, cyan) alongside dim
  • update resolver error messages to use colored output for better visibility
  • refactor dim function to return Display trait object instead of String

Before

Screenshot 2025-12-02 at 15 18 42

After

Screenshot 2025-12-02 at 15 15 25

Checklist

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

Copilot AI review requested due to automatic review settings December 2, 2025 07:24
@netlify
Copy link

netlify bot commented Dec 2, 2025

Deploy Preview for rspack canceled.

Name Link
🔨 Latest commit 547de6a
🔍 Latest deploy log https://app.netlify.com/projects/rspack/deploys/692e9f66936d3700087b4f4e

@github-actions github-actions bot added team The issue/pr is created by the member of Rspack. release: feature release: feature related release(mr only) labels Dec 2, 2025
Copilot finished reviewing on behalf of chenjiahan December 2, 2025 07:29
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 enhances error message visibility by introducing colored terminal output for resolver error messages. The changes refactor the color utility functions to return Display trait objects instead of Strings, add new color helpers (red, yellow, cyan), and apply colored formatting to resolver error messages.

  • Refactored dim function to return impl Display + '_ instead of String, requiring API signature updates
  • Added three new color utility functions (red, yellow, cyan) with the same Display trait return pattern
  • Updated resolver error messages to use yellow for request names and cyan for context paths

Reviewed changes

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

Show a summary per file
File Description
crates/rspack_error/src/lib.rs Exports new color functions (cyan, red, yellow) alongside existing dim function
crates/rspack_error/src/colors.rs Refactors dim to return Display trait, adds red/yellow/cyan color utilities
crates/rspack_error/src/displayer/renderer/graphical.rs Updates dim calls to pass references due to new signature
crates/rspack_core/src/diagnostics.rs Updates dim call to pass reference for consistency
crates/rspack_core/src/resolver/resolver_impl.rs Applies yellow and cyan colors to resolver error messages

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

@github-actions
Copy link
Contributor

github-actions bot commented Dec 2, 2025

Rsdoctor Bundle Diff Analysis

Found 5 project(s) in monorepo.

📁 react-10k

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

📌 Baseline Commit: 8bcf8afd29 | PR: #12346

Metric Current Baseline Change
📊 Total Size 5.7 MB 5.7 MB 0 B (0.0%)
📄 JavaScript 5.7 MB 5.7 MB 0 B (0.0%)
🎨 CSS 21.0 B 21.0 B 0 B (0.0%)
🌐 HTML 0 B 0 B N/A
📁 Other Assets 0 B 0 B N/A

📦 Download Diff Report: react-10k Bundle Diff

📁 react-1k

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

📌 Baseline Commit: 8bcf8afd29 | PR: #12346

Metric Current Baseline Change
📊 Total Size 822.6 KB 822.6 KB 0 B (0.0%)
📄 JavaScript 822.6 KB 822.6 KB 0 B (0.0%)
🎨 CSS 0 B 0 B N/A
🌐 HTML 0 B 0 B N/A
📁 Other Assets 0 B 0 B N/A

📦 Download Diff Report: react-1k Bundle Diff

📁 react-5k

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

📌 Baseline Commit: 8bcf8afd29 | PR: #12346

Metric Current Baseline Change
📊 Total Size 2.7 MB 2.7 MB 0 B (0.0%)
📄 JavaScript 2.7 MB 2.7 MB 0 B (0.0%)
🎨 CSS 21.0 B 21.0 B 0 B (0.0%)
🌐 HTML 0 B 0 B N/A
📁 Other Assets 0 B 0 B N/A

📦 Download Diff Report: react-5k Bundle Diff

📁 rome

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

📌 Baseline Commit: 8bcf8afd29 | PR: #12346

Metric Current Baseline Change
📊 Total Size 984.3 KB 984.3 KB 0 B (0.0%)
📄 JavaScript 984.3 KB 984.3 KB 0 B (0.0%)
🎨 CSS 0 B 0 B N/A
🌐 HTML 0 B 0 B N/A
📁 Other Assets 0 B 0 B N/A

📦 Download Diff Report: rome Bundle Diff

📁 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.1 MB - -
📄 JavaScript 2.0 MB - -
🎨 CSS 83.0 KB - -
🌐 HTML 0 B - -
📁 Other Assets 0 B - -

Generated by Rsdoctor GitHub Action

@github-actions
Copy link
Contributor

github-actions bot commented Dec 2, 2025

📦 Binary Size-limit

Comparing 547de6a to chore(workflow): run diff CI on push events (#12346) by yifancong

❌ Size increased by 640bytes from 47.70MB to 47.70MB (⬆️0.00%)

@codspeed-hq
Copy link

codspeed-hq bot commented Dec 2, 2025

CodSpeed Performance Report

Merging #12348 will not alter performance

Comparing resolver_errors_1202 (547de6a) with main (8bcf8af)

Summary

✅ 17 untouched

@chenjiahan chenjiahan enabled auto-merge (squash) December 2, 2025 08:32
@stormslowly
Copy link
Contributor

@codex

@chenjiahan chenjiahan merged commit 0c07811 into main Dec 2, 2025
52 checks passed
@chenjiahan chenjiahan deleted the resolver_errors_1202 branch December 2, 2025 08:40
@chatgpt-codex-connector
Copy link

Summary

Testing

  • Not run (not requested).

View task →

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) 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