Skip to content

Can rustup be used to create a toolchain with nightly Cargo and stable rustc? #755

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
bruno-medeiros opened this issue Oct 11, 2016 · 7 comments

Comments

@bruno-medeiros
Copy link

If so, how?

@bruno-medeiros bruno-medeiros changed the title Can rustup be used to create a toolchain with nightly Cargo and stable Rust ? Can rustup be used to create a toolchain with nightly Cargo and stable rustc? Oct 11, 2016
@steveklabnik
Copy link
Member

I don't believe so, but I'm not 100% sure.

@steveklabnik
Copy link
Member

steveklabnik commented Oct 11, 2016

(At the same time, every cargo is a nightly cargo, so every toolchain comes with a nightly cargo and stable rustc, so it's also not 100% clear exactly what you want. I'm interpreting it as "a toolchain with a stable rust and an arbitrary cargo that's not the one paired with that stable rust")

@bruno-medeiros
Copy link
Author

I'm interpreting it as "a toolchain with a stable rust and an arbitrary cargo that's not the one paired with that stable rust"

Yup, that's right. Basically I want to try out this feature from Cargo : rust-lang/cargo#3000 , only available in nightly currently, but otherwise use stable Rust.

@Diggsey
Copy link
Contributor

Diggsey commented Oct 12, 2016

That's not possible with rustup, and it's not something that can ever really be supported since cargo is not guaranteed to be compatible with any rustc other than the one it is paired with (although in practice it will probably work with most).

If you want, you could try installing both a stable and nightly toolchain, and manually copy across the cargo binary, but it may just break your toolchain.

@bruno-medeiros
Copy link
Author

@matklad mentioned "However you could use nightly Cargo with stable rustc!" in the PR comments. However, if that's true that using nightly cargo with stable rustc might introduce instabilities of its own, might as well use the entire nightly toolchain. I guess it won't take that long for things to move into beta anyways. 😮

@matklad
Copy link
Member

matklad commented Oct 13, 2016

cargo is not guaranteed to be compatible with any rustc other than the one it is paired with (although in practice it will probably work with most).

Hm, is this really so? I always thought that Cargo can use any rustc. At least, there is some code for backward compatibility. @alexcrichton could you clarify backwards/forwards compatibility story between Cargo and rustc?

@matklad
Copy link
Member

matklad commented Oct 13, 2016

Let me add two use cases for this feature:

  1. Cargo gains a new useful feature, which you would like to use with otherwise stable toolchain. The recent example would be workspaces.

  2. Rustc gains a new feature, which needs some support from Cargo as well. But support in Cargo is implemented only after the rustc, so they end up in different releases. This is what happened with json errors.

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

No branches or pull requests

5 participants