Bump Rust edition, use caret requirements, upgrade to clap 4 #104
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Running
cargo msrv
revealed that the minimum Rust version of this crate is already 1.64.0 so bumping the Rust edition does not effect the minimum. Also caret requirements are looser than tilde but still semver compatible so it should be good to switch (when a version is just like "2.33"cargo
defaults to caret requirements)I have also decided to migrate the crate to clap 4 because clap 2 and 3 depend on an unmaintained crate with a potential security vulnerability https://rustsec.org/advisories/RUSTSEC-2021-0145
I placed the details on the migration to clap 4 in the corresponding commit message
I have ran both
cargo build
andcargo test
and everything still worksHowever, the migration to the latest version of clap 4 does raise the msrv to 1.74.1
Alternatively clap and clap_complete could be pinned at version 4.2.1 to instead only have an msrv increase to 1.67.1.
Since they bumped their internal dependencies in 4.2.2
Feel free to ask any questions about this PR
Migration guide to clap 3
Migration guide to clap 4