Specify correct MSRV
Opened this issue · 1 comments
README says that the minimum supported Rust version is 1.42, but it seems incorrect.
Line 27 in bd5293e
$ rustc --version; cargo version
rustc 1.42.0 (b8cedc004 2020-03-09)
cargo 1.42.0 (86334295e 2020-01-31)
$ git rev-parse HEAD; git rev-parse --abbrev-ref HEAD
bd5293e5abaa76f20b3e6c2f1fe262b1a1347981
master
$ cargo build
error: failed to parse manifest at `/home/naskya/workspace/validator/validator/Cargo.toml`
Caused by:
failed to parse the `edition` key
Caused by:
supported edition values are `2015` or `2018`, but `2021` is unknown
I think the correct MSRV is 1.70.0, because you can compile this crate with Rust 1.70.0 but not with 1.69.x.
Some additional info:
- Rust 2021 edition is stabilized in Rust 1.56.0 (ref).
once_cell 1.19.0
requires Rust 1.60 (ref),yoke 0.7.4
,litemap 0.7.3
, andicu_properties 1.5.1
requires Rust 1.67.- I tried to compile (
cargo build --locked
) this crate with Rust 1.67.0 but got the following errorerror[E0658]: use of unstable library feature 'once_cell' --> validator/src/validation/regex.rs:2:5 | 2 | use std::cell::OnceCell; | ^^^^^^^^^^^^^^^^^^^ | = note: see issue #74465 <https://github.com/rust-lang/rust/issues/74465> for more information
- This feature is stabilized in Rust 1.70.0 (ref)
So I suggest that you add
rust-version = "1.70.0"
in validator/Cargo.toml
and update the documentation.
Moreover, it would be nice if the MSRV is automatically checked by CI (I think you can rustup default 1.70.0 && cargo fetch --locked && cargo check --frozen --all-features
to check the compatibility), given that MSRV may be (unconsciously) bumped by dependency updates.
Anyway, thanks a bunch for maintaining this crate!
I do have the MSRV check in CI in some project but it's troublesome because it changes too much. I'm sometimes tempted to not list anything at all since any text get out of date constantly.