Skip to content
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

feat(cli): add --quiet to rustup toolchain list and friends #3862

Merged
merged 2 commits into from
Jun 7, 2024

Conversation

rami3l
Copy link
Member

@rami3l rami3l commented Jun 5, 2024

Closes #3519.

@rami3l rami3l force-pushed the feat/list-quiet branch from 4378eca to 181c673 Compare June 5, 2024 12:24
@rami3l rami3l force-pushed the feat/list-quiet branch from 181c673 to 1384f5b Compare June 7, 2024 01:55
@rami3l rami3l marked this pull request as ready for review June 7, 2024 01:59
@rami3l rami3l requested a review from djc June 7, 2024 01:59
Copy link
Contributor

@djc djc left a comment

Choose a reason for hiding this comment

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

Nice!

It feels like we should more tightly model verbosity as an enum internally (along the lines of enum Verbosity { Default, Quiet, Verbose }) so we can be more intentional about how to apply it.

@rami3l
Copy link
Member Author

rami3l commented Jun 7, 2024

It feels like we should more tightly model verbosity as an enum internally (along the lines of enum Verbosity { Default, Quiet, Verbose }) so we can be more intentional about how to apply it.

@djc I agree. However for the moment being we only have less than 5 instances of --quiets and --verboses in the codebase each, and they don't even form a pair in some places, so I'm a bit hesitant. I'd like to change that when the pattern becomes more visible, but for now I'm inclined to merge this as-is.

@rami3l rami3l added this pull request to the merge queue Jun 7, 2024
Merged via the queue into master with commit a47877e Jun 7, 2024
26 checks passed
@rami3l rami3l deleted the feat/list-quiet branch June 7, 2024 16:06
@djc
Copy link
Contributor

djc commented Jun 7, 2024

I ran into https://github.com/rust-lang/rustup/blob/master/src/cli/common.rs#L171 where the interaction of verbose and quiet in the NotifyOnConsole/DownloadTracker (which themselves suffer from crappy design) doesn't seem very well-defined, that's why I was thinking about it.

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.

Add a "single column" mode for rustup toolchain list and friends
2 participants