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

Add support for a nightly-alt toolchain #1099

Closed
SimonSapin opened this issue May 8, 2017 · 8 comments
Closed

Add support for a nightly-alt toolchain #1099

SimonSapin opened this issue May 8, 2017 · 8 comments

Comments

@SimonSapin
Copy link
Contributor

SimonSapin commented May 8, 2017

Edit: rust-lang-ci is ephemeral, so the proposal is now to add one nightly-alt channel adressed by date like nightly.


The builds made for testing every Rust pull request before merging are made available at:

  • https://s3.amazonaws.com/rust-lang-ci/rustc-builds/$SHA1/rust-nightly-$HOST_TRIPLE.tar.gz
  • https://s3.amazonaws.com/rust-lang-ci/rustc-builds-alt/$SHA1/rust-nightly-$HOST_TRIPLE.tar.gz

… where $SHA1 is the full hex hash of a merge commit made by @bors.

The latter was added in rust-lang/rust#39754. It includes a smaller number of platforms, and disables LLVM assertions which weakens compiler testing but improves compiler performance.

Servo has been using these builds. They prove useful both for the performance improvement and for testing for example a bug fix that has been merged without waiting for the next Nightly (which sometimes takes several additional days).

Servo does this with custom rustup-like Python scripts. These builds can be used in rustup with rustup toolchain link FOO /path/to/extracted/tarball, but downloading them and extracting them manually can get tedious. Automating this approaches re-inventing rustup, so it would be nicer if rustup could support it directly.

master and master-alt could be added to the toolchains rustup knows about out of the box like stable and nightly. The hash of the current latest commit can be found in https://api.github.com/repos/rust-lang/rust/git/refs/heads/master. These toolchains would also support specifying a precise hash, like stable and nightly support a version number and a date:

rustup update stable-1.17.0
rustup update nightly-2017-05-06
rustup update master-alt-70198a0a44633c7c9d14fce2159c1f750491287b

@brson How does this sound?

@Diggsey
Copy link
Contributor

Diggsey commented May 8, 2017

@alexcrichton said this would be difficult, but it would kill two birds with one stone if we could produce manifests for these builds too. (It would support both this feature, and testing rust against rustup to make sure we don't get any more broken manifests on nightly)

@brson
Copy link
Contributor

brson commented May 8, 2017

I think rustup needs some more support for installing non-channel builds, and the rust ci needs more support for deploying non-channel builds, for multiple reasons. I am not sure what solution I want for that though, and suspect that just teaching rustup to download that tarball by url is not sufficient.

For my purposes, I need to be able to run experimental commits through Rust's release builders and have them deploy to somewhere, so that cargobomb can find them via rustup. For that I might expect there to be a dedicated branch that people can submit PRs to in order to deploy a build, perhaps with most platforms turned off. Those builds get fed into RCS to deploy a non-signed build to a special location.

None of the releases that come out of this system should be mistaken for official releases. I would not put them in the same location w/in static.rust-lang.org where they will pollute our directory structure with unofficial junk.

I would make rustup print big warnings about using any of these releases, especially since rustup doesn't actually deal with sigs today.

There would need to be some new toolchain naming scheme. I'd be inclined to say something like "dev-$sha", except that wouldn't accommodate "master-alt", which is just a different build of the same commit.

I am not enthusiastic at all about advertising "master-alt" - having a secret unofficial nightly channel that those in the know use to get a "fast" nightly is not desirable to me. If nighties should be fast we should make them fast. If we really need to give our users two completely different releases of nightly then I might prefer to give it a more considered design. These builds exist today as a hack for servo.

@SimonSapin
Copy link
Contributor Author

These builds exist today as a hack for servo.

This sounds wrong to me, even though these builds do make my life easier and I am grateful to everyone who worked on making them available. If Servo can have nice things, everybody should have access to them as well. This thread is about making them easier to get.

run experimental commits through Rust's release builders […] a dedicated branch that people can submit PRs to in order to deploy a build

What that does sound useful and could potentially use a shared more general mechanism, that mechanism doesn’t exist yet and doesn’t seem necessary for getting the "alt" builds that already exist.

If nighties should be fast we should make them fast.

I’d be fine with switching Servo back to nightly (letting go of "test fixes as soon as they’re merged") if we’re willing to disable LLVM assertions in nightly. I’ll start an internals thread about that.

@SimonSapin
Copy link
Contributor Author

I’ll start an internals thread about that.

https://internals.rust-lang.org/t/disabling-llvm-assertions-in-nightly-builds/5388

@SimonSapin
Copy link
Contributor Author

What is desired here is mostly to make "alt" toolchains available with rustup somehow. If they are addressed by commit hash (as master-alt-*) and available for every merged Rust PR, then we might as well also make "non-alt" master-* available for every PR too.

Another option is to add nightly-alt-*, addressed by date like nightly-*, and not add anything addressed by commit hash. Internally the full hash is still needed to construct the tarball URLs, but these can be obtained from the GitHub API from a short hash (the sha JSON key in https://api.github.com/repos/rust-lang/rust/commits/{short_hash}), which in turn can be extracted from the Nightly channel manifest (pkg.rustc.version key in https://static.rust-lang.org/dist/{date}/channel-rust-nightly.toml). Or the manifest could be extended to include the full hash, so that the GitHub API is not needed.

@shinglyu
Copy link

Any update or decision on this?

bors-servo pushed a commit to servo/servo that referenced this issue Aug 31, 2017
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 -->
SimonSapin added a commit to SimonSapin/rust that referenced this issue Aug 31, 2017
The full hash is necessary to build the download URL for "alternate"
compiler builds.
This is a first step for
rust-lang/rustup#1099
@SimonSapin
Copy link
Contributor Author

rust-lang/rust#44218 is a first step.

moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this issue Sep 1, 2017
…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
xeonchen pushed a commit to xeonchen/gecko-cinnabar that referenced this issue Sep 1, 2017
…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
aethanyc pushed a commit to aethanyc/gecko-dev that referenced this issue Sep 2, 2017
…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
Mark-Simulacrum added a commit to Mark-Simulacrum/rust that referenced this issue Sep 6, 2017
Add full git commit hash to release channel manifests

The full hash is necessary to build the download URL for "alternate" compiler builds. This is a first step for rust-lang/rustup#1099.
Mark-Simulacrum added a commit to Mark-Simulacrum/rust that referenced this issue Sep 7, 2017
Add full git commit hash to release channel manifests

The full hash is necessary to build the download URL for "alternate" compiler builds. This is a first step for rust-lang/rustup#1099.
@SimonSapin SimonSapin changed the title Add support for master and master-alt toolchains Add support for a nightly-alt toolchain Oct 16, 2017
@SimonSapin
Copy link
Contributor Author

rust-lang/rust#45810 remove the compile-time incentive to use alternate builds, and https://internals.rust-lang.org/t/public-stable-rust-services/6072 clarifies that CI builds are not intended for “public consumption”. So this issue is obsolete.

gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this issue Oct 1, 2019
…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
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this issue Oct 1, 2019
…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
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this issue Oct 1, 2019
…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
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

4 participants