axodotdev / cargo-dist

📦 shippable application packaging
https://axodotdev.github.io/cargo-dist/
Apache License 2.0
1.36k stars 57 forks source link

Workflow fails because the rustc version is too old #992

Open SamusAranX opened 3 months ago

SamusAranX commented 3 months ago

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

Gankra commented 3 months ago

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

SamusAranX commented 3 months ago

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.

Gankra commented 3 months ago

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