Skip to content

rustup show active-toolchain should provide the toolchain path #4129

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

Closed
rami3l opened this issue Dec 28, 2024 · 3 comments · Fixed by #4130
Closed

rustup show active-toolchain should provide the toolchain path #4129

rami3l opened this issue Dec 28, 2024 · 3 comments · Fixed by #4130
Milestone

Comments

@rami3l
Copy link
Member

rami3l commented Dec 28, 2024

Problem you are trying to solve

Let me guess: you actually just want to get the active toolchain path with this snippet...

https://github.com/corrosion-rs/corrosion/blob/b88ec09915a6b12d1aaec7e451ecf0e41a831030/cmake/FindRust.cmake#L423-L428

... however you might have tried the following options and concluded that neither is satisfactory:

  • rustup show active-toolchain. This seems like the most obvious option, however it is somehow not willing to give you the toolchain path...
  • rustup toolchain list --verbose. This does give you the toolchain paths, but you have to manually deduce what the active toolchain is :|

corrosion-rs/corrosion#590 (comment)

Solution you'd like

rustup show active-toolchain should provide the toolchain path, or optionally with --verbose.

Notes

No response

@ChrisDenton
Copy link
Member

I think maybe with --verbose would be better? I worry that people are parsing rustup show active-toolchain so changing it might break scripts, etc. Admittedly, if those scripts are just splitting on the first whitespace then it is less of an issue.

rustup toolchain list --verbose. This does give you the toolchain paths, but you have to manually deduce what the active toolchain is :|

Maybe that should indicate the active toolchain as well.

@rami3l
Copy link
Member Author

rami3l commented Dec 28, 2024

rustup toolchain list --verbose. This does give you the toolchain paths, but you have to manually deduce what the active toolchain is :|

Maybe that should indicate the active toolchain as well.

@ChrisDenton That's a description of the pre-v1.28 behavior. It's been fixed now.

@rami3l
Copy link
Member Author

rami3l commented Dec 29, 2024

I think maybe with --verbose would be better? I worry that people are parsing rustup show active-toolchain so changing it might break scripts, etc.

@ChrisDenton That compatibility, if it exists in the first place, is unfortunately already broken since #3225, so essentially this is a similar situation to #4045.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants