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

Implement verbose option for "rustup toolchain list" #1988

Merged
merged 1 commit into from Sep 17, 2019

Conversation

BeniCheni
Copy link
Contributor

This PR resolves #1479.

local test
→ rustup toolchain list -v
stable-x86_64-apple-darwin (default)	/Users/bchen/.rustup
nightly-2019-09-05-x86_64-apple-darwin	/Users/bchen/.rustup
nightly-x86_64-apple-darwin	/Users/bchen/.rustup
→ rustup toolchain list --verbose
stable-x86_64-apple-darwin (default)	/Users/bchen/.rustup
nightly-2019-09-05-x86_64-apple-darwin	/Users/bchen/.rustup
nightly-x86_64-apple-darwin	/Users/bchen/.rustup
→ rustup toolchain list -h
rustup-toolchain-list
List installed toolchains

USAGE:
    rustup toolchain list [FLAGS]

FLAGS:
    -h, --help       Prints help information
    -v, --verbose    Enable verbose output with toolchain infomation

Copy link
Contributor

@kinnison kinnison left a comment

Choose a reason for hiding this comment

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

Mostly good, I'd like to see the use of clap not leaked into common.rs and the tests need a little more thought, but otherwise this is very close to mergeable.

Thank you very much for your contribution and I hope you have time to act on this feedback and provide an updated commit.

Please note that we don't like fixup commits in our history if we can avoid them; so either squash your updates into this commit, or be prepared to be asked to do so once we're happy the content is mergeable.

D.

src/cli/common.rs Outdated Show resolved Hide resolved
tests/cli-v1.rs Outdated Show resolved Hide resolved
@BeniCheni
Copy link
Contributor Author

Thank you for the feedback, @kinnison. Just a quick note to acknowledge the feedback. Will definitely find time to edit to update the PR.

@BeniCheni
Copy link
Contributor Author

Greeting @kinnison. Per suggestions, I've pushed the updates in a squashed commit to:

  • used toolchain_list wrapper fn to avoid clap not leaked into common.rs
  • updated list_toolchains tests in cli-v1.rs & cli-v2.rs to assert the tab character in the toolchain path, to ensure verbosity option are being invoked.

PTAL? Thanks.

@BeniCheni BeniCheni force-pushed the toolchain-list-verbose branch 2 times, most recently from 6bd2ffd to d01c9fb Compare September 16, 2019 01:44
Copy link
Contributor

@kinnison kinnison left a comment

Choose a reason for hiding this comment

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

One tiny typo, I can fix it if you don't want to.

src/cli/rustup_mode.rs Outdated Show resolved Hide resolved
Update verbose option for toolchain list

Correct toolchain list tests w. verbose option

Update syntax based on clippy

Simplify toolchain_list fn in rustup_mode.rs

Correct typo in list subcommand
@BeniCheni
Copy link
Contributor Author

Thanks for catching the typo, @kinnison. Updated.

Copy link
Contributor

@kinnison kinnison left a comment

Choose a reason for hiding this comment

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

👍

@kinnison kinnison merged commit 0ec2dbe into rust-lang:master Sep 17, 2019
@BeniCheni BeniCheni deleted the toolchain-list-verbose branch September 17, 2019 20:37
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.

rustup toolchain: print the path the the toolchain
2 participants