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
Use rustup to get nightly rust #11361
Comments
Right now the UX for a developer is they can install a few dependencies, and than Additionally we currently support having cargo and rust versions that are separate, but I'm not sure if that is a property we have ever relied on. Previously, we sometimes had custom Rust builds, but this behavior has not been needed in quite some time. We could add the overload file even if we don't make that the default way to manage Rust. Will rustup automatically download the right toolchain if it sees an overload file and that version isn't already downloaded? If so, that would enable cargo to work without mach, which would be a nice improvement. So I think we would accept a PR to add an overload file. I think the discussion of whether we should outsource handling of the Rust toolchain to rustup should probably be discussed on dev-servo first to get more input. |
IIRC @brson thought that we could eventually switch to using his |
Hmm, could I participate in this work, since it maybe look like a medium level work for servo? |
@mrmiywj Sure, sounds good. I investigated how this could work. Overrides appear to be stored in An alternative implementation is to detect the presence of The end result would be that if you have rustup installed, we would use that infrastructure to manage the toolchains and as a side benefit, raw cargo and rustc invocations would now work without having to go through mach. There will need to be some care around cross compiling, assuming rustup can manage cross compile toolchains as well. @larsbergstrom Does this strategy sound reasonable? Are we likely to need independent cargo and rust toolchains anymore? |
As you've seen there's no way yet to declare in a project what override rustup should use. If you want to integrate with rustup now it's probably best to do as jack describes and detect the existence of the rustup command, though that will leave you with two code paths for downloading the toolchain. Another option might be to detect whether rustup exists, and if it doesn't install rustup to a private folder by overriding |
Now that rust-lang/rustup#460 has landed, can we reconsider this issue? |
@metajack what do you think? |
As long as we can get the -alt builds via rustup, this seems like it would be a useful improvement. I'm not sure how it will handle a nightly override for Servo as well as a stable override for Stylo, however. |
I guess one way would be to let rustup manage servo and mach manage stylo. Or put a rust-toolchain config in the libgecko dir? |
(@paulrouget asked me to help with this) So just to make sure, the current plan is to
|
^ @metajack ? |
That sounds fine to start. I would eventually like to end up with just the rustup bootstrapping, but we need some clever way to deal with stylo. The ideal end goal is that if someone does |
Sounds good, I'll start working on this. |
Should we still keep the |
Yes, we neem system-x options so that custom rust builds will work if someone is testing specific things. |
… this time using a `rust-toolchain` file compatible with rustup: https://github.com/rust-lang-nursery/rustup.rs/#the-toolchain-file And upgrade to rustc 1.21.0-nightly (c11f689d2 2017-08-29) ---- Now if both `system-rust` and `system-cargo` are set to `true` in `.servobuild`’s `[tools]` section, and the corresponding `rustc` and `cargo` binaries are in fact rustup’s wrappers, then rustup will use the correct version based on `rust-toolchain`. CC #11361 Unlike #17927, this does not make mach use rustup directly.
#18325 does not fix this (I think rustup should completely replace our bootstrapping mechanism eventually), but it’s a step. |
… this time using a `rust-toolchain` file compatible with rustup: https://github.com/rust-lang-nursery/rustup.rs/#the-toolchain-file And upgrade to rustc 1.21.0-nightly (c11f689d2 2017-08-29) ---- Now if both `system-rust` and `system-cargo` are set to `true` in `.servobuild`’s `[tools]` section, and the corresponding `rustc` and `cargo` binaries are in fact rustup’s wrappers, then rustup will use the correct version based on `rust-toolchain`. CC #11361 Unlike #17927, this does not make mach use rustup directly.
Switch back to pinning Rust by Nightly date instead of commit hash… … this time using a `rust-toolchain` file compatible with rustup: https://github.com/rust-lang-nursery/rustup.rs/#the-toolchain-file And upgrade to rustc 1.21.0-nightly (c11f689d2 2017-08-29) ---- Now if both `system-rust` and `system-cargo` are set to `true` in `.servobuild`’s `[tools]` section, and the corresponding `rustc` and `cargo` binaries are in fact rustup’s wrappers, then rustup will use the correct version based on `rust-toolchain`. CC #11361 Unlike #17927, this does not make mach use rustup directly. That should wait until rust-lang/rustup#1099 is fixed. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18325) <!-- Reviewable:end -->
…tead of commit hash… (from servo:rustup-toolchain); r=nox … this time using a `rust-toolchain` file compatible with rustup: https://github.com/rust-lang-nursery/rustup.rs/#the-toolchain-file And upgrade to rustc 1.21.0-nightly (c11f689d2 2017-08-29) ---- Now if both `system-rust` and `system-cargo` are set to `true` in `.servobuild`’s `[tools]` section, and the corresponding `rustc` and `cargo` binaries are in fact rustup’s wrappers, then rustup will use the correct version based on `rust-toolchain`. CC servo/servo#11361 Unlike servo/servo#17927, this does not make mach use rustup directly. That should wait until rust-lang/rustup#1099 is fixed. Source-Repo: https://github.com/servo/servo Source-Revision: c4800a6c83e6fdabaf7c4eff70a24487d16f18ff --HG-- extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear extra : subtree_revision : e3d41159bc4670ea990630e5342fe9b663a79fe5
…tead of commit hash… (from servo:rustup-toolchain); r=nox … this time using a `rust-toolchain` file compatible with rustup: https://github.com/rust-lang-nursery/rustup.rs/#the-toolchain-file And upgrade to rustc 1.21.0-nightly (c11f689d2 2017-08-29) ---- Now if both `system-rust` and `system-cargo` are set to `true` in `.servobuild`’s `[tools]` section, and the corresponding `rustc` and `cargo` binaries are in fact rustup’s wrappers, then rustup will use the correct version based on `rust-toolchain`. CC servo/servo#11361 Unlike servo/servo#17927, this does not make mach use rustup directly. That should wait until rust-lang/rustup#1099 is fixed. Source-Repo: https://github.com/servo/servo Source-Revision: c4800a6c83e6fdabaf7c4eff70a24487d16f18ff
…tead of commit hash… (from servo:rustup-toolchain); r=nox … this time using a `rust-toolchain` file compatible with rustup: https://github.com/rust-lang-nursery/rustup.rs/#the-toolchain-file And upgrade to rustc 1.21.0-nightly (c11f689d2 2017-08-29) ---- Now if both `system-rust` and `system-cargo` are set to `true` in `.servobuild`’s `[tools]` section, and the corresponding `rustc` and `cargo` binaries are in fact rustup’s wrappers, then rustup will use the correct version based on `rust-toolchain`. CC servo/servo#11361 Unlike servo/servo#17927, this does not make mach use rustup directly. That should wait until rust-lang/rustup#1099 is fixed. Source-Repo: https://github.com/servo/servo Source-Revision: c4800a6c83e6fdabaf7c4eff70a24487d16f18ff
Update: rust-lang/rustup#1250 has landed in rustup master but is not in a release yet. |
Rustup 1.7.0 is released. (Thanks Alex!) ~/servo$ cargo build --manifest-path ports/servo/Cargo.toml
info: syncing channel updates for 'nightly-2017-10-13-x86_64-unknown-linux-gnu'
info: latest update on 2017-10-13, rust version 1.22.0-nightly (dcbbfb6e8 2017-10-12)
[…]
info: installing component 'rustc'
info: installing component 'rust-std'
info: installing component 'cargo'
info: installing component 'rust-docs'
Compiling percent-encoding v1.0.0
[…] |
Use rustup.rs instead of custom bootstrap Fixes #11361, closes #18874 <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/19395) <!-- Reviewable:end -->
Use rustup.rs instead of custom bootstrap Fixes #11361, closes #18874 <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/19395) <!-- Reviewable:end -->
Use rustup.rs instead of custom bootstrap Fixes #11361, closes #18874 <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/19395) <!-- Reviewable:end -->
Use rustup.rs instead of custom bootstrap Fixes #11361, closes #18874 <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/19395) <!-- Reviewable:end -->
Use rustup.rs instead of custom bootstrap Fixes #11361, closes #18874 <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/19395) <!-- Reviewable:end -->
Use rustup.rs instead of custom bootstrap Fixes #11361, closes #18874 <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/19395) <!-- Reviewable:end -->
Use rustup.rs instead of custom bootstrap Fixes #11361, closes #18874 <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/19395) <!-- Reviewable:end -->
Use rustup.rs instead of custom bootstrap Fixes #11361, closes #18874 <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/19395) <!-- Reviewable:end -->
Use rustup.rs instead of custom bootstrap Fixes #11361, closes #18874 <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/19395) <!-- Reviewable:end -->
Use rustup.rs instead of custom bootstrap Fixes #11361, closes #18874 <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/19395) <!-- Reviewable:end -->
Use rustup.rs instead of custom bootstrap Fixes #11361, closes #18874 <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/19395) <!-- Reviewable:end -->
Use rustup.rs instead of custom bootstrap Fixes #11361, closes #18874, fixes #19365. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/19395) <!-- Reviewable:end -->
Use rustup.rs instead of custom bootstrap Fixes #11361, closes #18874, fixes #19365. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/19395) <!-- Reviewable:end -->
Use rustup.rs instead of custom bootstrap Fixes #11361, closes #18874, fixes #19365. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/19395) <!-- Reviewable:end -->
Use rustup.rs instead of custom bootstrap Fixes #11361, closes #18874, fixes #19365. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/19395) <!-- Reviewable:end -->
Use rustup.rs instead of custom bootstrap Fixes #11361, closes #18874, fixes #19365. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/19395) <!-- Reviewable:end -->
Use rustup.rs instead of custom bootstrap Fixes #11361, closes #18874, fixes #19365. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/19395) <!-- Reviewable:end -->
…tead of commit hash… (from servo:rustup-toolchain); r=nox … this time using a `rust-toolchain` file compatible with rustup: https://github.com/rust-lang-nursery/rustup.rs/#the-toolchain-file And upgrade to rustc 1.21.0-nightly (c11f689d2 2017-08-29) ---- Now if both `system-rust` and `system-cargo` are set to `true` in `.servobuild`’s `[tools]` section, and the corresponding `rustc` and `cargo` binaries are in fact rustup’s wrappers, then rustup will use the correct version based on `rust-toolchain`. CC servo/servo#11361 Unlike servo/servo#17927, this does not make mach use rustup directly. That should wait until rust-lang/rustup#1099 is fixed. Source-Repo: https://github.com/servo/servo Source-Revision: c4800a6c83e6fdabaf7c4eff70a24487d16f18ff UltraBlame original commit: 5df6f8fe6c50631fe00f47b69d16b8d555d90503
…tead of commit hash… (from servo:rustup-toolchain); r=nox … this time using a `rust-toolchain` file compatible with rustup: https://github.com/rust-lang-nursery/rustup.rs/#the-toolchain-file And upgrade to rustc 1.21.0-nightly (c11f689d2 2017-08-29) ---- Now if both `system-rust` and `system-cargo` are set to `true` in `.servobuild`’s `[tools]` section, and the corresponding `rustc` and `cargo` binaries are in fact rustup’s wrappers, then rustup will use the correct version based on `rust-toolchain`. CC servo/servo#11361 Unlike servo/servo#17927, this does not make mach use rustup directly. That should wait until rust-lang/rustup#1099 is fixed. Source-Repo: https://github.com/servo/servo Source-Revision: c4800a6c83e6fdabaf7c4eff70a24487d16f18ff UltraBlame original commit: 5df6f8fe6c50631fe00f47b69d16b8d555d90503
…tead of commit hash… (from servo:rustup-toolchain); r=nox … this time using a `rust-toolchain` file compatible with rustup: https://github.com/rust-lang-nursery/rustup.rs/#the-toolchain-file And upgrade to rustc 1.21.0-nightly (c11f689d2 2017-08-29) ---- Now if both `system-rust` and `system-cargo` are set to `true` in `.servobuild`’s `[tools]` section, and the corresponding `rustc` and `cargo` binaries are in fact rustup’s wrappers, then rustup will use the correct version based on `rust-toolchain`. CC servo/servo#11361 Unlike servo/servo#17927, this does not make mach use rustup directly. That should wait until rust-lang/rustup#1099 is fixed. Source-Repo: https://github.com/servo/servo Source-Revision: c4800a6c83e6fdabaf7c4eff70a24487d16f18ff UltraBlame original commit: 5df6f8fe6c50631fe00f47b69d16b8d555d90503
Since every time build servo will use nightly rust compiler, is it a good idea to use rustup and overload servo path to build servo with nightly rustc? I mean, since there is a rust version manager, why not just use it?
The text was updated successfully, but these errors were encountered: