-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Nightly version is off by one #51533
Comments
We tried to fix it before but it has broken nightlies and thus reverted. |
Maybe add something extra like "built on 2016-06-10" to record the packaging date and it's done? The commit date doesn't have to change... |
A typical sequence of events is:
When you run When you run
The build date (step 3) is not the packaging date. And it’s not very useful since it’s ~always a few minutes after the (merge) commit date. And it could vary across builds (e.g. if a machine takes a bit more time to be available to make the macOS build). For In rust-lang/rust-central-station#27 I tried to hack the packaging date to be "10 minutes ago" instead of "now". Since the cron job starts at midnight UTC and we almost never go 24 hours without merging a PR, this would usually match the commit date. The problem is that the code for signing the artifacts separately looks up the current date and expects this to match the packaging date. |
I think it might be possible to do this by using the date of the most recent commit, rather than the date the actual release process happens. The git command used would be the same between the release process and x.py, so because it's deterministic they'd pick the same one. I don't know where the release process currently lives - is it in tree? If not it would be hard to coordinate the two PRs, they'd have to land on the same day to avoid breakage. |
The release process lives at https://github.com/rust-lang/promote-release, I think. |
and the relevant code is at https://github.com/rust-lang/promote-release/blob/da325f0dded6ec10fcce8099561142c501cef79b/src/sign.rs#L121 :) thanks! |
This continues to be a papercut for me. Some people on my team have been using Rust since before rustup; their process for installing a new nightly is to download the tarball by hand, and extract it into a directory named for the date and the commit hash (like /opt/rust/rust-nightly-2019-08-29-72b2abfd6). I would much prefer to use rustup to manage versions, using a rust-toolchain file, but that involves working out what date to put in rust-toolchain to get the right version. Usually that's one day later, but not always! |
To automate a work-around, you could parse https://static.rust-lang.org/dist/2022-11-23/channel-rust-nightly.toml (here for rustup’s |
Just ran into this while writing tooling that manages the toolchain version we have pinned in CI. Not sure yet what my resolution will be; just wanted to pop in to raise my hand as someone who's affected by this. |
This says it all:
The version reported by rustc itself is consistently off by one compared to what I requested from rustup. That's particularly confusing when looking at e.g. Travis CI build logs of of my project with a particular nightly, and trying to reproduce the result by installing the same nightly.
The text was updated successfully, but these errors were encountered: