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

Downloads Rust version if specific point release already installed

Open legoktm opened this issue 4 years ago • 1 comments

Hi, cargo-hack is awesome, thank you for making it!

I'm running my CI pipeline using the rust:latest image, which always has the most recent point release installed:

root@a4a809c38181:/# rustup show
Default host: x86_64-unknown-linux-gnu
rustup home:  /usr/local/rustup

1.56.0-x86_64-unknown-linux-gnu (default)
rustc 1.56.0 (09c42c458 2021-10-18)

However, when I run something like cargo hack check 1.56.., it ends up redownloading the 1.56 toolchain, even though the image already has it installed. My guess is that this is because the image has 1.56.0 installed (with point release) while cargo-hack wants 1.56 (no point release).

Could cargo-hack somehow detect that the latest 1.56 release is 1.56.0 and re-use it if it's already installed?

legoktm avatar Oct 31 '21 06:10 legoktm

I would accept a PR to re-use 1.x.y toolchain as 1.x toolchain when it is the latest point release.

taiki-e avatar Nov 04 '21 13:11 taiki-e