cross-rs / cross

“Zero setup” cross compilation and “cross testing” of Rust crates
Apache License 2.0
6.8k stars 379 forks source link

Overrides with dated nightly in file override and simple stable commandline override lead to unholy hybrid toolchain that doesn't exist #1541

Open 9SMTM6 opened 3 months ago

9SMTM6 commented 3 months ago

Checklist

Describe your issue

I've got a project with

# rust-toolchain.toml
[toolchain]
channel = "nightly-2024-08-02"
components = ["rust-src", "rustfmt", "clippy"]

and I invoke cross with cross +stable build. That same thing works with cargo. With cross I end up with:

+ rustup toolchain add stable-2024-08-02-x86_64-unknown-linux-gnu --profile minimal --force-non-host
info: syncing channel updates for 'stable-2024-08-02-x86_64-unknown-linux-gnu'
error: no release found for 'stable-2024-08-02'
Error: 
   0: couldn't install toolchain `stable-2024-08-02-x86_64-unknown-linux-gnu`
   1: `rustup toolchain add stable-2024-08-02-x86_64-unknown-linux-gnu --profile minimal --force-non-host` failed with exit status: 1

cross version

cross v0.2.5 (https://github.com/cross-rs/cross?rev=1b8cf50d20180c1a394099e608141480f934b7f7#1b8cf50d)

Example

No response

Additional information / notes

No response

Emilgardis commented 3 months ago

We need to remove date here https://github.com/cross-rs/cross/blob/1901fd78337b110fb9e8bc78286bc17be713223a/src/rustc.rs#L215-L230 if channel is not nightly