Commit Graph

50 Commits

Author SHA1 Message Date
Weihang Lo 0233632b0c
docs: clarify `--locked` flag only uses deps from `Cargo.lock` 2024-03-27 22:31:06 -04:00
Weihang Lo e549bc809b
fix(cli): resolve confusion between `--frozen` and `--locked` 2024-03-27 22:05:03 -04:00
Martin Robinson 8fa25ba41d chore: Fix minor grammar nit in command-line help
A *very* minor grammar correction. "Require" used in this way is
typically followed by the infinitive.
2024-03-18 14:32:28 +01:00
shuoer86 6c2579184a
docs: fix typos 2023-10-19 21:13:07 +08:00
David Tolnay ece5269e97
Stabilize --keep-going 2023-08-26 13:14:39 -07:00
Weihang Lo 5ae529b24e
feat: remove `--keep-going` from `cargo test/bench`
It confuses people that both `--no-fail-fast` and `--keep-going` exist
on `cargo test` and `cargo bench` but with slightly different behavior.
The intended use cases for `--keep-going` involve build commands like
`build`/`check`/`clippy` but never `test`/`bench`.

Hence, this commit removes `--keep-going` from `test`/`bench` and
provides guidance of `--no-fail-fast` instead.

If people really want to build as many tests as possible, they can also
do it in two steps:

    cargo build --tests --keep-going
    cargo test --test --no-fail-fast
2023-08-11 14:29:02 +01:00
Weihang Lo b630ac16a9
docs(cargo-test): clarify the cwd is for running tests 2023-06-18 20:48:10 +01:00
Weihang Lo c4312a4aa0
docs(cargo-test): missing apostrophe for possessive nouns 2023-06-18 20:32:13 +01:00
Arpad Borsos 18e290c0e4
Enable `doctest-in-workspace` by default
This stabilizes and enables the `-Z doctest-in-workspace` flag by default.

Also adds another testcase to make sure that the `include!()` and `file!()` macros interact well together.
2023-06-17 19:34:34 +02:00
Charalampos Mitrodimas a777b82d5f Support "default" option for build.jobs
This commit adds support for passing the keyword "default"
to either the CLI "--jobs" argument on the "[build.jobs]"
section of ".cargo/config".

This is dony by:
  1. Changing the "jobs" config type to an enum that holds
     a String or an Integer(i.e. i32).
  2. Matching the enum & casting it to an integer

Signed-off-by: Charalampos Mitrodimas <charmitro@gmail.com>
2023-06-03 15:24:41 +03:00
Eric Huss 03a5d8f4a7 Clarify documentation around test target setting.
There was some confusion about the wording in this section regarding
what happens with an example's `main` function. This tries to be more
explicit to clarify what happens when an example is marked as a test.

This also adds a few other clarifications and a link to the reference
documentation.

Closes #11528
2023-04-24 20:19:15 -07:00
Eric Huss 3da2b3c67b Mark -C as unstable 2023-04-11 19:46:05 -07:00
Eric Huss 9ba2ca2034 Clarify docs on `-C` that it appears before the command. 2023-04-09 09:58:06 -07:00
jofas 355ddf57ee documented working directory behaviour of cargo-test, cargo-bench and cargo-run commands 2023-03-29 10:02:17 +02:00
Enyium b1754b2aa2 Regenerate derived doc formats. 2023-02-14 08:24:20 +01:00
Will Page 6510cc5c4b Regenerated documentation with updated '-C' cargo option 2023-02-10 07:42:48 -08:00
Weihang Lo 65332bc9f1
Expand details for `--config` cli arg 2022-09-13 10:25:54 +01:00
andrewpollack 195b1e0e50 Removing excess in 2022-08-11 16:47:52 -07:00
hi-rustin a6e6b89d71 Mark -timings=html unstable in the document
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
2022-08-05 19:39:13 +08:00
Yerkebulan Tulibergenov 767368fd02 Merge branch 'master' into yerke/negative_jobs 2022-07-31 18:21:33 -07:00
Weihang Lo 3e177e0f45
Update docs for -Zmultitarget stabilization 2022-07-17 11:02:01 +01:00
Yerkebulan Tulibergenov 5b76fb3d2b update man pages 2022-07-10 16:06:25 -07:00
Jon Gjengset 7eefb4221f Include --config in cargo help output 2022-06-21 16:24:41 +00:00
Weihang Lo dd8841f6f3
Rephrase wordings in testing docs
- Rephrase doctest exec model as "not guranteed and may change" instead
- Mention `#[bench]` in what cargo-bench automatically runs
- Make it clear for build/rustc when mentioning bin targets auto-built
2022-06-04 08:24:08 +08:00
Weihang Lo fc6b3cc3b6
doc: execution model of doctest
NOTE: This is an undocumented implementation details.
2022-06-03 20:50:02 +08:00
Weihang Lo af0fbf4277
doc: mention `cargo test` runs test targets serially 2022-06-03 20:28:46 +08:00
Weihang Lo 7860458149
doc: highlight `--doc` only applied on lib target 2022-06-03 19:47:23 +08:00
Ed Page f728045729 doc: Include `-F` in option lists
The manual change is to `src/doc/man/includes/section-features.md`, the
rest is code-generated.
2022-04-18 19:19:40 -05:00
David Tolnay 4e45f58852
Unstable --keep-going flag 2022-03-21 18:36:40 -07:00
David McIntyre 8db6be6f0f move changes to man files 2022-02-23 19:42:20 -05:00
Josh Triplett 086e71da00 Fix typo: `--timing` -> `--timings` 2022-01-30 21:43:52 -08:00
Josh Triplett 81e1998e11 Make `--timings=html` unstable, and only stabilize `--timings` 2022-01-30 21:43:52 -08:00
Josh Triplett c854247149 Make `--timings` require `=` if passing an argument
This avoids ambiguity between its optional argument and positional
arguments.
2022-01-30 21:43:52 -08:00
Josh Triplett e23f5f41d1 Move timing reports to `target/cargo-timings`
This avoids dropping them wherever Cargo happens to run from, and
instead places them under the target directory.

