cargo-dist
cargo-dist copied to clipboard
Specifying channel = "stable" in rust-toolchain.toml doesn't ensure the latest stable is used on BuildJet?
I got this error on aarch64-unknown-linux-gnu runner on BuildJet.
error: package `clap_derive v4.5.0` cannot be built because it requires rustc 1.74 or newer, while the currently active rustc version is 1.72.0
I placed the following rust-toolchain.toml, but it doesn't work probably because the rustup recognizes the version 1.72.0 is the "stable."
[toolchain]
channel = "stable"
I know changing this to nightly or some specific version like 1.76 should work, but are there any handy way to use the latest stable toolchain?
Yes unfortunately this is if I recall correctly a flaw/limitation with rustup/rust-toolchain.toml. There's no way to say "latest stable" -- the "stable" identifier just means "some stable, literally any will do". I wish I had a Sick Trick for this but it's just not something they support.
Thanks for the prompt response! I see. Then, how about adding this step to the GitHub Actions workflow? This should no harm because this doesn't do anything if the latest stable toolchain is installed, which should be the case with GitHub Actions runners. The absence of toolchain specification probably means stable is fine to use.
- uses: dtolnay/rust-toolchain@stable
if: ${{ hashFiles('rust-toolchain.toml') == '' }}
That said, I guess using custom runner is rare, so I'm not sure if this is really worth.