cargo-dist icon indicating copy to clipboard operation
cargo-dist copied to clipboard

Workflow fails because the rustc version is too old

Open SamusAranX opened this issue 1 year ago • 3 comments

I have a scrunkly little project that I tried setting up a GH action for. Yesterday, it worked using rust 1.77.2, but it keeps failing now that I set the project's rust-version to 1.78.0:

error: package `realpha v1.0.2 (/Users/runner/work/realpha/realpha)` cannot be built because it requires rustc 1.78.0 or newer, while the currently active rustc version is 1.77.2

Rust 1.78 basically just came out. Is this a situation where I just have to wait for something upstream to get updated or is this something I can fix?

All the relevant files are here: release.yml, Cargo.toml

SamusAranX avatar May 02 '24 20:05 SamusAranX

You should be able to handle this by adding a rust-toolchain.toml to your project.

https://rust-lang.github.io/rustup/overrides.html#the-toolchain-file

Gankra avatar May 02 '24 20:05 Gankra

Is there no other way to influence which rust version gets used? I don't know if I'm comfortable having a second file with a pinned rust version around when all I want is a minimum version.

SamusAranX avatar May 02 '24 20:05 SamusAranX

Yeah it's a bit weird but it's the Official Rust Solution to this kinda problem.

Gankra avatar May 02 '24 22:05 Gankra