Skip to content

Conversation

epage
Copy link
Contributor

@epage epage commented Sep 4, 2025

What does this PR try to resolve?

This replaces Shell::error, etc calls (see also #15917) with Shell::print_report when error chains are involved in an effort to render things more like rustc

This is part of #15944

Fixes #14924

How to test and review this PR?

@rustbot
Copy link
Collaborator

rustbot commented Sep 4, 2025

r? @weihanglo

rustbot has assigned @weihanglo.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added A-console-output Area: Terminal output, colors, progress bar, etc. A-manifest Area: Cargo.toml issues S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 4, 2025
@epage epage marked this pull request as draft September 4, 2025 01:50
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 4, 2025
@epage
Copy link
Contributor Author

epage commented Sep 4, 2025

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.

github-merge-queue bot pushed a commit that referenced this pull request Sep 4, 2025
### What does this PR try to resolve?

This is some cleanup that will help with #15922

### How to test and review this PR?
@rustbot

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-author Status: The marked PR is awaiting some action (such as code changes) from the PR author. label Sep 4, 2025
@rustbot
Copy link
Collaborator

rustbot commented Sep 5, 2025

☔ The latest upstream changes (possibly 3b379fc) made this pull request unmergeable. Please resolve the merge conflicts.

github-merge-queue bot pushed a commit that referenced this pull request Sep 8, 2025
### 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
@epage epage mentioned this pull request Sep 10, 2025
10 tasks
@epage epage changed the title fix(cli): Use Shell::print_report for error chains WIP: fix(cli): Use Shell::print_report for error chains Sep 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-console-output Area: Terminal output, colors, progress bar, etc. A-manifest Area: Cargo.toml issues S-waiting-on-author Status: The marked PR is awaiting some action (such as code changes) from the PR author.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"Caused By" error on missing relative dependency could be clearer
3 participants