From 7a517af7ea1ab054ea8c7ba9e983856d6c4b0764 Mon Sep 17 00:00:00 2001
From: MoskalykA <100430077+MoskalykA@users.noreply.github.com>
Date: Sun, 27 Oct 2024 18:51:34 +0100
Subject: [PATCH] Deprecate `cargo verify-project`
---
src/bin/cargo/commands/verify_project.rs | 10 +-
src/doc/man/cargo-verify-project.md | 58 ------
src/doc/man/cargo.md | 3 -
.../generated_txt/cargo-verify-project.txt | 137 --------------
src/doc/man/generated_txt/cargo.txt | 3 -
src/doc/src/SUMMARY.md | 1 -
src/doc/src/commands/cargo-verify-project.md | 154 ---------------
src/doc/src/commands/cargo.md | 3 -
src/doc/src/commands/manifest-commands.md | 1 -
src/etc/man/cargo-verify-project.1 | 178 ------------------
src/etc/man/cargo.1 | 4 -
.../cargo_verify_project/help/stdout.term.svg | 36 ++--
12 files changed, 24 insertions(+), 564 deletions(-)
delete mode 100644 src/doc/man/cargo-verify-project.md
delete mode 100644 src/doc/man/generated_txt/cargo-verify-project.txt
delete mode 100644 src/doc/src/commands/cargo-verify-project.md
delete mode 100644 src/etc/man/cargo-verify-project.1
diff --git a/src/bin/cargo/commands/verify_project.rs b/src/bin/cargo/commands/verify_project.rs
index d4c655d33..fae8497b5 100644
--- a/src/bin/cargo/commands/verify_project.rs
+++ b/src/bin/cargo/commands/verify_project.rs
@@ -5,12 +5,14 @@ use std::process;
pub fn cli() -> Command {
subcommand("verify-project")
- .about("Check correctness of crate manifest")
+ .about(
+ "\
+Check correctness of crate manifest.
+
+Deprecated, see https://github.com/rust-lang/cargo/issues/14679.",
+ )
.arg_silent_suggestion()
.arg_manifest_path()
- .after_help(color_print::cstr!(
- "Run `cargo help verify-project>` for more detailed information.\n"
- ))
}
pub fn exec(gctx: &mut GlobalContext, args: &ArgMatches) -> CliResult {
diff --git a/src/doc/man/cargo-verify-project.md b/src/doc/man/cargo-verify-project.md
deleted file mode 100644
index 8b334fb14..000000000
--- a/src/doc/man/cargo-verify-project.md
+++ /dev/null
@@ -1,58 +0,0 @@
-# cargo-verify-project(1)
-
-## NAME
-
-cargo-verify-project --- Check correctness of crate manifest
-
-## SYNOPSIS
-
-`cargo verify-project` [_options_]
-
-## DESCRIPTION
-
-This command will parse the local manifest and check its validity. It emits a
-JSON object with the result. A successful validation will display:
-
- {"success":"true"}
-
-An invalid workspace will display:
-
- {"invalid":"human-readable error message"}
-
-## OPTIONS
-
-### Display Options
-
-{{#options}}
-
-{{> options-display }}
-
-{{/options}}
-
-### Manifest Options
-
-{{#options}}
-
-{{> options-manifest-path }}
-
-{{> options-locked }}
-
-{{/options}}
-
-{{> section-options-common }}
-
-{{> section-environment }}
-
-## EXIT STATUS
-
-* `0`: The workspace is OK.
-* `1`: The workspace is invalid.
-
-## EXAMPLES
-
-1. Check the current workspace for errors:
-
- cargo verify-project
-
-## SEE ALSO
-{{man "cargo" 1}}, {{man "cargo-package" 1}}
diff --git a/src/doc/man/cargo.md b/src/doc/man/cargo.md
index c67b33770..21bfe620a 100644
--- a/src/doc/man/cargo.md
+++ b/src/doc/man/cargo.md
@@ -86,9 +86,6 @@ available at .
{{man "cargo-vendor" 1}}\
Vendor all dependencies locally.
-{{man "cargo-verify-project" 1}}\
- Check correctness of crate manifest.
-
### Package Commands
{{man "cargo-init" 1}}\
diff --git a/src/doc/man/generated_txt/cargo-verify-project.txt b/src/doc/man/generated_txt/cargo-verify-project.txt
deleted file mode 100644
index aca632b5c..000000000
--- a/src/doc/man/generated_txt/cargo-verify-project.txt
+++ /dev/null
@@ -1,137 +0,0 @@
-CARGO-VERIFY-PROJECT(1)
-
-NAME
- cargo-verify-project — Check correctness of crate manifest
-
-SYNOPSIS
- cargo verify-project [options]
-
-DESCRIPTION
- This command will parse the local manifest and check its validity. It
- emits a JSON object with the result. A successful validation will
- display:
-
- {"success":"true"}
-
- An invalid workspace will display:
-
- {"invalid":"human-readable error message"}
-
-OPTIONS
- Display Options
- -v, --verbose
- Use verbose output. May be specified twice for “very verbose”
- output which includes extra output such as dependency warnings and
- build script output. May also be specified with the term.verbose
- config value
- .
-
- -q, --quiet
- Do not print cargo log messages. May also be specified with the
- term.quiet config value
- .
-
- --color when
- Control when colored output is used. Valid values:
-
- o auto (default): Automatically detect if color support is
- available on the terminal.
-
- o always: Always display colors.
-
- o never: Never display colors.
-
- May also be specified with the term.color config value
- .
-
- Manifest Options
- --manifest-path path
- Path to the Cargo.toml file. By default, Cargo searches for the
- Cargo.toml file in the current directory or any parent directory.
-
- --locked
- Asserts that the exact same dependencies and versions are used as
- when the existing Cargo.lock file was originally generated. Cargo
- will exit with an error when either of the following scenarios
- arises:
-
- o The lock file is missing.
-
- o Cargo attempted to change the lock file due to a different
- dependency resolution.
-
- It may be used in environments where deterministic builds are
- desired, such as in CI pipelines.
-
- --offline
- Prevents Cargo from accessing the network for any reason. Without
- this flag, Cargo will stop with an error if it needs to access the
- network and the network is not available. With this flag, Cargo will
- attempt to proceed without the network if possible.
-
- Beware that this may result in different dependency resolution than
- online mode. Cargo will restrict itself to crates that are
- downloaded locally, even if there might be a newer version as
- indicated in the local copy of the index. See the cargo-fetch(1)
- command to download dependencies before going offline.
-
- May also be specified with the net.offline config value
- .
-
- --frozen
- Equivalent to specifying both --locked and --offline.
-
- Common Options
- +toolchain
- If Cargo has been installed with rustup, and the first argument to
- cargo begins with +, it will be interpreted as a rustup toolchain
- name (such as +stable or +nightly). See the rustup documentation
- for more
- information about how toolchain overrides work.
-
- --config KEY=VALUE or PATH
- Overrides a Cargo configuration value. The argument should be in
- TOML syntax of KEY=VALUE, or provided as a path to an extra
- configuration file. This flag may be specified multiple times. See
- the command-line overrides section
-
- for more information.
-
- -C PATH
- Changes the current working directory before executing any specified
- operations. This affects things like where cargo looks by default
- for the project manifest (Cargo.toml), as well as the directories
- searched for discovering .cargo/config.toml, for example. This
- option must appear before the command name, for example cargo -C
- path/to/my-project build.
-
- This option is only available on the nightly channel
- and
- requires the -Z unstable-options flag to enable (see #10098
- ).
-
- -h, --help
- Prints help information.
-
- -Z flag
- Unstable (nightly-only) flags to Cargo. Run cargo -Z help for
- details.
-
-ENVIRONMENT
- See the reference
-
- for details on environment variables that Cargo reads.
-
-EXIT STATUS
- o 0: The workspace is OK.
-
- o 1: The workspace is invalid.
-
-EXAMPLES
- 1. Check the current workspace for errors:
-
- cargo verify-project
-
-SEE ALSO
- cargo(1), cargo-package(1)
-
diff --git a/src/doc/man/generated_txt/cargo.txt b/src/doc/man/generated_txt/cargo.txt
index b010d94e5..b2e359fa5 100644
--- a/src/doc/man/generated_txt/cargo.txt
+++ b/src/doc/man/generated_txt/cargo.txt
@@ -82,9 +82,6 @@ COMMANDS
cargo-vendor(1)
Vendor all dependencies locally.
- cargo-verify-project(1)
- Check correctness of crate manifest.
-
Package Commands
cargo-init(1)
Create a new Cargo package in an existing directory.
diff --git a/src/doc/src/SUMMARY.md b/src/doc/src/SUMMARY.md
index 92324f2f6..3fc20e31a 100644
--- a/src/doc/src/SUMMARY.md
+++ b/src/doc/src/SUMMARY.md
@@ -81,7 +81,6 @@
* [cargo tree](commands/cargo-tree.md)
* [cargo update](commands/cargo-update.md)
* [cargo vendor](commands/cargo-vendor.md)
- * [cargo verify-project](commands/cargo-verify-project.md)
* [Package Commands](commands/package-commands.md)
* [cargo init](commands/cargo-init.md)
* [cargo install](commands/cargo-install.md)
diff --git a/src/doc/src/commands/cargo-verify-project.md b/src/doc/src/commands/cargo-verify-project.md
deleted file mode 100644
index 68bd00344..000000000
--- a/src/doc/src/commands/cargo-verify-project.md
+++ /dev/null
@@ -1,154 +0,0 @@
-# cargo-verify-project(1)
-
-## NAME
-
-cargo-verify-project --- Check correctness of crate manifest
-
-## SYNOPSIS
-
-`cargo verify-project` [_options_]
-
-## DESCRIPTION
-
-This command will parse the local manifest and check its validity. It emits a
-JSON object with the result. A successful validation will display:
-
- {"success":"true"}
-
-An invalid workspace will display:
-
- {"invalid":"human-readable error message"}
-
-## OPTIONS
-
-### Display Options
-
-
-
--v
---verbose
-- Use verbose output. May be specified twice for “very verbose” output which
-includes extra output such as dependency warnings and build script output.
-May also be specified with the
term.verbose
-config value.
-
-
--q
---quiet
-- Do not print cargo log messages.
-May also be specified with the
term.quiet
-config value.
-
-
---color
when
-- Control when colored output is used. Valid values:
-
-auto
(default): Automatically detect if color support is available on the
-terminal.
-always
: Always display colors.
-never
: Never display colors.
-
-May also be specified with the term.color
-config value.
-
-
-
-
-### Manifest Options
-
-
-
---manifest-path
path
-- Path to the
Cargo.toml
file. By default, Cargo searches for the
-Cargo.toml
file in the current directory or any parent directory.
-
-
---locked
-- Asserts that the exact same dependencies and versions are used as when the
-existing
Cargo.lock
file was originally generated. Cargo will exit with an
-error when either of the following scenarios arises:
-
-- The lock file is missing.
-- Cargo attempted to change the lock file due to a different dependency resolution.
-
-It may be used in environments where deterministic builds are desired,
-such as in CI pipelines.
-
-
---offline
-- Prevents Cargo from accessing the network for any reason. Without this
-flag, Cargo will stop with an error if it needs to access the network and
-the network is not available. With this flag, Cargo will attempt to
-proceed without the network if possible.
-
Beware that this may result in different dependency resolution than online
-mode. Cargo will restrict itself to crates that are downloaded locally, even
-if there might be a newer version as indicated in the local copy of the index.
-See the cargo-fetch(1) command to download dependencies before going
-offline.
-May also be specified with the net.offline
config value.
-
-
---frozen
-- Equivalent to specifying both
--locked
and --offline
.
-
-
-
-
-### Common Options
-
-
-
-+
toolchain
-- If Cargo has been installed with rustup, and the first argument to
cargo
-begins with +
, it will be interpreted as a rustup toolchain name (such
-as +stable
or +nightly
).
-See the rustup documentation
-for more information about how toolchain overrides work.
-
-
---config
KEY=VALUE or PATH
-- Overrides a Cargo configuration value. The argument should be in TOML syntax of
KEY=VALUE
,
-or provided as a path to an extra configuration file. This flag may be specified multiple times.
-See the command-line overrides section for more information.
-
-
--C
PATH
-- Changes the current working directory before executing any specified operations. This affects
-things like where cargo looks by default for the project manifest (
Cargo.toml
), as well as
-the directories searched for discovering .cargo/config.toml
, for example. This option must
-appear before the command name, for example cargo -C path/to/my-project build
.
-This option is only available on the nightly
-channel and
-requires the -Z unstable-options
flag to enable (see
-#10098).
-
-
--h
---help
-- Prints help information.
-
-
--Z
flag
-- Unstable (nightly-only) flags to Cargo. Run
cargo -Z help
for details.
-
-
-
-
-## ENVIRONMENT
-
-See [the reference](../reference/environment-variables.html) for
-details on environment variables that Cargo reads.
-
-## EXIT STATUS
-
-* `0`: The workspace is OK.
-* `1`: The workspace is invalid.
-
-## EXAMPLES
-
-1. Check the current workspace for errors:
-
- cargo verify-project
-
-## SEE ALSO
-[cargo(1)](cargo.html), [cargo-package(1)](cargo-package.html)
diff --git a/src/doc/src/commands/cargo.md b/src/doc/src/commands/cargo.md
index f6d7fc599..7a3039725 100644
--- a/src/doc/src/commands/cargo.md
+++ b/src/doc/src/commands/cargo.md
@@ -86,9 +86,6 @@ available at .
[cargo-vendor(1)](cargo-vendor.html)\
Vendor all dependencies locally.
-[cargo-verify-project(1)](cargo-verify-project.html)\
- Check correctness of crate manifest.
-
### Package Commands
[cargo-init(1)](cargo-init.html)\
diff --git a/src/doc/src/commands/manifest-commands.md b/src/doc/src/commands/manifest-commands.md
index b83e7b930..346794ebb 100644
--- a/src/doc/src/commands/manifest-commands.md
+++ b/src/doc/src/commands/manifest-commands.md
@@ -10,4 +10,3 @@
* [cargo tree](cargo-tree.md)
* [cargo update](cargo-update.md)
* [cargo vendor](cargo-vendor.md)
-* [cargo verify-project](cargo-verify-project.md)
diff --git a/src/etc/man/cargo-verify-project.1 b/src/etc/man/cargo-verify-project.1
deleted file mode 100644
index b0e6d8c7c..000000000
--- a/src/etc/man/cargo-verify-project.1
+++ /dev/null
@@ -1,178 +0,0 @@
-'\" t
-.TH "CARGO\-VERIFY\-PROJECT" "1"
-.nh
-.ad l
-.ss \n[.ss] 0
-.SH "NAME"
-cargo\-verify\-project \[em] Check correctness of crate manifest
-.SH "SYNOPSIS"
-\fBcargo verify\-project\fR [\fIoptions\fR]
-.SH "DESCRIPTION"
-This command will parse the local manifest and check its validity. It emits a
-JSON object with the result. A successful validation will display:
-.sp
-.RS 4
-.nf
-{"success":"true"}
-.fi
-.RE
-.sp
-An invalid workspace will display:
-.sp
-.RS 4
-.nf
-{"invalid":"human\-readable error message"}
-.fi
-.RE
-.SH "OPTIONS"
-.SS "Display Options"
-.sp
-\fB\-v\fR,
-\fB\-\-verbose\fR
-.RS 4
-Use verbose output. May be specified twice for \[lq]very verbose\[rq] output which
-includes extra output such as dependency warnings and build script output.
-May also be specified with the \fBterm.verbose\fR
-\fIconfig value\fR \&.
-.RE
-.sp
-\fB\-q\fR,
-\fB\-\-quiet\fR
-.RS 4
-Do not print cargo log messages.
-May also be specified with the \fBterm.quiet\fR
-\fIconfig value\fR \&.
-.RE
-.sp
-\fB\-\-color\fR \fIwhen\fR
-.RS 4
-Control when colored output is used. Valid values:
-.sp
-.RS 4
-\h'-04'\(bu\h'+02'\fBauto\fR (default): Automatically detect if color support is available on the
-terminal.
-.RE
-.sp
-.RS 4
-\h'-04'\(bu\h'+02'\fBalways\fR: Always display colors.
-.RE
-.sp
-.RS 4
-\h'-04'\(bu\h'+02'\fBnever\fR: Never display colors.
-.RE
-.sp
-May also be specified with the \fBterm.color\fR
-\fIconfig value\fR \&.
-.RE
-.SS "Manifest Options"
-.sp
-\fB\-\-manifest\-path\fR \fIpath\fR
-.RS 4
-Path to the \fBCargo.toml\fR file. By default, Cargo searches for the
-\fBCargo.toml\fR file in the current directory or any parent directory.
-.RE
-.sp
-\fB\-\-locked\fR
-.RS 4
-Asserts that the exact same dependencies and versions are used as when the
-existing \fBCargo.lock\fR file was originally generated. Cargo will exit with an
-error when either of the following scenarios arises:
-.sp
-.RS 4
-\h'-04'\(bu\h'+02'The lock file is missing.
-.RE
-.sp
-.RS 4
-\h'-04'\(bu\h'+02'Cargo attempted to change the lock file due to a different dependency resolution.
-.RE
-.sp
-It may be used in environments where deterministic builds are desired,
-such as in CI pipelines.
-.RE
-.sp
-\fB\-\-offline\fR
-.RS 4
-Prevents Cargo from accessing the network for any reason. Without this
-flag, Cargo will stop with an error if it needs to access the network and
-the network is not available. With this flag, Cargo will attempt to
-proceed without the network if possible.
-.sp
-Beware that this may result in different dependency resolution than online
-mode. Cargo will restrict itself to crates that are downloaded locally, even
-if there might be a newer version as indicated in the local copy of the index.
-See the \fBcargo\-fetch\fR(1) command to download dependencies before going
-offline.
-.sp
-May also be specified with the \fBnet.offline\fR \fIconfig value\fR \&.
-.RE
-.sp
-\fB\-\-frozen\fR
-.RS 4
-Equivalent to specifying both \fB\-\-locked\fR and \fB\-\-offline\fR\&.
-.RE
-.SS "Common Options"
-.sp
-\fB+\fR\fItoolchain\fR
-.RS 4
-If Cargo has been installed with rustup, and the first argument to \fBcargo\fR
-begins with \fB+\fR, it will be interpreted as a rustup toolchain name (such
-as \fB+stable\fR or \fB+nightly\fR).
-See the \fIrustup documentation\fR
-for more information about how toolchain overrides work.
-.RE
-.sp
-\fB\-\-config\fR \fIKEY=VALUE\fR or \fIPATH\fR
-.RS 4
-Overrides a Cargo configuration value. The argument should be in TOML syntax of \fBKEY=VALUE\fR,
-or provided as a path to an extra configuration file. This flag may be specified multiple times.
-See the \fIcommand\-line overrides section\fR for more information.
-.RE
-.sp
-\fB\-C\fR \fIPATH\fR
-.RS 4
-Changes the current working directory before executing any specified operations. This affects
-things like where cargo looks by default for the project manifest (\fBCargo.toml\fR), as well as
-the directories searched for discovering \fB\&.cargo/config.toml\fR, for example. This option must
-appear before the command name, for example \fBcargo \-C path/to/my\-project build\fR\&.
-.sp
-This option is only available on the \fInightly
-channel\fR and
-requires the \fB\-Z unstable\-options\fR flag to enable (see
-\fI#10098\fR ).
-.RE
-.sp
-\fB\-h\fR,
-\fB\-\-help\fR
-.RS 4
-Prints help information.
-.RE
-.sp
-\fB\-Z\fR \fIflag\fR
-.RS 4
-Unstable (nightly\-only) flags to Cargo. Run \fBcargo \-Z help\fR for details.
-.RE
-.SH "ENVIRONMENT"
-See \fIthe reference\fR for
-details on environment variables that Cargo reads.
-.SH "EXIT STATUS"
-.sp
-.RS 4
-\h'-04'\(bu\h'+02'\fB0\fR: The workspace is OK.
-.RE
-.sp
-.RS 4
-\h'-04'\(bu\h'+02'\fB1\fR: The workspace is invalid.
-.RE
-.SH "EXAMPLES"
-.sp
-.RS 4
-\h'-04' 1.\h'+01'Check the current workspace for errors:
-.sp
-.RS 4
-.nf
-cargo verify\-project
-.fi
-.RE
-.RE
-.SH "SEE ALSO"
-\fBcargo\fR(1), \fBcargo\-package\fR(1)
diff --git a/src/etc/man/cargo.1 b/src/etc/man/cargo.1
index b285d67bd..37465bf3b 100644
--- a/src/etc/man/cargo.1
+++ b/src/etc/man/cargo.1
@@ -103,10 +103,6 @@ available at \&.
\fBcargo\-vendor\fR(1)
.br
\ \ \ \ Vendor all dependencies locally.
-.sp
-\fBcargo\-verify\-project\fR(1)
-.br
-\ \ \ \ Check correctness of crate manifest.
.SS "Package Commands"
\fBcargo\-init\fR(1)
.br
diff --git a/tests/testsuite/cargo_verify_project/help/stdout.term.svg b/tests/testsuite/cargo_verify_project/help/stdout.term.svg
index 63185d62a..921efb0c6 100644
--- a/tests/testsuite/cargo_verify_project/help/stdout.term.svg
+++ b/tests/testsuite/cargo_verify_project/help/stdout.term.svg
@@ -19,45 +19,45 @@
- Check correctness of crate manifest
+ Check correctness of crate manifest.
- Usage: cargo[EXE] verify-project [OPTIONS]
+ Deprecated, see https://github.com/rust-lang/cargo/issues/14679.
- Options:
+ Usage: cargo[EXE] verify-project [OPTIONS]
- -v, --verbose... Use verbose output (-vv very verbose/build.rs output)
+
- -q, --quiet Do not print cargo log messages
+ Options:
- --color <WHEN> Coloring: auto, always, never
+ -v, --verbose... Use verbose output (-vv very verbose/build.rs output)
- --config <KEY=VALUE|PATH> Override a configuration value
+ -q, --quiet Do not print cargo log messages
- -Z <FLAG> Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for
+ --color <WHEN> Coloring: auto, always, never
- details
+ --config <KEY=VALUE|PATH> Override a configuration value
- -h, --help Print help
+ -Z <FLAG> Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for
-
+ details
- Manifest Options:
+ -h, --help Print help
- --manifest-path <PATH> Path to Cargo.toml
+
- --locked Assert that `Cargo.lock` will remain unchanged
+ Manifest Options:
- --offline Run without accessing the network
+ --manifest-path <PATH> Path to Cargo.toml
- --frozen Equivalent to specifying both --locked and --offline
+ --locked Assert that `Cargo.lock` will remain unchanged
-
+ --offline Run without accessing the network
- Run `cargo help verify-project` for more detailed information.
+ --frozen Equivalent to specifying both --locked and --offline