This has the advantage, and disadvantage, that `cargo clean` will remove
them.
2022-01-30 21:43:52 -08:00
Josh Triplett c06691897a Stabilize `-Ztimings` as `--timings`
The `-Ztimings` option has existed for years, and many people use it to
profile and optimize their builds. It's one of the common reasons people
use nightly cargo.

The machine-readable JSON output may warrant further careful inspection
before we commit to a stable format. However, for the human-readable
output we don't need to make any commitment about the exact output.

Add a `--timings` option, as the stable equivalent to `-Ztimings`.
Stabilize the `html` output format, and require `-Zunstable-options` for
the `json` output format.

Document the new option, and update the testsuite.
2022-01-30 21:43:48 -08:00
bors a359ce1607 Auto merge of #10152 - steven-joruk:quiet-config, r=ehuss
Support `term.quiet` configuration

Fixes #10128

This follows the existing support for `--verbose` and `term.verbose`.

I've renamed the related tests to be a bit clearer now there are more cases, and the existing quiet tests now prove that they hide the cargo log.

I'm unsure whether I'm supposed to regenerate the documentation as part of this?
2021-12-14 18:40:22 +00:00
Steven Joruk cd4e280458 Update docs 2021-12-08 22:18:47 +00:00
bors 263b1690c2 Auto merge of #10165 - Aaron1011:stabilize-future-incompat, r=ehuss
Stabilize future-incompat-report

Depends on https://github.com/rust-lang/rust/pull/91535
2021-12-06 18:47:39 +00:00
Aaron Hill 8c7c35ec47
Update docs 2021-12-05 14:09:07 -06:00
Josh Triplett c92d917f31 Update documentation for the `-r` short option for `--release` 2021-12-03 22:39:24 -08:00
hi-rustin 17c0ea7417 Improve the help text of the --quiet args for all commands
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
2021-11-14 20:41:00 +08:00
Eric Huss 895f52714c Stabilize named profiles. 2021-09-24 10:00:42 -07:00
Dirkjan Ochtman db3776cfef Document the rust-version field 2021-08-02 13:38:58 +02:00
Eric Huss c2e0d756b7 Link to the new rustc tests chapter. 2021-05-10 15:31:44 -07:00
Casey Rodarmor d174b77337
Clarify which values may be used together with `--message-format` 2021-02-14 17:58:26 -08:00
AnthonyMikh 159e88a69d Fix misspelling of environment variable 2021-01-13 01:33:35 +03:00
Eric Huss d087aeb845 Stabilize -Zfeatures and -Zpackage-features. 2020-12-19 08:26:42 -08:00
Weihang Lo 4a61d8a412
doc: build-man.sh for glob pattern support 2020-10-05 01:24:43 +08:00
Eric Huss fac70ee775 Update links to rustup docs. 2020-09-26 10:09:04 -07:00
Eric Huss 2d4aa38b4f Regenerate man pages using mdman. 2020-08-01 11:14:00 -07:00