Skip to content

Conversation

@epage
Copy link
Contributor

@epage epage commented Oct 22, 2025

This is continuing my effort to make end-user commands more similar. This isn't meant to force conformancy where it doesn't make sense. My assumption is to first get things similar and then work on if there is feedback. Cargo is doing that with rust; there are things we want to change but priority is on being the same before we try to change. At least for myself, I don't feel anything is sacred and can be re-evaluated.

image

This is setup to match cargo infos style:
image

  • Top-level keys are treated as headers
  • Parentheticals are "context"

For testing, I forked an existing test rather than using SVGs for all of the existing tests. Having the output inline with the existing tests makes it easier to reason about and the number of test cases relevant for checknng styling is much smaller than for the main logic.

epage added 5 commits October 22, 2025 12:48
…odes

I had originally removed `impl Write for ColorableTerminal` in rust-lang#4520
and missed this when I added it back in.
Treating top-level key-value pairs as a `HEADER` matches `cargo info`s
behavior.
Copy link
Member

@rami3l rami3l left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I think that does look better than before...

PS: I'm not completely sure if people are really parsing the output or not, but probably this is less of a problem from our experience in the v1.28 breakage, especially because it's just a change in the colors... Let's see :)

@epage
Copy link
Contributor Author

epage commented Oct 23, 2025

If they are parsing, then it isn't a tty and they won't have colors unless the someone has set RUSTUP_TERM_COLOR.

The idea I've been toying with to try to improve scanability that would affect parsers is to see if we can align on the - between version and platform where present.

@djc djc added this pull request to the merge queue Oct 23, 2025
Merged via the queue into rust-lang:main with commit 198cbc3 Oct 23, 2025
29 checks passed
@epage epage deleted the show branch October 23, 2025 14:54
epage added a commit to epage/rustup that referenced this pull request Oct 23, 2025
This changes the parenthetical from `bold` to `CONTEXT` to match what
was done in rust-lang#4556.

This does not remove the bolding of the item itself.
We could do that. I figured its fine for now since there is a clearer
meaning with `installed` than when you can have `active` and `default`
on separate items.
epage added a commit to epage/rustup that referenced this pull request Oct 23, 2025
`rustup show` and `rustup toolchain list` have similar lists but the
latter was unstyled.
This updates it to be styled to match `rustup show` as of rust-lang#4556.

Maybe there would be a way to single source this in the future.
They do handle paths differently, so it would likely require a larger
conversation.
rami3l pushed a commit to epage/rustup that referenced this pull request Oct 24, 2025
`rustup show` and `rustup toolchain list` have similar lists but the
latter was unstyled.
This updates it to be styled to match `rustup show` as of rust-lang#4556.

Maybe there would be a way to single source this in the future.
They do handle paths differently, so it would likely require a larger
conversation.
github-merge-queue bot pushed a commit that referenced this pull request Oct 24, 2025
`rustup show` and `rustup toolchain list` have similar lists but the
latter was unstyled.
This updates it to be styled to match `rustup show` as of #4556.

Maybe there would be a way to single source this in the future.
They do handle paths differently, so it would likely require a larger
conversation.
epage added a commit to epage/rustup that referenced this pull request Oct 24, 2025
This changes the parenthetical from `bold` to `CONTEXT` to match what
was done in rust-lang#4556.

This does not remove the bolding of the item itself.
We could do that. I figured its fine for now since there is a clearer
meaning with `installed` than when you can have `active` and `default`
on separate items.
epage added a commit to epage/rustup that referenced this pull request Oct 24, 2025
This changes the parenthetical from `bold` to `CONTEXT` to match what
was done in rust-lang#4556.

This does not remove the bolding of the item itself.
We could do that. I figured its fine for now since there is a clearer
meaning with `installed` than when you can have `active` and `default`
on separate items.
epage added a commit to epage/rustup that referenced this pull request Oct 24, 2025
This changes the parenthetical from `bold` to `CONTEXT` to match what
was done in rust-lang#4556.

This does not remove the bolding of the item itself.
We could do that. I figured its fine for now since there is a clearer
meaning with `installed` than when you can have `active` and `default`
on separate items.
github-merge-queue bot pushed a commit that referenced this pull request Oct 25, 2025
This changes the parenthetical from `bold` to `CONTEXT` to match what
was done in #4556.

This does not remove the bolding of the item itself.
We could do that. I figured its fine for now since there is a clearer
meaning with `installed` than when you can have `active` and `default`
on separate items.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants