-
Notifications
You must be signed in to change notification settings - Fork 2.6k
WIP: fix(cli): Use Shell::print_report for error chains #15922
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
base: master
Are you sure you want to change the base?
Conversation
r? @weihanglo rustbot has assigned @weihanglo. Use |
Unlike #15917 which can be touched up in the callers if we don't like it, this will need a more invasive change of creating a diagnostic-first error type if we're not satisfied with the results as-is, so looking to solicit feedback on the general idea and what all directions we may want to take this before going down those roads. |
### What does this PR try to resolve? This is some cleanup that will help with #15922 ### How to test and review this PR?
This comment has been minimized.
This comment has been minimized.
☔ The latest upstream changes (possibly 3b379fc) made this pull request unmergeable. Please resolve the merge conflicts. |
### What does this PR try to resolve? Fixes #12740 This is also prep for #15917, #15922 Changes: - `note` changes from Cyan to Bright Green - `cargo info` had to be changed because the header and context colors became the same - Switch to Bright colors which is usually redundant with Bold but that is theme dependent - `warning` only changes to Bright on Windows which is to work around a shell issue on some Windows versions - except for `PLACEHOLDER` to tell it apart from `LITERAL` - the `:` in `note:` is no longer bolded to match rustc ### How to test and review this PR? ### Notes While annotate-snippets does not have a style for every one of our styles, I updated our manual styles to be similar to annotate snippets. For annotate snippets color definitions, see https://github.com/rust-lang/annotate-snippets-rs/blob/d38b08b81d7d574369ecfd30124195a970b37fd3/src/renderer/mod.rs#L41-L78
What does this PR try to resolve?
This replaces
Shell::error
, etc calls (see also #15917) withShell::print_report
when error chains are involved in an effort to render things more like rustcThis is part of #15944
Fixes #14924
How to test and review this PR?