Open safinaskar opened 1 year ago
@safinaskar Thanks for your report! However, this is not a bug but a feature.
The 2023-06-05
that you see in rustc --version
is the date of the commit e6d4725c7
.
At 0:00 UTC of 2023-06-06, the CI has built a toolchain (which is the one that you installed on the first machine) up to that final commit, so the right toolchain to install is nightly-2023-06-06-x86_64-unknown-linux-gnu
.
@rami3l , okay, how to install to host B rustc version, which is equal to A's version without the need to perform calendar calculations in head?
@safinaskar If you need calendar calculations for CI workflows for example, you can use the date
command. This post should include exactly what you need.
However, inspecting the output of rustc --version
is not the standard way of keeping rust toolchains in sync across machines. You might want to use the toolchain file instead.
:( :( :( This is very bad
This is a little challenging yes. If you were dealing with released versions it would be quite trivial.
For nightly, if host A had a named toolchain installed, which rustup toolchains list
would show, then you would have the right metadata to copy over to host B. If on the other hand you just had the floating version nightly
, then I don't think we have enough metadata to infer the matching date based channel from that - though I could be wrong.
This is a duplicate of https://github.com/rust-lang/rustup/issues/1637 and https://github.com/rust-lang/rust/issues/51533, but I'd like to keep it open for tracking purposes.
Possibly related to #977.
Problem
I have a host A and a host B. Host A has rust installed. Host B - not. I decided to install on host B the same rust version host A has. So I typed this on host A:
Then I copied
2023-06-05
from output above and typed this to host B:As you can see original version (
rustc 1.72.0-nightly (e6d4725c7 2023-06-05)
) differs from host B's version (rustc 1.72.0-nightly (101fa903b 2023-06-04)
).So, something really wrong happens here. I don't know whether there is a bug in rustup itself or just in documentation
Steps
-
Possible Solution(s)
No response
Notes
No response
Rustup version
Installed toolchains