-
-
Notifications
You must be signed in to change notification settings - Fork 737
feat: update resolver error messages to use colored output #12348
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
✅ Deploy Preview for rspack canceled.
|
There was a problem hiding this 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
dimfunction to returnimpl Display + '_instead ofString, 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.
Rsdoctor Bundle Diff AnalysisFound 5 project(s) in monorepo. 📁 react-10kPath:
📦 Download Diff Report: react-10k Bundle Diff 📁 react-1kPath:
📦 Download Diff Report: react-1k Bundle Diff 📁 react-5kPath:
📦 Download Diff Report: react-5k Bundle Diff 📁 romePath:
📦 Download Diff Report: rome Bundle Diff 📁 ui-componentsPath:
Generated by Rsdoctor GitHub Action |
📦 Binary Size-limit
❌ Size increased by 640bytes from 47.70MB to 47.70MB (⬆️0.00%) |
CodSpeed Performance ReportMerging #12348 will not alter performanceComparing Summary
|
|
Summary
Testing
|
Summary
red,yellow,cyan) alongsidedimBefore
After
Checklist