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

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

Open
1 task done
9SMTM6 opened this issue Aug 9, 2024 · 1 comment
Labels
Milestone

Comments

@9SMTM6
Copy link

9SMTM6 commented Aug 9, 2024

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
Copy link
Member

Emilgardis commented Aug 9, 2024

We need to remove date here

cross/src/rustc.rs

Lines 215 to 230 in 1901fd7

/// Merge a "picked" toolchain, overriding set fields.
pub fn with_picked(self, picked: Toolchain) -> Result<Self> {
let date = picked.date.or(self.date);
let host = picked
.host
.map_or(Ok(self.host), ImagePlatform::from_target)?;
let channel = picked.channel;
Ok(QualifiedToolchain::new(
&channel,
&date,
&host,
&self.sysroot,
false,
))
}
if channel is not nightly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants