Skip to content

Commit

Permalink
Improve keep-going docs
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Aug 26, 2023
1 parent bc4d1d9 commit 179cb10
Show file tree
Hide file tree
Showing 39 changed files with 264 additions and 21 deletions.
9 changes: 8 additions & 1 deletion src/doc/man/cargo-bench.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
8 changes: 8 additions & 0 deletions src/doc/man/cargo-test.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
11 changes: 8 additions & 3 deletions src/doc/man/generated_txt/cargo-bench.txt
Original file line number Diff line number Diff line change
Expand Up @@ -413,9 +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.
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
Expand Down
7 changes: 7 additions & 0 deletions src/doc/man/generated_txt/cargo-build.txt
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,13 @@ OPTIONS
Build as many crates in the dependency graph as possible, rather
than aborting 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
Displays a future-incompat report for any future-incompatible
warnings produced during execution of this command
Expand Down
7 changes: 7 additions & 0 deletions src/doc/man/generated_txt/cargo-check.txt
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,13 @@ OPTIONS
Build as many crates in the dependency graph as possible, rather
than aborting 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
Displays a future-incompat report for any future-incompatible
warnings produced during execution of this command
Expand Down
7 changes: 7 additions & 0 deletions src/doc/man/generated_txt/cargo-doc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,13 @@ OPTIONS
Build as many crates in the dependency graph as possible, rather
than aborting 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.

ENVIRONMENT
See the reference
<https://doc.rust-lang.org/cargo/reference/environment-variables.html>
Expand Down
7 changes: 7 additions & 0 deletions src/doc/man/generated_txt/cargo-fix.txt
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,13 @@ OPTIONS
Build as many crates in the dependency graph as possible, rather
than aborting 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.

ENVIRONMENT
See the reference
<https://doc.rust-lang.org/cargo/reference/environment-variables.html>
Expand Down
7 changes: 7 additions & 0 deletions src/doc/man/generated_txt/cargo-install.txt
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,13 @@ OPTIONS
Build as many crates in the dependency graph as possible, rather
than aborting 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.

Display Options
-v, --verbose
Use verbose output. May be specified twice for “very verbose”
Expand Down
7 changes: 7 additions & 0 deletions src/doc/man/generated_txt/cargo-package.txt
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,13 @@ OPTIONS
Build as many crates in the dependency graph as possible, rather
than aborting 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.

Display Options
-v, --verbose
Use verbose output. May be specified twice for “very verbose”
Expand Down
7 changes: 7 additions & 0 deletions src/doc/man/generated_txt/cargo-publish.txt
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,13 @@ OPTIONS
Build as many crates in the dependency graph as possible, rather
than aborting 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.

Display Options
-v, --verbose
Use verbose output. May be specified twice for “very verbose”
Expand Down
7 changes: 7 additions & 0 deletions src/doc/man/generated_txt/cargo-run.txt
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,13 @@ OPTIONS
Build as many crates in the dependency graph as possible, rather
than aborting 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.

ENVIRONMENT
See the reference
<https://doc.rust-lang.org/cargo/reference/environment-variables.html>
Expand Down
7 changes: 7 additions & 0 deletions src/doc/man/generated_txt/cargo-rustc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,13 @@ OPTIONS
Build as many crates in the dependency graph as possible, rather
than aborting 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
Displays a future-incompat report for any future-incompatible
warnings produced during execution of this command
Expand Down
7 changes: 7 additions & 0 deletions src/doc/man/generated_txt/cargo-rustdoc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,13 @@ OPTIONS
Build as many crates in the dependency graph as possible, rather
than aborting 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.

ENVIRONMENT
See the reference
<https://doc.rust-lang.org/cargo/reference/environment-variables.html>
Expand Down
8 changes: 8 additions & 0 deletions src/doc/man/generated_txt/cargo-test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
<https://doc.rust-lang.org/cargo/reference/environment-variables.html>
Expand Down
6 changes: 6 additions & 0 deletions src/doc/man/includes/options-keep-going.md
Original file line number Diff line number Diff line change
@@ -1,4 +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.

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}}
11 changes: 7 additions & 4 deletions src/doc/src/commands/cargo-bench.md
Original file line number Diff line number Diff line change
Expand Up @@ -481,12 +481,15 @@ a string <code>default</code> is provided, it sets the value back to defaults.
Should not be 0.</dd>


<dt class="option-term" id="option-cargo-bench---keep-going"><a class="option-anchor" href="#option-cargo-bench---keep-going"></a><code>--keep-going</code></dt>
<dd class="option-desc">Build as many crates in the dependency graph as possible, rather than aborting
the build on the first one that fails to build.</dd>
</dl>

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:

</dl>
cargo build --benches --release --keep-going
cargo bench --no-fail-fast

## ENVIRONMENT

Expand Down
7 changes: 6 additions & 1 deletion src/doc/src/commands/cargo-build.md
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,12 @@ Should not be 0.</dd>

<dt class="option-term" id="option-cargo-build---keep-going"><a class="option-anchor" href="#option-cargo-build---keep-going"></a><code>--keep-going</code></dt>
<dd class="option-desc">Build as many crates in the dependency graph as possible, rather than aborting
the build on the first one that fails to build.</dd>
the build on the first one that fails to build.</p>
<p>For example if the current package depends on dependencies <code>fails</code> and <code>works</code>,
one of which fails to build, <code>cargo check -j1</code> may or may not build the one that
succeeds (depending on which one of the two builds Cargo picked to run first),
whereas <code>cargo check -j1 --keep-going</code> would definitely run both builds, even if
the one run first fails.</dd>


<dt class="option-term" id="option-cargo-build---future-incompat-report"><a class="option-anchor" href="#option-cargo-build---future-incompat-report"></a><code>--future-incompat-report</code></dt>
Expand Down
7 changes: 6 additions & 1 deletion src/doc/src/commands/cargo-check.md
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,12 @@ Should not be 0.</dd>

<dt class="option-term" id="option-cargo-check---keep-going"><a class="option-anchor" href="#option-cargo-check---keep-going"></a><code>--keep-going</code></dt>
<dd class="option-desc">Build as many crates in the dependency graph as possible, rather than aborting
the build on the first one that fails to build.</dd>
the build on the first one that fails to build.</p>
<p>For example if the current package depends on dependencies <code>fails</code> and <code>works</code>,
one of which fails to build, <code>cargo check -j1</code> may or may not build the one that
succeeds (depending on which one of the two builds Cargo picked to run first),
whereas <code>cargo check -j1 --keep-going</code> would definitely run both builds, even if
the one run first fails.</dd>


<dt class="option-term" id="option-cargo-check---future-incompat-report"><a class="option-anchor" href="#option-cargo-check---future-incompat-report"></a><code>--future-incompat-report</code></dt>
Expand Down
7 changes: 6 additions & 1 deletion src/doc/src/commands/cargo-doc.md
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,12 @@ Should not be 0.</dd>

<dt class="option-term" id="option-cargo-doc---keep-going"><a class="option-anchor" href="#option-cargo-doc---keep-going"></a><code>--keep-going</code></dt>
<dd class="option-desc">Build as many crates in the dependency graph as possible, rather than aborting
the build on the first one that fails to build.</dd>
the build on the first one that fails to build.</p>
<p>For example if the current package depends on dependencies <code>fails</code> and <code>works</code>,
one of which fails to build, <code>cargo check -j1</code> may or may not build the one that
succeeds (depending on which one of the two builds Cargo picked to run first),
whereas <code>cargo check -j1 --keep-going</code> would definitely run both builds, even if
the one run first fails.</dd>


</dl>
Expand Down
7 changes: 6 additions & 1 deletion src/doc/src/commands/cargo-fix.md
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,12 @@ Should not be 0.</dd>

<dt class="option-term" id="option-cargo-fix---keep-going"><a class="option-anchor" href="#option-cargo-fix---keep-going"></a><code>--keep-going</code></dt>
<dd class="option-desc">Build as many crates in the dependency graph as possible, rather than aborting
the build on the first one that fails to build.</dd>
the build on the first one that fails to build.</p>
<p>For example if the current package depends on dependencies <code>fails</code> and <code>works</code>,
one of which fails to build, <code>cargo check -j1</code> may or may not build the one that
succeeds (depending on which one of the two builds Cargo picked to run first),
whereas <code>cargo check -j1 --keep-going</code> would definitely run both builds, even if
the one run first fails.</dd>


</dl>
Expand Down
7 changes: 6 additions & 1 deletion src/doc/src/commands/cargo-install.md
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,12 @@ Should not be 0.</dd>

<dt class="option-term" id="option-cargo-install---keep-going"><a class="option-anchor" href="#option-cargo-install---keep-going"></a><code>--keep-going</code></dt>
<dd class="option-desc">Build as many crates in the dependency graph as possible, rather than aborting
the build on the first one that fails to build.</dd>
the build on the first one that fails to build.</p>
<p>For example if the current package depends on dependencies <code>fails</code> and <code>works</code>,
one of which fails to build, <code>cargo check -j1</code> may or may not build the one that
succeeds (depending on which one of the two builds Cargo picked to run first),
whereas <code>cargo check -j1 --keep-going</code> would definitely run both builds, even if
the one run first fails.</dd>


</dl>
Expand Down
7 changes: 6 additions & 1 deletion src/doc/src/commands/cargo-package.md
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,12 @@ Should not be 0.</dd>

<dt class="option-term" id="option-cargo-package---keep-going"><a class="option-anchor" href="#option-cargo-package---keep-going"></a><code>--keep-going</code></dt>
<dd class="option-desc">Build as many crates in the dependency graph as possible, rather than aborting
the build on the first one that fails to build.</dd>
the build on the first one that fails to build.</p>
<p>For example if the current package depends on dependencies <code>fails</code> and <code>works</code>,
one of which fails to build, <code>cargo check -j1</code> may or may not build the one that
succeeds (depending on which one of the two builds Cargo picked to run first),
whereas <code>cargo check -j1 --keep-going</code> would definitely run both builds, even if
the one run first fails.</dd>


</dl>
Expand Down
7 changes: 6 additions & 1 deletion src/doc/src/commands/cargo-publish.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,12 @@ Should not be 0.</dd>

<dt class="option-term" id="option-cargo-publish---keep-going"><a class="option-anchor" href="#option-cargo-publish---keep-going"></a><code>--keep-going</code></dt>
<dd class="option-desc">Build as many crates in the dependency graph as possible, rather than aborting
the build on the first one that fails to build.</dd>
the build on the first one that fails to build.</p>
<p>For example if the current package depends on dependencies <code>fails</code> and <code>works</code>,
one of which fails to build, <code>cargo check -j1</code> may or may not build the one that
succeeds (depending on which one of the two builds Cargo picked to run first),
whereas <code>cargo check -j1 --keep-going</code> would definitely run both builds, even if
the one run first fails.</dd>


</dl>
Expand Down
7 changes: 6 additions & 1 deletion src/doc/src/commands/cargo-run.md
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,12 @@ Should not be 0.</dd>

<dt class="option-term" id="option-cargo-run---keep-going"><a class="option-anchor" href="#option-cargo-run---keep-going"></a><code>--keep-going</code></dt>
<dd class="option-desc">Build as many crates in the dependency graph as possible, rather than aborting
the build on the first one that fails to build.</dd>
the build on the first one that fails to build.</p>
<p>For example if the current package depends on dependencies <code>fails</code> and <code>works</code>,
one of which fails to build, <code>cargo check -j1</code> may or may not build the one that
succeeds (depending on which one of the two builds Cargo picked to run first),
whereas <code>cargo check -j1 --keep-going</code> would definitely run both builds, even if
the one run first fails.</dd>


</dl>
Expand Down
7 changes: 6 additions & 1 deletion src/doc/src/commands/cargo-rustc.md
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,12 @@ Should not be 0.</dd>

<dt class="option-term" id="option-cargo-rustc---keep-going"><a class="option-anchor" href="#option-cargo-rustc---keep-going"></a><code>--keep-going</code></dt>
<dd class="option-desc">Build as many crates in the dependency graph as possible, rather than aborting
the build on the first one that fails to build.</dd>
the build on the first one that fails to build.</p>
<p>For example if the current package depends on dependencies <code>fails</code> and <code>works</code>,
one of which fails to build, <code>cargo check -j1</code> may or may not build the one that
succeeds (depending on which one of the two builds Cargo picked to run first),
whereas <code>cargo check -j1 --keep-going</code> would definitely run both builds, even if
the one run first fails.</dd>


<dt class="option-term" id="option-cargo-rustc---future-incompat-report"><a class="option-anchor" href="#option-cargo-rustc---future-incompat-report"></a><code>--future-incompat-report</code></dt>
Expand Down
7 changes: 6 additions & 1 deletion src/doc/src/commands/cargo-rustdoc.md
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,12 @@ Should not be 0.</dd>

<dt class="option-term" id="option-cargo-rustdoc---keep-going"><a class="option-anchor" href="#option-cargo-rustdoc---keep-going"></a><code>--keep-going</code></dt>
<dd class="option-desc">Build as many crates in the dependency graph as possible, rather than aborting
the build on the first one that fails to build.</dd>
the build on the first one that fails to build.</p>
<p>For example if the current package depends on dependencies <code>fails</code> and <code>works</code>,
one of which fails to build, <code>cargo check -j1</code> may or may not build the one that
succeeds (depending on which one of the two builds Cargo picked to run first),
whereas <code>cargo check -j1 --keep-going</code> would definitely run both builds, even if
the one run first fails.</dd>


</dl>
Expand Down
Loading

0 comments on commit 179cb10

Please sign in to comment.