foresterre / cargo-msrv

🦀 Find the minimum supported Rust version (MSRV) for your project

Home Page:https://foresterre.github.io/cargo-msrv

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cargo msrv set: warn if Rust version is unknown

foresterre opened this issue · comments

In the current version of cargo msrv set <value>, assuming the value is a valid MSRV (syntactically), you can set any version, even if that version does not match an official Rust release.

For this issue, we want to check the version supplied by the user, and check whether it matches an official Rust release version.

We can fetch a list of known Rust stable releases using the rust-releases crate. We already do this for the cargo msrv (find) command.

  • If we can fetch the rust-releases, and set rust version is not in the list: warn about it
  • If we can't fetch the rust-releases: do not terminate (i.e. do not propagate the error), instead warn that we can't check for this