Skip to content

Commit 179cb10

Browse files
committed
Improve keep-going docs
1 parent bc4d1d9 commit 179cb10

39 files changed

+264
-21
lines changed

src/doc/man/cargo-bench.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,9 +157,16 @@ Rust test harness runs benchmarks serially in a single thread.
157157

158158
{{#options}}
159159
{{> options-jobs }}
160-
{{> options-keep-going }}
161160
{{/options}}
162161

162+
While `cargo bench` involves compilation, it does not provide a `--keep-going`
163+
flag. Use `--no-fail-fast` to run as many benchmarks as possible without
164+
stopping at the first failure. To "compile" as many benchmarks as possible, use
165+
`--benches` to build benchmark binaries separately. For example:
166+
167+
cargo build --benches --release --keep-going
168+
cargo bench --no-fail-fast
169+
163170
{{> section-environment }}
164171

165172
{{> section-exit-status }}

src/doc/man/cargo-test.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,14 @@ includes an option to control the number of threads used:
190190

191191
{{/options}}
192192

193+
While `cargo test` involves compilation, it does not provide a `--keep-going`
194+
flag. Use `--no-fail-fast` to run as many tests as possible without stopping at
195+
the first failure. To "compile" as many tests as possible, use `--tests` to
196+
build test binaries separately. For example:
197+
198+
cargo build --tests --keep-going
199+
cargo test --tests --no-fail-fast
200+
193201
{{> section-environment }}
194202

195203
{{> section-exit-status }}

src/doc/man/generated_txt/cargo-bench.txt

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -413,9 +413,14 @@ OPTIONS
413413
If a string default is provided, it sets the value back to defaults.
414414
Should not be 0.
415415

416-
--keep-going
417-
Build as many crates in the dependency graph as possible, rather
418-
than aborting the build on the first one that fails to build.
416+
While cargo bench involves compilation, it does not provide a
417+
--keep-going flag. Use --no-fail-fast to run as many benchmarks as
418+
possible without stopping at the first failure. To “compile” as many
419+
benchmarks as possible, use --benches to build benchmark binaries
420+
separately. For example:
421+
422+
cargo build --benches --release --keep-going
423+
cargo bench --no-fail-fast
419424

420425
ENVIRONMENT
421426
See the reference

src/doc/man/generated_txt/cargo-build.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,13 @@ OPTIONS
348348
Build as many crates in the dependency graph as possible, rather
349349
than aborting the build on the first one that fails to build.
350350

351+
For example if the current package depends on dependencies fails and
352+
works, one of which fails to build, cargo check -j1 may or may not
353+
build the one that succeeds (depending on which one of the two
354+
builds Cargo picked to run first), whereas cargo check -j1
355+
--keep-going would definitely run both builds, even if the one run
356+
first fails.
357+
351358
--future-incompat-report
352359
Displays a future-incompat report for any future-incompatible
353360
warnings produced during execution of this command

src/doc/man/generated_txt/cargo-check.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,13 @@ OPTIONS
333333
Build as many crates in the dependency graph as possible, rather
334334
than aborting the build on the first one that fails to build.
335335

336+
For example if the current package depends on dependencies fails and
337+
works, one of which fails to build, cargo check -j1 may or may not
338+
build the one that succeeds (depending on which one of the two
339+
builds Cargo picked to run first), whereas cargo check -j1
340+
--keep-going would definitely run both builds, even if the one run
341+
first fails.
342+
336343
--future-incompat-report
337344
Displays a future-incompat report for any future-incompatible
338345
warnings produced during execution of this command

src/doc/man/generated_txt/cargo-doc.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,13 @@ OPTIONS
304304
Build as many crates in the dependency graph as possible, rather
305305
than aborting the build on the first one that fails to build.
306306

307+
For example if the current package depends on dependencies fails and
308+
works, one of which fails to build, cargo check -j1 may or may not
309+
build the one that succeeds (depending on which one of the two
310+
builds Cargo picked to run first), whereas cargo check -j1
311+
--keep-going would definitely run both builds, even if the one run
312+
first fails.
313+
307314
ENVIRONMENT
308315
See the reference
309316
<https://doc.rust-lang.org/cargo/reference/environment-variables.html>

src/doc/man/generated_txt/cargo-fix.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -406,6 +406,13 @@ OPTIONS
406406
Build as many crates in the dependency graph as possible, rather
407407
than aborting the build on the first one that fails to build.
408408

409+
For example if the current package depends on dependencies fails and
410+
works, one of which fails to build, cargo check -j1 may or may not
411+
build the one that succeeds (depending on which one of the two
412+
builds Cargo picked to run first), whereas cargo check -j1
413+
--keep-going would definitely run both builds, even if the one run
414+
first fails.
415+
409416
ENVIRONMENT
410417
See the reference
411418
<https://doc.rust-lang.org/cargo/reference/environment-variables.html>

src/doc/man/generated_txt/cargo-install.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,13 @@ OPTIONS
281281
Build as many crates in the dependency graph as possible, rather
282282
than aborting the build on the first one that fails to build.
283283

284+
For example if the current package depends on dependencies fails and
285+
works, one of which fails to build, cargo check -j1 may or may not
286+
build the one that succeeds (depending on which one of the two
287+
builds Cargo picked to run first), whereas cargo check -j1
288+
--keep-going would definitely run both builds, even if the one run
289+
first fails.
290+
284291
Display Options
285292
-v, --verbose
286293
Use verbose output. May be specified twice for “very verbose”

src/doc/man/generated_txt/cargo-package.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,13 @@ OPTIONS
198198
Build as many crates in the dependency graph as possible, rather
199199
than aborting the build on the first one that fails to build.
200200

201+
For example if the current package depends on dependencies fails and
202+
works, one of which fails to build, cargo check -j1 may or may not
203+
build the one that succeeds (depending on which one of the two
204+
builds Cargo picked to run first), whereas cargo check -j1
205+
--keep-going would definitely run both builds, even if the one run
206+
first fails.
207+
201208
Display Options
202209
-v, --verbose
203210
Use verbose output. May be specified twice for “very verbose”

src/doc/man/generated_txt/cargo-publish.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,13 @@ OPTIONS
164164
Build as many crates in the dependency graph as possible, rather
165165
than aborting the build on the first one that fails to build.
166166

167+
For example if the current package depends on dependencies fails and
168+
works, one of which fails to build, cargo check -j1 may or may not
169+
build the one that succeeds (depending on which one of the two
170+
builds Cargo picked to run first), whereas cargo check -j1
171+
--keep-going would definitely run both builds, even if the one run
172+
first fails.
173+
167174
Display Options
168175
-v, --verbose
169176
Use verbose output. May be specified twice for “very verbose”

0 commit comments

Comments
 (0)