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

rustup which doesn't accept + arguments #1489

Closed
nikomatsakis opened this issue Aug 27, 2018 · 3 comments · Fixed by #2030
Closed

rustup which doesn't accept + arguments #1489

nikomatsakis opened this issue Aug 27, 2018 · 3 comments · Fixed by #2030

Comments

@nikomatsakis
Copy link

I often want to find out "what is the real command that is running" so that I can (e.g.) launch rustc within gdb or something. I usually invoke rustc with something like:

rustc +rust-1-stage1 ~/tmp/issue-47206.rs -Ztreat-err-as-bug

It's annoying to me that I can't just add rustup which in front of that and have it emit something like:

/path/to/rust-1-stage1/rustc ~/tmp/issue-47206.rs -Ztreat-err-as-bug

Maybe something like rustup elaborate?

At minimum, I wish I could do rustup which +rust-1-stage1 or something.

@kinnison
Copy link
Contributor

Assuming you'd be okay with rustup +rust-1-stage1 which rustc which is effectively what #1498 is proposing, then I suggest we add --toolchain support to rustup which and then have #1498 provide the +foo variant. Does that sound acceptable?

@BeniCheni
Copy link
Contributor

BeniCheni commented Sep 30, 2019

then I suggest we add --toolchain support to rustup which ...

Hi, @kinnison, friendly note that I've given it a shot to add --toolchain option to rustup which in #2030.

and then have #1498 provide the +foo variant.

I'm interested in trying out. Can you give more hint what adding +foo variant implies? Does it mean rustup +custom-1 which rustc would work the same as rustup --toolchain=custom-1 which rustc?

@kinnison
Copy link
Contributor

@BeniCheni Yes, the idea is that rustup +nightly which rustc would be the same as rustup which rustc --nightly and so on. So that it's the same as cargo +nightly run or rustfmt +nightly etc.

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.

3 participants