diff --git a/src/cargo/util/command_prelude.rs b/src/cargo/util/command_prelude.rs index 84545ae998e5..ed4706538643 100644 --- a/src/cargo/util/command_prelude.rs +++ b/src/cargo/util/command_prelude.rs @@ -87,7 +87,7 @@ pub trait CommandExt: Sized { self.arg_jobs()._arg( flag( "keep-going", - "Do not abort the build as soon as there is an error (unstable)", + "Do not abort the build as soon as there is an error", ) .help_heading(heading::COMPILATION_OPTIONS), ) @@ -627,11 +627,6 @@ pub trait ArgMatchesExt { } } - if build_config.keep_going { - config - .cli_unstable() - .fail_if_stable_opt("--keep-going", 10496)?; - } if build_config.build_plan { config .cli_unstable() diff --git a/src/doc/man/cargo-bench.md b/src/doc/man/cargo-bench.md index 18771c3d21e4..b401e9d1c5da 100644 --- a/src/doc/man/cargo-bench.md +++ b/src/doc/man/cargo-bench.md @@ -157,9 +157,16 @@ Rust test harness runs benchmarks serially in a single thread. {{#options}} {{> options-jobs }} -{{> options-keep-going }} {{/options}} +While `cargo bench` involves compilation, it does not provide a `--keep-going` +flag. Use `--no-fail-fast` to run as many benchmarks as possible without +stopping at the first failure. To "compile" as many benchmarks as possible, use +`--benches` to build benchmark binaries separately. For example: + + cargo build --benches --release --keep-going + cargo bench --no-fail-fast + {{> section-environment }} {{> section-exit-status }} diff --git a/src/doc/man/cargo-test.md b/src/doc/man/cargo-test.md index cba98b20daf9..9c818d9c6868 100644 --- a/src/doc/man/cargo-test.md +++ b/src/doc/man/cargo-test.md @@ -190,6 +190,14 @@ includes an option to control the number of threads used: {{/options}} +While `cargo test` involves compilation, it does not provide a `--keep-going` +flag. Use `--no-fail-fast` to run as many tests as possible without stopping at +the first failure. To "compile" as many tests as possible, use `--tests` to +build test binaries separately. For example: + + cargo build --tests --keep-going + cargo test --tests --no-fail-fast + {{> section-environment }} {{> section-exit-status }} diff --git a/src/doc/man/generated_txt/cargo-bench.txt b/src/doc/man/generated_txt/cargo-bench.txt index 9610b72f0409..796fbd11b552 100644 --- a/src/doc/man/generated_txt/cargo-bench.txt +++ b/src/doc/man/generated_txt/cargo-bench.txt @@ -413,10 +413,14 @@ OPTIONS If a string default is provided, it sets the value back to defaults. Should not be 0. - --keep-going - Build as many crates in the dependency graph as possible, rather - than aborting the build on the first one that fails to build. - Unstable, requires -Zunstable-options. + While cargo bench involves compilation, it does not provide a + --keep-going flag. Use --no-fail-fast to run as many benchmarks as + possible without stopping at the first failure. To “compile” as many + benchmarks as possible, use --benches to build benchmark binaries + separately. For example: + + cargo build --benches --release --keep-going + cargo bench --no-fail-fast ENVIRONMENT See the reference diff --git a/src/doc/man/generated_txt/cargo-build.txt b/src/doc/man/generated_txt/cargo-build.txt index e396410d3291..8583a2b8f7d0 100644 --- a/src/doc/man/generated_txt/cargo-build.txt +++ b/src/doc/man/generated_txt/cargo-build.txt @@ -347,7 +347,13 @@ OPTIONS --keep-going Build as many crates in the dependency graph as possible, rather than aborting the build on the first one that fails to build. - Unstable, requires -Zunstable-options. + + For example if the current package depends on dependencies fails and + works, one of which fails to build, cargo check -j1 may or may not + build the one that succeeds (depending on which one of the two + builds Cargo picked to run first), whereas cargo check -j1 + --keep-going would definitely run both builds, even if the one run + first fails. --future-incompat-report Displays a future-incompat report for any future-incompatible diff --git a/src/doc/man/generated_txt/cargo-check.txt b/src/doc/man/generated_txt/cargo-check.txt index 9814f445d2d6..b447455eec54 100644 --- a/src/doc/man/generated_txt/cargo-check.txt +++ b/src/doc/man/generated_txt/cargo-check.txt @@ -332,7 +332,13 @@ OPTIONS --keep-going Build as many crates in the dependency graph as possible, rather than aborting the build on the first one that fails to build. - Unstable, requires -Zunstable-options. + + For example if the current package depends on dependencies fails and + works, one of which fails to build, cargo check -j1 may or may not + build the one that succeeds (depending on which one of the two + builds Cargo picked to run first), whereas cargo check -j1 + --keep-going would definitely run both builds, even if the one run + first fails. --future-incompat-report Displays a future-incompat report for any future-incompatible diff --git a/src/doc/man/generated_txt/cargo-doc.txt b/src/doc/man/generated_txt/cargo-doc.txt index 09f9b68c975a..0cc8900475f3 100644 --- a/src/doc/man/generated_txt/cargo-doc.txt +++ b/src/doc/man/generated_txt/cargo-doc.txt @@ -303,7 +303,13 @@ OPTIONS --keep-going Build as many crates in the dependency graph as possible, rather than aborting the build on the first one that fails to build. - Unstable, requires -Zunstable-options. + + For example if the current package depends on dependencies fails and + works, one of which fails to build, cargo check -j1 may or may not + build the one that succeeds (depending on which one of the two + builds Cargo picked to run first), whereas cargo check -j1 + --keep-going would definitely run both builds, even if the one run + first fails. ENVIRONMENT See the reference diff --git a/src/doc/man/generated_txt/cargo-fix.txt b/src/doc/man/generated_txt/cargo-fix.txt index b83c360eb3df..d8c99ca6399d 100644 --- a/src/doc/man/generated_txt/cargo-fix.txt +++ b/src/doc/man/generated_txt/cargo-fix.txt @@ -405,7 +405,13 @@ OPTIONS --keep-going Build as many crates in the dependency graph as possible, rather than aborting the build on the first one that fails to build. - Unstable, requires -Zunstable-options. + + For example if the current package depends on dependencies fails and + works, one of which fails to build, cargo check -j1 may or may not + build the one that succeeds (depending on which one of the two + builds Cargo picked to run first), whereas cargo check -j1 + --keep-going would definitely run both builds, even if the one run + first fails. ENVIRONMENT See the reference diff --git a/src/doc/man/generated_txt/cargo-install.txt b/src/doc/man/generated_txt/cargo-install.txt index a5b696111c87..1323dcc0f471 100644 --- a/src/doc/man/generated_txt/cargo-install.txt +++ b/src/doc/man/generated_txt/cargo-install.txt @@ -280,7 +280,13 @@ OPTIONS --keep-going Build as many crates in the dependency graph as possible, rather than aborting the build on the first one that fails to build. - Unstable, requires -Zunstable-options. + + For example if the current package depends on dependencies fails and + works, one of which fails to build, cargo check -j1 may or may not + build the one that succeeds (depending on which one of the two + builds Cargo picked to run first), whereas cargo check -j1 + --keep-going would definitely run both builds, even if the one run + first fails. Display Options -v, --verbose diff --git a/src/doc/man/generated_txt/cargo-package.txt b/src/doc/man/generated_txt/cargo-package.txt index 1201f3d07e05..939247d01499 100644 --- a/src/doc/man/generated_txt/cargo-package.txt +++ b/src/doc/man/generated_txt/cargo-package.txt @@ -197,7 +197,13 @@ OPTIONS --keep-going Build as many crates in the dependency graph as possible, rather than aborting the build on the first one that fails to build. - Unstable, requires -Zunstable-options. + + For example if the current package depends on dependencies fails and + works, one of which fails to build, cargo check -j1 may or may not + build the one that succeeds (depending on which one of the two + builds Cargo picked to run first), whereas cargo check -j1 + --keep-going would definitely run both builds, even if the one run + first fails. Display Options -v, --verbose diff --git a/src/doc/man/generated_txt/cargo-publish.txt b/src/doc/man/generated_txt/cargo-publish.txt index e8850e3d417c..3e094bd454a7 100644 --- a/src/doc/man/generated_txt/cargo-publish.txt +++ b/src/doc/man/generated_txt/cargo-publish.txt @@ -163,7 +163,13 @@ OPTIONS --keep-going Build as many crates in the dependency graph as possible, rather than aborting the build on the first one that fails to build. - Unstable, requires -Zunstable-options. + + For example if the current package depends on dependencies fails and + works, one of which fails to build, cargo check -j1 may or may not + build the one that succeeds (depending on which one of the two + builds Cargo picked to run first), whereas cargo check -j1 + --keep-going would definitely run both builds, even if the one run + first fails. Display Options -v, --verbose diff --git a/src/doc/man/generated_txt/cargo-run.txt b/src/doc/man/generated_txt/cargo-run.txt index 5fcfe66b4227..0a50bb2480d9 100644 --- a/src/doc/man/generated_txt/cargo-run.txt +++ b/src/doc/man/generated_txt/cargo-run.txt @@ -251,7 +251,13 @@ OPTIONS --keep-going Build as many crates in the dependency graph as possible, rather than aborting the build on the first one that fails to build. - Unstable, requires -Zunstable-options. + + For example if the current package depends on dependencies fails and + works, one of which fails to build, cargo check -j1 may or may not + build the one that succeeds (depending on which one of the two + builds Cargo picked to run first), whereas cargo check -j1 + --keep-going would definitely run both builds, even if the one run + first fails. ENVIRONMENT See the reference diff --git a/src/doc/man/generated_txt/cargo-rustc.txt b/src/doc/man/generated_txt/cargo-rustc.txt index 7a70c5363efd..756ba95a5351 100644 --- a/src/doc/man/generated_txt/cargo-rustc.txt +++ b/src/doc/man/generated_txt/cargo-rustc.txt @@ -349,7 +349,13 @@ OPTIONS --keep-going Build as many crates in the dependency graph as possible, rather than aborting the build on the first one that fails to build. - Unstable, requires -Zunstable-options. + + For example if the current package depends on dependencies fails and + works, one of which fails to build, cargo check -j1 may or may not + build the one that succeeds (depending on which one of the two + builds Cargo picked to run first), whereas cargo check -j1 + --keep-going would definitely run both builds, even if the one run + first fails. --future-incompat-report Displays a future-incompat report for any future-incompatible diff --git a/src/doc/man/generated_txt/cargo-rustdoc.txt b/src/doc/man/generated_txt/cargo-rustdoc.txt index 4db66b3a8f62..bf569188edf0 100644 --- a/src/doc/man/generated_txt/cargo-rustdoc.txt +++ b/src/doc/man/generated_txt/cargo-rustdoc.txt @@ -319,7 +319,13 @@ OPTIONS --keep-going Build as many crates in the dependency graph as possible, rather than aborting the build on the first one that fails to build. - Unstable, requires -Zunstable-options. + + For example if the current package depends on dependencies fails and + works, one of which fails to build, cargo check -j1 may or may not + build the one that succeeds (depending on which one of the two + builds Cargo picked to run first), whereas cargo check -j1 + --keep-going would definitely run both builds, even if the one run + first fails. ENVIRONMENT See the reference diff --git a/src/doc/man/generated_txt/cargo-test.txt b/src/doc/man/generated_txt/cargo-test.txt index dc32bdbf7fe0..b992d0d2f620 100644 --- a/src/doc/man/generated_txt/cargo-test.txt +++ b/src/doc/man/generated_txt/cargo-test.txt @@ -448,6 +448,14 @@ OPTIONS See cargo-report(1) + While cargo test involves compilation, it does not provide a + --keep-going flag. Use --no-fail-fast to run as many tests as possible + without stopping at the first failure. To “compile” as many tests as + possible, use --tests to build test binaries separately. For example: + + cargo build --tests --keep-going + cargo test --tests --no-fail-fast + ENVIRONMENT See the reference diff --git a/src/doc/man/includes/options-keep-going.md b/src/doc/man/includes/options-keep-going.md index 034181c0e550..ad1177a7c93b 100644 --- a/src/doc/man/includes/options-keep-going.md +++ b/src/doc/man/includes/options-keep-going.md @@ -1,5 +1,10 @@ {{#option "`--keep-going`"}} Build as many crates in the dependency graph as possible, rather than aborting -the build on the first one that fails to build. Unstable, requires -`-Zunstable-options`. +the build on the first one that fails to build. + +For example if the current package depends on dependencies `fails` and `works`, +one of which fails to build, `cargo check -j1` may or may not build the one that +succeeds (depending on which one of the two builds Cargo picked to run first), +whereas `cargo check -j1 --keep-going` would definitely run both builds, even if +the one run first fails. {{/option}} diff --git a/src/doc/src/commands/cargo-bench.md b/src/doc/src/commands/cargo-bench.md index 70ae187a779f..e7f92ea65132 100644 --- a/src/doc/src/commands/cargo-bench.md +++ b/src/doc/src/commands/cargo-bench.md @@ -481,13 +481,15 @@ a string default is provided, it sets the value back to defaults. Should not be 0. -
--keep-going
-
Build as many crates in the dependency graph as possible, rather than aborting -the build on the first one that fails to build. Unstable, requires --Zunstable-options.
+ +While `cargo bench` involves compilation, it does not provide a `--keep-going` +flag. Use `--no-fail-fast` to run as many benchmarks as possible without +stopping at the first failure. To "compile" as many benchmarks as possible, use +`--benches` to build benchmark binaries separately. For example: - + cargo build --benches --release --keep-going + cargo bench --no-fail-fast ## ENVIRONMENT diff --git a/src/doc/src/commands/cargo-build.md b/src/doc/src/commands/cargo-build.md index 525ab14e5367..fee7f20fefa8 100644 --- a/src/doc/src/commands/cargo-build.md +++ b/src/doc/src/commands/cargo-build.md @@ -409,8 +409,12 @@ Should not be 0.
--keep-going
Build as many crates in the dependency graph as possible, rather than aborting -the build on the first one that fails to build. Unstable, requires --Zunstable-options.
+the build on the first one that fails to build.

+

For example if the current package depends on dependencies fails and works, +one of which fails to build, cargo check -j1 may or may not build the one that +succeeds (depending on which one of the two builds Cargo picked to run first), +whereas cargo check -j1 --keep-going would definitely run both builds, even if +the one run first fails.

--future-incompat-report
diff --git a/src/doc/src/commands/cargo-check.md b/src/doc/src/commands/cargo-check.md index 4dbc97ad8fc2..7ba2ec6fc085 100644 --- a/src/doc/src/commands/cargo-check.md +++ b/src/doc/src/commands/cargo-check.md @@ -390,8 +390,12 @@ Should not be 0.
--keep-going
Build as many crates in the dependency graph as possible, rather than aborting -the build on the first one that fails to build. Unstable, requires --Zunstable-options.
+the build on the first one that fails to build.

+

For example if the current package depends on dependencies fails and works, +one of which fails to build, cargo check -j1 may or may not build the one that +succeeds (depending on which one of the two builds Cargo picked to run first), +whereas cargo check -j1 --keep-going would definitely run both builds, even if +the one run first fails.

--future-incompat-report
diff --git a/src/doc/src/commands/cargo-doc.md b/src/doc/src/commands/cargo-doc.md index d68bb84e7d89..0dd4a9ff67d3 100644 --- a/src/doc/src/commands/cargo-doc.md +++ b/src/doc/src/commands/cargo-doc.md @@ -364,8 +364,12 @@ Should not be 0.
--keep-going
Build as many crates in the dependency graph as possible, rather than aborting -the build on the first one that fails to build. Unstable, requires --Zunstable-options.
+the build on the first one that fails to build.

+

For example if the current package depends on dependencies fails and works, +one of which fails to build, cargo check -j1 may or may not build the one that +succeeds (depending on which one of the two builds Cargo picked to run first), +whereas cargo check -j1 --keep-going would definitely run both builds, even if +the one run first fails. diff --git a/src/doc/src/commands/cargo-fix.md b/src/doc/src/commands/cargo-fix.md index 2bf83fc2eacb..f2f75a51c202 100644 --- a/src/doc/src/commands/cargo-fix.md +++ b/src/doc/src/commands/cargo-fix.md @@ -470,8 +470,12 @@ Should not be 0.

--keep-going
Build as many crates in the dependency graph as possible, rather than aborting -the build on the first one that fails to build. Unstable, requires --Zunstable-options.
+the build on the first one that fails to build.

+

For example if the current package depends on dependencies fails and works, +one of which fails to build, cargo check -j1 may or may not build the one that +succeeds (depending on which one of the two builds Cargo picked to run first), +whereas cargo check -j1 --keep-going would definitely run both builds, even if +the one run first fails. diff --git a/src/doc/src/commands/cargo-install.md b/src/doc/src/commands/cargo-install.md index af8efcae89e1..9926f58dc536 100644 --- a/src/doc/src/commands/cargo-install.md +++ b/src/doc/src/commands/cargo-install.md @@ -319,8 +319,12 @@ Should not be 0.

--keep-going
Build as many crates in the dependency graph as possible, rather than aborting -the build on the first one that fails to build. Unstable, requires --Zunstable-options.
+the build on the first one that fails to build.

+

For example if the current package depends on dependencies fails and works, +one of which fails to build, cargo check -j1 may or may not build the one that +succeeds (depending on which one of the two builds Cargo picked to run first), +whereas cargo check -j1 --keep-going would definitely run both builds, even if +the one run first fails. diff --git a/src/doc/src/commands/cargo-package.md b/src/doc/src/commands/cargo-package.md index f9c7c552ddfa..ca98308edb81 100644 --- a/src/doc/src/commands/cargo-package.md +++ b/src/doc/src/commands/cargo-package.md @@ -234,8 +234,12 @@ Should not be 0.

--keep-going
Build as many crates in the dependency graph as possible, rather than aborting -the build on the first one that fails to build. Unstable, requires --Zunstable-options.
+the build on the first one that fails to build.

+

For example if the current package depends on dependencies fails and works, +one of which fails to build, cargo check -j1 may or may not build the one that +succeeds (depending on which one of the two builds Cargo picked to run first), +whereas cargo check -j1 --keep-going would definitely run both builds, even if +the one run first fails. diff --git a/src/doc/src/commands/cargo-publish.md b/src/doc/src/commands/cargo-publish.md index fe37d9f97741..b3e89af5fd82 100644 --- a/src/doc/src/commands/cargo-publish.md +++ b/src/doc/src/commands/cargo-publish.md @@ -200,8 +200,12 @@ Should not be 0.

--keep-going
Build as many crates in the dependency graph as possible, rather than aborting -the build on the first one that fails to build. Unstable, requires --Zunstable-options.
+the build on the first one that fails to build.

+

For example if the current package depends on dependencies fails and works, +one of which fails to build, cargo check -j1 may or may not build the one that +succeeds (depending on which one of the two builds Cargo picked to run first), +whereas cargo check -j1 --keep-going would definitely run both builds, even if +the one run first fails. diff --git a/src/doc/src/commands/cargo-run.md b/src/doc/src/commands/cargo-run.md index bd3e4724a4bb..7098514f7afd 100644 --- a/src/doc/src/commands/cargo-run.md +++ b/src/doc/src/commands/cargo-run.md @@ -306,8 +306,12 @@ Should not be 0.

--keep-going
Build as many crates in the dependency graph as possible, rather than aborting -the build on the first one that fails to build. Unstable, requires --Zunstable-options.
+the build on the first one that fails to build.

+

For example if the current package depends on dependencies fails and works, +one of which fails to build, cargo check -j1 may or may not build the one that +succeeds (depending on which one of the two builds Cargo picked to run first), +whereas cargo check -j1 --keep-going would definitely run both builds, even if +the one run first fails. diff --git a/src/doc/src/commands/cargo-rustc.md b/src/doc/src/commands/cargo-rustc.md index 2147d617cd51..cd108b3fe686 100644 --- a/src/doc/src/commands/cargo-rustc.md +++ b/src/doc/src/commands/cargo-rustc.md @@ -403,8 +403,12 @@ Should not be 0.

--keep-going
Build as many crates in the dependency graph as possible, rather than aborting -the build on the first one that fails to build. Unstable, requires --Zunstable-options.
+the build on the first one that fails to build.

+

For example if the current package depends on dependencies fails and works, +one of which fails to build, cargo check -j1 may or may not build the one that +succeeds (depending on which one of the two builds Cargo picked to run first), +whereas cargo check -j1 --keep-going would definitely run both builds, even if +the one run first fails.

--future-incompat-report
diff --git a/src/doc/src/commands/cargo-rustdoc.md b/src/doc/src/commands/cargo-rustdoc.md index 22c1c8322bb8..162f67012d01 100644 --- a/src/doc/src/commands/cargo-rustdoc.md +++ b/src/doc/src/commands/cargo-rustdoc.md @@ -383,8 +383,12 @@ Should not be 0.
--keep-going
Build as many crates in the dependency graph as possible, rather than aborting -the build on the first one that fails to build. Unstable, requires --Zunstable-options.
+the build on the first one that fails to build.

+

For example if the current package depends on dependencies fails and works, +one of which fails to build, cargo check -j1 may or may not build the one that +succeeds (depending on which one of the two builds Cargo picked to run first), +whereas cargo check -j1 --keep-going would definitely run both builds, even if +the one run first fails. diff --git a/src/doc/src/commands/cargo-test.md b/src/doc/src/commands/cargo-test.md index bcf46d601916..286149dde599 100644 --- a/src/doc/src/commands/cargo-test.md +++ b/src/doc/src/commands/cargo-test.md @@ -524,6 +524,14 @@ produced during execution of this command

+While `cargo test` involves compilation, it does not provide a `--keep-going` +flag. Use `--no-fail-fast` to run as many tests as possible without stopping at +the first failure. To "compile" as many tests as possible, use `--tests` to +build test binaries separately. For example: + + cargo build --tests --keep-going + cargo test --tests --no-fail-fast + ## ENVIRONMENT See [the reference](../reference/environment-variables.html) for diff --git a/src/doc/src/reference/unstable.md b/src/doc/src/reference/unstable.md index f3a8f162974b..d784867c9b5a 100644 --- a/src/doc/src/reference/unstable.md +++ b/src/doc/src/reference/unstable.md @@ -82,7 +82,6 @@ For the latest nightly, see the [nightly version] of this page. * [build-std-features](#build-std-features) --- Sets features to use with the standard library. * [binary-dep-depinfo](#binary-dep-depinfo) --- Causes the dep-info file to track binary dependencies. * [panic-abort-tests](#panic-abort-tests) --- Allows running tests with the "abort" panic strategy. - * [keep-going](#keep-going) --- Build as much as possible rather than aborting on the first error. * [check-cfg](#check-cfg) --- Compile-time validation of `cfg` expressions. * [host-config](#host-config) --- Allows setting `[target]`-like configuration settings for host build targets. * [target-applies-to-host](#target-applies-to-host) --- Alters whether certain flags will be passed to host build targets. @@ -429,36 +428,6 @@ like to stabilize it somehow! [rust-lang/rust#64158]: https://github.com/rust-lang/rust/pull/64158 -### keep-going -* Tracking Issue: [#10496](https://github.com/rust-lang/cargo/issues/10496) - -`cargo build --keep-going` (and similarly for every command involving compilation, like `check` and `doc`) -will build as many crates in the dependency graph as possible, -rather than aborting the build at the first one that fails to build. - -For example if the current package depends on dependencies `fails` and `works`, -one of which fails to build, `cargo check -j1` may or may not build the one that -succeeds (depending on which one of the two builds Cargo picked to run first), -whereas `cargo check -j1 --keep-going` would definitely run both builds, even if -the one run first fails. - -The `-Z unstable-options` command-line option must be used in order to use -`--keep-going` while it is not yet stable: - -```console -cargo check --keep-going -Z unstable-options -``` - -While `cargo test` and `cargo bench` commands involve compilation, they do not provide a `--keep-going` flag. -Both commands already include a similar `--no-fail-fast` flag, allowing running as many tests as possible without stopping at the first failure. -To "compile" as many tests as possible, use target selection flags like `--tests` to build test binaries separately. -For example, - -```console -cargo build --tests --keep-going -Zunstable-options -cargo test --tests --no-fail-fast -``` - ### config-include * Tracking Issue: [#7723](https://github.com/rust-lang/cargo/issues/7723) diff --git a/src/etc/man/cargo-bench.1 b/src/etc/man/cargo-bench.1 index 993dd3415b82..64498c4d602b 100644 --- a/src/etc/man/cargo-bench.1 +++ b/src/etc/man/cargo-bench.1 @@ -502,11 +502,16 @@ a string \fBdefault\fR is provided, it sets the value back to defaults. Should not be 0. .RE .sp -\fB\-\-keep\-going\fR +While \fBcargo bench\fR involves compilation, it does not provide a \fB\-\-keep\-going\fR +flag. Use \fB\-\-no\-fail\-fast\fR to run as many benchmarks as possible without +stopping at the first failure. To \[lq]compile\[rq] as many benchmarks as possible, use +\fB\-\-benches\fR to build benchmark binaries separately. For example: +.sp .RS 4 -Build as many crates in the dependency graph as possible, rather than aborting -the build on the first one that fails to build. Unstable, requires -\fB\-Zunstable\-options\fR\&. +.nf +cargo build \-\-benches \-\-release \-\-keep\-going +cargo bench \-\-no\-fail\-fast +.fi .RE .SH "ENVIRONMENT" See \fIthe reference\fR for diff --git a/src/etc/man/cargo-build.1 b/src/etc/man/cargo-build.1 index 4ee6a0d76368..fc0b810e95e6 100644 --- a/src/etc/man/cargo-build.1 +++ b/src/etc/man/cargo-build.1 @@ -420,8 +420,13 @@ Should not be 0. \fB\-\-keep\-going\fR .RS 4 Build as many crates in the dependency graph as possible, rather than aborting -the build on the first one that fails to build. Unstable, requires -\fB\-Zunstable\-options\fR\&. +the build on the first one that fails to build. +.sp +For example if the current package depends on dependencies \fBfails\fR and \fBworks\fR, +one of which fails to build, \fBcargo check \-j1\fR may or may not build the one that +succeeds (depending on which one of the two builds Cargo picked to run first), +whereas \fBcargo check \-j1 \-\-keep\-going\fR would definitely run both builds, even if +the one run first fails. .RE .sp \fB\-\-future\-incompat\-report\fR diff --git a/src/etc/man/cargo-check.1 b/src/etc/man/cargo-check.1 index 1aada2a217e5..a6fcdbe05a26 100644 --- a/src/etc/man/cargo-check.1 +++ b/src/etc/man/cargo-check.1 @@ -401,8 +401,13 @@ Should not be 0. \fB\-\-keep\-going\fR .RS 4 Build as many crates in the dependency graph as possible, rather than aborting -the build on the first one that fails to build. Unstable, requires -\fB\-Zunstable\-options\fR\&. +the build on the first one that fails to build. +.sp +For example if the current package depends on dependencies \fBfails\fR and \fBworks\fR, +one of which fails to build, \fBcargo check \-j1\fR may or may not build the one that +succeeds (depending on which one of the two builds Cargo picked to run first), +whereas \fBcargo check \-j1 \-\-keep\-going\fR would definitely run both builds, even if +the one run first fails. .RE .sp \fB\-\-future\-incompat\-report\fR diff --git a/src/etc/man/cargo-doc.1 b/src/etc/man/cargo-doc.1 index 24621e9f6e23..9ae18b3181fd 100644 --- a/src/etc/man/cargo-doc.1 +++ b/src/etc/man/cargo-doc.1 @@ -368,8 +368,13 @@ Should not be 0. \fB\-\-keep\-going\fR .RS 4 Build as many crates in the dependency graph as possible, rather than aborting -the build on the first one that fails to build. Unstable, requires -\fB\-Zunstable\-options\fR\&. +the build on the first one that fails to build. +.sp +For example if the current package depends on dependencies \fBfails\fR and \fBworks\fR, +one of which fails to build, \fBcargo check \-j1\fR may or may not build the one that +succeeds (depending on which one of the two builds Cargo picked to run first), +whereas \fBcargo check \-j1 \-\-keep\-going\fR would definitely run both builds, even if +the one run first fails. .RE .SH "ENVIRONMENT" See \fIthe reference\fR for diff --git a/src/etc/man/cargo-fix.1 b/src/etc/man/cargo-fix.1 index 7f2a34cda68b..971e5a10979d 100644 --- a/src/etc/man/cargo-fix.1 +++ b/src/etc/man/cargo-fix.1 @@ -496,8 +496,13 @@ Should not be 0. \fB\-\-keep\-going\fR .RS 4 Build as many crates in the dependency graph as possible, rather than aborting -the build on the first one that fails to build. Unstable, requires -\fB\-Zunstable\-options\fR\&. +the build on the first one that fails to build. +.sp +For example if the current package depends on dependencies \fBfails\fR and \fBworks\fR, +one of which fails to build, \fBcargo check \-j1\fR may or may not build the one that +succeeds (depending on which one of the two builds Cargo picked to run first), +whereas \fBcargo check \-j1 \-\-keep\-going\fR would definitely run both builds, even if +the one run first fails. .RE .SH "ENVIRONMENT" See \fIthe reference\fR for diff --git a/src/etc/man/cargo-install.1 b/src/etc/man/cargo-install.1 index 917c0d0e19fe..e38ba14f1be1 100644 --- a/src/etc/man/cargo-install.1 +++ b/src/etc/man/cargo-install.1 @@ -346,8 +346,13 @@ Should not be 0. \fB\-\-keep\-going\fR .RS 4 Build as many crates in the dependency graph as possible, rather than aborting -the build on the first one that fails to build. Unstable, requires -\fB\-Zunstable\-options\fR\&. +the build on the first one that fails to build. +.sp +For example if the current package depends on dependencies \fBfails\fR and \fBworks\fR, +one of which fails to build, \fBcargo check \-j1\fR may or may not build the one that +succeeds (depending on which one of the two builds Cargo picked to run first), +whereas \fBcargo check \-j1 \-\-keep\-going\fR would definitely run both builds, even if +the one run first fails. .RE .SS "Display Options" .sp diff --git a/src/etc/man/cargo-package.1 b/src/etc/man/cargo-package.1 index 8a7b1c191cf6..421e52eb7b46 100644 --- a/src/etc/man/cargo-package.1 +++ b/src/etc/man/cargo-package.1 @@ -242,8 +242,13 @@ Should not be 0. \fB\-\-keep\-going\fR .RS 4 Build as many crates in the dependency graph as possible, rather than aborting -the build on the first one that fails to build. Unstable, requires -\fB\-Zunstable\-options\fR\&. +the build on the first one that fails to build. +.sp +For example if the current package depends on dependencies \fBfails\fR and \fBworks\fR, +one of which fails to build, \fBcargo check \-j1\fR may or may not build the one that +succeeds (depending on which one of the two builds Cargo picked to run first), +whereas \fBcargo check \-j1 \-\-keep\-going\fR would definitely run both builds, even if +the one run first fails. .RE .SS "Display Options" .sp diff --git a/src/etc/man/cargo-publish.1 b/src/etc/man/cargo-publish.1 index d18f9e6907cb..7f5dc1ddd5d7 100644 --- a/src/etc/man/cargo-publish.1 +++ b/src/etc/man/cargo-publish.1 @@ -192,8 +192,13 @@ Should not be 0. \fB\-\-keep\-going\fR .RS 4 Build as many crates in the dependency graph as possible, rather than aborting -the build on the first one that fails to build. Unstable, requires -\fB\-Zunstable\-options\fR\&. +the build on the first one that fails to build. +.sp +For example if the current package depends on dependencies \fBfails\fR and \fBworks\fR, +one of which fails to build, \fBcargo check \-j1\fR may or may not build the one that +succeeds (depending on which one of the two builds Cargo picked to run first), +whereas \fBcargo check \-j1 \-\-keep\-going\fR would definitely run both builds, even if +the one run first fails. .RE .SS "Display Options" .sp diff --git a/src/etc/man/cargo-run.1 b/src/etc/man/cargo-run.1 index 1c182ad1a2aa..d4816144d542 100644 --- a/src/etc/man/cargo-run.1 +++ b/src/etc/man/cargo-run.1 @@ -305,8 +305,13 @@ Should not be 0. \fB\-\-keep\-going\fR .RS 4 Build as many crates in the dependency graph as possible, rather than aborting -the build on the first one that fails to build. Unstable, requires -\fB\-Zunstable\-options\fR\&. +the build on the first one that fails to build. +.sp +For example if the current package depends on dependencies \fBfails\fR and \fBworks\fR, +one of which fails to build, \fBcargo check \-j1\fR may or may not build the one that +succeeds (depending on which one of the two builds Cargo picked to run first), +whereas \fBcargo check \-j1 \-\-keep\-going\fR would definitely run both builds, even if +the one run first fails. .RE .SH "ENVIRONMENT" See \fIthe reference\fR for diff --git a/src/etc/man/cargo-rustc.1 b/src/etc/man/cargo-rustc.1 index 50df99656b63..37cf022f9ab8 100644 --- a/src/etc/man/cargo-rustc.1 +++ b/src/etc/man/cargo-rustc.1 @@ -419,8 +419,13 @@ Should not be 0. \fB\-\-keep\-going\fR .RS 4 Build as many crates in the dependency graph as possible, rather than aborting -the build on the first one that fails to build. Unstable, requires -\fB\-Zunstable\-options\fR\&. +the build on the first one that fails to build. +.sp +For example if the current package depends on dependencies \fBfails\fR and \fBworks\fR, +one of which fails to build, \fBcargo check \-j1\fR may or may not build the one that +succeeds (depending on which one of the two builds Cargo picked to run first), +whereas \fBcargo check \-j1 \-\-keep\-going\fR would definitely run both builds, even if +the one run first fails. .RE .sp \fB\-\-future\-incompat\-report\fR diff --git a/src/etc/man/cargo-rustdoc.1 b/src/etc/man/cargo-rustdoc.1 index 1792c6e2fbd7..2cb3870714b7 100644 --- a/src/etc/man/cargo-rustdoc.1 +++ b/src/etc/man/cargo-rustdoc.1 @@ -387,8 +387,13 @@ Should not be 0. \fB\-\-keep\-going\fR .RS 4 Build as many crates in the dependency graph as possible, rather than aborting -the build on the first one that fails to build. Unstable, requires -\fB\-Zunstable\-options\fR\&. +the build on the first one that fails to build. +.sp +For example if the current package depends on dependencies \fBfails\fR and \fBworks\fR, +one of which fails to build, \fBcargo check \-j1\fR may or may not build the one that +succeeds (depending on which one of the two builds Cargo picked to run first), +whereas \fBcargo check \-j1 \-\-keep\-going\fR would definitely run both builds, even if +the one run first fails. .RE .SH "ENVIRONMENT" See \fIthe reference\fR for diff --git a/src/etc/man/cargo-test.1 b/src/etc/man/cargo-test.1 index 4ca150dbcb12..8e460e167f6e 100644 --- a/src/etc/man/cargo-test.1 +++ b/src/etc/man/cargo-test.1 @@ -542,6 +542,18 @@ produced during execution of this command .sp See \fBcargo\-report\fR(1) .RE +.sp +While \fBcargo test\fR involves compilation, it does not provide a \fB\-\-keep\-going\fR +flag. Use \fB\-\-no\-fail\-fast\fR to run as many tests as possible without stopping at +the first failure. To \[lq]compile\[rq] as many tests as possible, use \fB\-\-tests\fR to +build test binaries separately. For example: +.sp +.RS 4 +.nf +cargo build \-\-tests \-\-keep\-going +cargo test \-\-tests \-\-no\-fail\-fast +.fi +.RE .SH "ENVIRONMENT" See \fIthe reference\fR for details on environment variables that Cargo reads. diff --git a/tests/testsuite/cargo_build/help/stdout.log b/tests/testsuite/cargo_build/help/stdout.log index af906c24f428..e51a3b177dcf 100644 --- a/tests/testsuite/cargo_build/help/stdout.log +++ b/tests/testsuite/cargo_build/help/stdout.log @@ -41,7 +41,7 @@ Compilation Options: -r, --release Build artifacts in release mode, with optimizations --profile Build artifacts with the specified profile -j, --jobs Number of parallel jobs, defaults to # of CPUs. - --keep-going Do not abort the build as soon as there is an error (unstable) + --keep-going Do not abort the build as soon as there is an error --target Build for the target triple --target-dir Directory for all generated artifacts --out-dir Copy final artifacts to this directory (unstable) diff --git a/tests/testsuite/cargo_check/help/stdout.log b/tests/testsuite/cargo_check/help/stdout.log index 7c87615cd72f..8aee0bcce86b 100644 --- a/tests/testsuite/cargo_check/help/stdout.log +++ b/tests/testsuite/cargo_check/help/stdout.log @@ -39,7 +39,7 @@ Feature Selection: Compilation Options: -j, --jobs Number of parallel jobs, defaults to # of CPUs. - --keep-going Do not abort the build as soon as there is an error (unstable) + --keep-going Do not abort the build as soon as there is an error -r, --release Check artifacts in release mode, with optimizations --profile Check artifacts with the specified profile --target Check for the target triple diff --git a/tests/testsuite/cargo_doc/help/stdout.log b/tests/testsuite/cargo_doc/help/stdout.log index 480e189c10e4..d910c960a359 100644 --- a/tests/testsuite/cargo_doc/help/stdout.log +++ b/tests/testsuite/cargo_doc/help/stdout.log @@ -36,7 +36,7 @@ Target Selection: Compilation Options: -j, --jobs Number of parallel jobs, defaults to # of CPUs. - --keep-going Do not abort the build as soon as there is an error (unstable) + --keep-going Do not abort the build as soon as there is an error -r, --release Build artifacts in release mode, with optimizations --profile Build artifacts with the specified profile --target Build for the target triple diff --git a/tests/testsuite/cargo_fix/help/stdout.log b/tests/testsuite/cargo_fix/help/stdout.log index c0a98218a230..cfd76a4ff07a 100644 --- a/tests/testsuite/cargo_fix/help/stdout.log +++ b/tests/testsuite/cargo_fix/help/stdout.log @@ -44,7 +44,7 @@ Feature Selection: Compilation Options: -j, --jobs Number of parallel jobs, defaults to # of CPUs. - --keep-going Do not abort the build as soon as there is an error (unstable) + --keep-going Do not abort the build as soon as there is an error -r, --release Fix artifacts in release mode, with optimizations --profile Build artifacts with the specified profile --target Fix for the target triple diff --git a/tests/testsuite/cargo_install/help/stdout.log b/tests/testsuite/cargo_install/help/stdout.log index a07fa47f6fd3..de23100f42ee 100644 --- a/tests/testsuite/cargo_install/help/stdout.log +++ b/tests/testsuite/cargo_install/help/stdout.log @@ -42,7 +42,7 @@ Feature Selection: Compilation Options: -j, --jobs Number of parallel jobs, defaults to # of CPUs. - --keep-going Do not abort the build as soon as there is an error (unstable) + --keep-going Do not abort the build as soon as there is an error --profile Install artifacts with the specified profile --target Build for the target triple --target-dir Directory for all generated artifacts diff --git a/tests/testsuite/cargo_package/help/stdout.log b/tests/testsuite/cargo_package/help/stdout.log index 35e32f3133de..568cc5796c88 100644 --- a/tests/testsuite/cargo_package/help/stdout.log +++ b/tests/testsuite/cargo_package/help/stdout.log @@ -28,7 +28,7 @@ Compilation Options: --target Build for the target triple --target-dir Directory for all generated artifacts -j, --jobs Number of parallel jobs, defaults to # of CPUs. - --keep-going Do not abort the build as soon as there is an error (unstable) + --keep-going Do not abort the build as soon as there is an error Manifest Options: --manifest-path Path to Cargo.toml diff --git a/tests/testsuite/cargo_publish/help/stdout.log b/tests/testsuite/cargo_publish/help/stdout.log index c02522887a83..7f37ee56c09e 100644 --- a/tests/testsuite/cargo_publish/help/stdout.log +++ b/tests/testsuite/cargo_publish/help/stdout.log @@ -26,7 +26,7 @@ Feature Selection: Compilation Options: -j, --jobs Number of parallel jobs, defaults to # of CPUs. - --keep-going Do not abort the build as soon as there is an error (unstable) + --keep-going Do not abort the build as soon as there is an error --target Build for the target triple --target-dir Directory for all generated artifacts diff --git a/tests/testsuite/cargo_run/help/stdout.log b/tests/testsuite/cargo_run/help/stdout.log index 6ab0e76b13fd..c8777eaef568 100644 --- a/tests/testsuite/cargo_run/help/stdout.log +++ b/tests/testsuite/cargo_run/help/stdout.log @@ -30,7 +30,7 @@ Feature Selection: Compilation Options: -j, --jobs Number of parallel jobs, defaults to # of CPUs. - --keep-going Do not abort the build as soon as there is an error (unstable) + --keep-going Do not abort the build as soon as there is an error -r, --release Build artifacts in release mode, with optimizations --profile Build artifacts with the specified profile --target Build for the target triple diff --git a/tests/testsuite/cargo_rustc/help/stdout.log b/tests/testsuite/cargo_rustc/help/stdout.log index f587c327687c..d6394effeabb 100644 --- a/tests/testsuite/cargo_rustc/help/stdout.log +++ b/tests/testsuite/cargo_rustc/help/stdout.log @@ -41,7 +41,7 @@ Feature Selection: Compilation Options: -j, --jobs Number of parallel jobs, defaults to # of CPUs. - --keep-going Do not abort the build as soon as there is an error (unstable) + --keep-going Do not abort the build as soon as there is an error -r, --release Build artifacts in release mode, with optimizations --profile Build artifacts with the specified profile --target Target triple which compiles will be for diff --git a/tests/testsuite/cargo_rustdoc/help/stdout.log b/tests/testsuite/cargo_rustdoc/help/stdout.log index 4cac29e0af34..93c3ba851998 100644 --- a/tests/testsuite/cargo_rustdoc/help/stdout.log +++ b/tests/testsuite/cargo_rustdoc/help/stdout.log @@ -39,7 +39,7 @@ Feature Selection: Compilation Options: -j, --jobs Number of parallel jobs, defaults to # of CPUs. - --keep-going Do not abort the build as soon as there is an error (unstable) + --keep-going Do not abort the build as soon as there is an error -r, --release Build artifacts in release mode, with optimizations --profile Build artifacts with the specified profile --target Build for the target triple diff --git a/tests/testsuite/check.rs b/tests/testsuite/check.rs index 7bc9a38a3ad0..b74bd6209962 100644 --- a/tests/testsuite/check.rs +++ b/tests/testsuite/check.rs @@ -861,8 +861,7 @@ fn check_keep_going() { .build(); // Due to -j1, without --keep-going only one of the two bins would be built. - foo.cargo("check -j1 --keep-going -Zunstable-options") - .masquerade_as_nightly_cargo(&["keep-going"]) + foo.cargo("check -j1 --keep-going") .with_status(101) .with_stderr_contains("error: ONE") .with_stderr_contains("error: TWO")