diff --git a/.clippy.toml b/.clippy.toml
index 3b66266f..6bfeada7 100644
--- a/.clippy.toml
+++ b/.clippy.toml
@@ -1 +1 @@
-msrv = "1.61"
+msrv = "1.62"
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index efe8c2c3..71c33910 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -26,7 +26,7 @@ jobs:
# pinned (MSRV) rust version :: ubuntu
- build: msrv
os: ubuntu-18.04
- rust: 1.61.0
+ rust: 1.62.0
# latest rust stable :: ubuntu
- build: stable
diff --git a/Cargo.lock b/Cargo.lock
index 3d1d536b..1eb41f4a 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -519,26 +519,24 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
[[package]]
name = "clap"
-version = "3.2.22"
+version = "4.0.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "86447ad904c7fb335a790c9d7fe3d0d971dc523b8ccd1561a520de9a85302750"
+checksum = "0a1af219c3e254a8b4649d6ddaef886b2015089f35f2ac5e1db31410c0566ab8"
dependencies = [
"atty",
"bitflags",
"clap_derive",
"clap_lex",
- "indexmap",
"once_cell",
"strsim",
"termcolor",
- "textwrap",
]
[[package]]
name = "clap_derive"
-version = "3.2.18"
+version = "4.0.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ea0c8bce528c4be4da13ea6fead8965e95b6073585a2f05204bd8f4119f82a65"
+checksum = "cd114ae53ce5a0670f43d2f169c1cd26c69b4896b0c121900cf1e4d06d67316c"
dependencies = [
"heck",
"proc-macro-error",
@@ -549,9 +547,9 @@ dependencies = [
[[package]]
name = "clap_lex"
-version = "0.2.4"
+version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5"
+checksum = "0d4198f73e42b4936b35b5bb248d81d2b595ecb170da0bac7655c54eedfa8da8"
dependencies = [
"os_str_bytes",
]
@@ -1509,9 +1507,9 @@ dependencies = [
[[package]]
name = "proc-macro2"
-version = "1.0.41"
+version = "1.0.46"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cdcc2916cde080c1876ff40292a396541241fe0072ef928cd76582e9ea5d60d2"
+checksum = "94e2ef8dbfc347b10c094890f778ee2e36ca9bb4262e86dc99cd217e35f3470b"
dependencies = [
"unicode-ident",
]
@@ -1989,12 +1987,6 @@ dependencies = [
"rand",
]
-[[package]]
-name = "textwrap"
-version = "0.15.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "949517c0cf1bf4ee812e2e07e08ab448e3ae0d23472aee8a06c985f0c8815b16"
-
[[package]]
name = "thiserror"
version = "1.0.37"
diff --git a/Cargo.toml b/Cargo.toml
index 057ca5e7..2f66acc3 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -6,7 +6,7 @@ description = "Find your minimum supported Rust version (MSRV)!"
license = "Apache-2.0 OR MIT"
edition = "2018"
repository = "https://github.com/foresterre/cargo-msrv"
-rust-version = "1.61"
+rust-version = "1.62"
keywords = ["msrv", "rust-version", "toolchain", "find", "minimum"]
categories = ["development-tools", "development-tools::cargo-plugins", "command-line-utilities"]
@@ -25,7 +25,7 @@ tag-name = "v{{version}}"
[dependencies]
# Used for parsing cli arguments.
-clap = { version = "3.2.22", features = ["derive"] }
+clap = { version = "4.0.7", features = ["derive"] }
# UI
indicatif = "0.17.1"
diff --git a/README.md b/README.md
index a2fbd273..069a635b 100644
--- a/README.md
+++ b/README.md
@@ -3,7 +3,7 @@
This crate can assist you in finding the Minimum Supported Rust Version for a crate.
In this readme you'll find everything to get you started. You can find more detailed explanations in the
-[cargo-msrv book](https://foresterre.github.io/cargo-msrv/index.html).
+[cargo-msrv book](https://foresterre.github.io/cargo-msrv/index.html).
### Install
@@ -26,7 +26,7 @@ From the Arch Linux [community repository](https://archlinux.org/packages/commun
### Usage
-* [`cargo msrv`](https://foresterre.github.io/cargo-msrv/commands/find.html) or [`cargo msrv --linear`](https://foresterre.github.io/cargo-msrv/commands/find.html) to find the MSRV for a Cargo project in your current working directory.
+* [`cargo msrv`](https://foresterre.github.io/cargo-msrv/commands/find.html) or [`cargo msrv --linear`](https://foresterre.github.io/cargo-msrv/commands/find.html) to find the MSRV for a Cargo project in your current working directory.
* [`cargo msrv --path
`](https://foresterre.github.io/cargo-msrv/commands/find.html) to find the MSRV for a Cargo project in the `` directory.
* [`cargo msrv -- `](https://foresterre.github.io/cargo-msrv/commands/find.html) to use `` as the compatibility check which decides whether a Rust version is
compatible or not. This command should be runnable through rustup as `rustup run `.
@@ -34,7 +34,7 @@ From the Arch Linux [community repository](https://archlinux.org/packages/commun
* A crate author may specify the MSRV using the `package.rust-version` (Rust >=1.56) or the `package.metadata.msrv` key
in the 'Cargo.toml' manifest. See the [book](https://foresterre.github.io/cargo-msrv/commands/list.html#description)
for a more detailed description.
-* [`cargo msrv list`](https://foresterre.github.io/cargo-msrv/commands/list.html) to list the MSRV's of your dependencies as specified by their authors
+* [`cargo msrv list`](https://foresterre.github.io/cargo-msrv/commands/list.html) to list the MSRV's of your dependencies as specified by their authors
* [`cargo msrv show`](https://foresterre.github.io/cargo-msrv/commands/show.html) to show the currently specified MSRV
Please refer to the [commands](https://foresterre.github.io/cargo-msrv/commands/index.html) chapter in the cargo-msrv
@@ -43,99 +43,141 @@ book for more detailed descriptions of the supported (sub) commands.
**Options**
```
-cargo-msrv
-Martijn Gribnau
-Helps with finding the Minimal Supported Rust Version (MSRV)
-
-USAGE:
- cargo msrv [OPTIONS] or cargo-msrv [OPTIONS]
-
-OPTIONS:
- --bisect
- Use a binary search to find the MSRV instead of a linear search
-
- -h, --help
- Prints help information
-
- --include-all-patch-releases
- Include all patch releases, instead of only the last
-
- --linear
- Use a linear search to find the MSRV, by checking toolchains from latest to earliest
-
- --ignore-lockfile
- Temporarily removes the lockfile, so it will not interfere with the building process. This is important when
- testing against Rust versions prior to 1.38.0, for which Cargo does not recognize the new v2 lockfile.
- --log-level
- Specify the verbosity of logs the program should output [default: info] [possible values:
- error, warn, info, debug, trace]
- --log-target
- Specify where the program should output its logs [default: file] [possible values: file,
- stdout]
- --max
- Latest (most recent) version to take into account.Version must match a valid Rust toolchain, and be semver
- compatible. [aliases: maximum]
- --min
- Earliest (least recent) version to take into account. Version must match a valid Rust toolchain, and be
- semver compatible. Edition aliases may also be used. [aliases: minimum]
- --no-check-feedback
- If provided, the outcome of each individual check will not be printed.
-
- --no-log
- Disable logging
-
- --no-read-min-edition
- If provided, the 'package.edition' value in the Cargo.toml will not be used to reduce search space.
-
- --output-format
- Output status messages in machine-readable format. Machine-readable status updates will be printed in the
- requested format to stdout. [possible values: json, void]
- --release-source
- Select the rust-releases source to use as the release index [default: rust-changelog] [possible
- values: rust-changelog, rust-dist]
- --path
- Path to the cargo project directory
-
- --target
- Check against a custom target (instead of the rustup default)
-
- --toolchain-file
- Output a rust-toolchain file with the MSRV as toolchain. The toolchain file will pin the Rust version for
- this crate. See https://rust-lang.github.io/rustup/overrides.html#the-toolchain-file for more.
- -V, --version
- Prints version information
-
- --verify
- Verify the MSRV defined in the 'package.rust-version' or the 'package.metadata.msrv' key in Cargo.toml. When
- this flag is present, cargo-msrv will not attempt to determine the true MSRV. Instead it attempts to verify
- whether for the specified MSRV, the `check` command passes. This is similar to how we determine whether a
- Rust toolchain version is compatible for your crate or not. DEPRECATED: use the `cargo msrv verify`
- subcommand instead.
-
-ARGS:
- ...
- If given, this command is used to validate if a Rust version is compatible. Should be available to rustup,
- i.e. the command should work like so: `rustup run `. The default check action is `cargo
- check --all`.
-
-SUBCOMMANDS:
- help
- Prints this message or the help of the given subcommand(s)
-
- list
- List the MSRV's specified by dependency crate authors.
-
- show
- Show the MSRV of your crate, as specified in the Cargo manifest.
-
- verify
- Verify whether the MSRV is satisfiable. The MSRV must be specified using the 'package.rust-version' or
- 'package.metadata.msrv' key in the Cargo.toml manifest.
-
-An argument provided after two dashes (`--`), will be interpreted as a custom command `check` command, used to validate
-whether a Rust toolchain version is compatible. The default `check` command is "cargo build". A custom `check` command
-should be runnable by rustup, as they will be passed on to rustup like so: `rustup run `. You'll
-only need to provide the part.
+Find your Minimum Supported Rust Version!
+
+Usage: cargo msrv [OPTIONS] [-- ...] [COMMAND]
+
+Commands:
+ list
+ Display the MSRV's of dependencies
+ set
+ Set the MSRV of the current crate to a given Rust version
+ show
+ Show the MSRV of your crate, as specified in the Cargo manifest
+ verify
+ Verify whether the MSRV is satisfiable. The MSRV must be specified using the 'package.rust-version' or 'package.metadata.msrv' key in the Cargo.toml manifest
+ help
+ Print this message or the help of the given subcommand(s)
+
+Options:
+ -h, --help
+ Print help information (use `-h` for a summary)
+
+ -V, --version
+ Print version information
+
+Find MSRV options:
+ --bisect
+ Use a binary search to find the MSRV (default)
+
+ When the search space is sufficiently large, which is common, this is much faster than a linear search. A binary search will approximately halve the search space for each Rust version checked for compatibility.
+
+ --linear
+ Use a linear search to find the MSRV
+
+ This method checks toolchain from the most recent release to the earliest.
+
+ --write-toolchain-file
+ Pin the MSRV by writing the version to a rust-toolchain file
+
+ The toolchain file will pin the Rust version for this crate. See https://rust-lang.github.io/rustup/overrides.html#the-toolchain-file for more.
+
+ --ignore-lockfile
+ Temporarily remove the lockfile, so it will not interfere with the building process
+
+ This is important when testing against older Rust versions such as Cargo versions prior to Rust 1.38.0, for which Cargo does not recognize the newer lockfile formats.
+
+ --no-read-min-edition
+ Don't read the `edition` of the crate and do not use its value to reduce the search space
+
+ --no-check-feedback
+ Don't print the result of compatibility checks
+
+ The feedback of a compatibility check can be useful to determine why a certain Rust version is not compatible. Rust usually prints very detailed error messages. While most often very useful, in some cases they may be too noisy or lengthy. If this flag is given, the result messages will not be printed.
+
+ --write-msrv
+ Write the MSRV to the Cargo manifest
+
+ For toolchains which include a Cargo version which supports the rust-version field, the `package.rust-version` field will be written. For older Rust toolchains, the `package.metadata.msrv` field will be written instead.
+
+Rust releases options:
+ --min
+ Least recent version or edition to take into account
+
+ Given version must match a valid Rust toolchain, and be semver compatible, be a two component `major.minor` version. or match a Rust edition alias.
+
+ For example, the edition alias "2018" would match Rust version `1.31.0`, since that's the first version which added support for the Rust 2018 edition.
+
+ --max
+ Most recent version to take into account
+
+ Given version must match a valid Rust toolchain, and be semver compatible, or be a two component `major.minor` version.
+
+ --include-all-patch-releases
+ Include all patch releases, instead of only the last
+
+ --release-source