Skip to content

Commit ecf824f

Browse files
committed
Update additional uses of --all.
- man pages - Slightly reword deprecation notice. - Include --all in man pages. - Update some additional usages in code and docs.
1 parent 7176df0 commit ecf824f

20 files changed

+100
-45
lines changed

src/bin/cargo/commands/doc.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,10 @@ pub fn cli() -> App {
3434
By default the documentation for the local package and all dependencies is
3535
built. The output is all placed in `target/doc` in rustdoc's usual format.
3636
37-
All packages in the workspace are documented if the `--all` flag is supplied. The
38-
`--all` flag is automatically assumed for a virtual manifest.
39-
Note that `--exclude` has to be specified in conjunction with the `--all` flag.
37+
All packages in the workspace are documented if the `--workspace` flag is
38+
supplied. The `--workspace` flag is automatically assumed for a virtual
39+
manifest. Note that `--exclude` has to be specified in conjunction with the
40+
`--workspace` flag.
4041
4142
If the `--package` argument is given, then SPEC is a package ID specification
4243
which indicates which package should be documented. If it is not given, then the

src/cargo/core/workspace.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,13 @@ pub struct Workspace<'cfg> {
5656

5757
// The subset of `members` that are used by the
5858
// `build`, `check`, `test`, and `bench` subcommands
59-
// when no package is selected with `--package` / `-p` and `--all`
59+
// when no package is selected with `--package` / `-p` and `--workspace`
6060
// is not used.
6161
//
6262
// This is set by the `default-members` config
6363
// in the `[workspace]` section.
6464
// When unset, this is the same as `members` for virtual workspaces
65-
// (`--all` is implied)
65+
// (`--workspace` is implied)
6666
// or only the root package for non-virtual workspaces.
6767
default_members: Vec<PathBuf>,
6868

src/cargo/ops/cargo_compile.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ impl Packages {
106106
Ok(match (all, exclude.len(), package.len()) {
107107
(false, 0, 0) => Packages::Default,
108108
(false, 0, _) => Packages::Packages(package),
109-
(false, _, _) => failure::bail!("--exclude can only be used together with --all"),
109+
(false, _, _) => failure::bail!("--exclude can only be used together with --workspace"),
110110
(true, 0, _) => Packages::All,
111111
(true, _, _) => Packages::OptOut(exclude),
112112
})

src/cargo/util/command_prelude.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,7 @@ pub trait AppExt: Sized {
3131
exclude: &'static str,
3232
) -> Self {
3333
self.arg_package_spec_simple(package)
34-
._arg(opt(
35-
"all",
36-
"Will be changed to 'workspace' option (deprecated)",
37-
))
34+
._arg(opt("all", "Alias for --workspace (deprecated)"))
3835
._arg(opt("workspace", all))
3936
._arg(multi_opt("exclude", "SPEC", exclude))
4037
}

src/doc/man/generated/cargo-bench.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,10 @@ <h3 id="cargo_bench_package_selection">Package Selection</h3>
9292
<dd>
9393
<p>Benchmark all members in the workspace.</p>
9494
</dd>
95+
<dt class="hdlist1"><strong>--all</strong></dt>
96+
<dd>
97+
<p>Deprecated alias for <code>--workspace</code>.</p>
98+
</dd>
9599
<dt class="hdlist1"><strong>--exclude</strong> <em>SPEC</em>&#8230;&#8203;</dt>
96100
<dd>
97101
<p>Exclude the specified packages. Must be used in conjunction with the
@@ -501,4 +505,4 @@ <h2 id="cargo_bench_see_also">SEE ALSO</h2>
501505
<p><a href="index.html">cargo(1)</a>, <a href="cargo-test.html">cargo-test(1)</a></p>
502506
</div>
503507
</div>
504-
</div>
508+
</div>

src/doc/man/generated/cargo-build.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ <h3 id="cargo_build_package_selection">Package Selection</h3>
4848
<dd>
4949
<p>Build all members in the workspace.</p>
5050
</dd>
51+
<dt class="hdlist1"><strong>--all</strong></dt>
52+
<dd>
53+
<p>Deprecated alias for <code>--workspace</code>.</p>
54+
</dd>
5155
<dt class="hdlist1"><strong>--exclude</strong> <em>SPEC</em>&#8230;&#8203;</dt>
5256
<dd>
5357
<p>Exclude the specified packages. Must be used in conjunction with the
@@ -464,4 +468,4 @@ <h2 id="cargo_build_see_also">SEE ALSO</h2>
464468
<p><a href="index.html">cargo(1)</a>, <a href="cargo-rustc.html">cargo-rustc(1)</a></p>
465469
</div>
466470
</div>
467-
</div>
471+
</div>

src/doc/man/generated/cargo-check.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@ <h3 id="cargo_check_package_selection">Package Selection</h3>
5252
<dd>
5353
<p>Check all members in the workspace.</p>
5454
</dd>
55+
<dt class="hdlist1"><strong>--all</strong></dt>
56+
<dd>
57+
<p>Deprecated alias for <code>--workspace</code>.</p>
58+
</dd>
5559
<dt class="hdlist1"><strong>--exclude</strong> <em>SPEC</em>&#8230;&#8203;</dt>
5660
<dd>
5761
<p>Exclude the specified packages. Must be used in conjunction with the
@@ -455,4 +459,4 @@ <h2 id="cargo_check_see_also">SEE ALSO</h2>
455459
<p><a href="index.html">cargo(1)</a>, <a href="cargo-build.html">cargo-build(1)</a></p>
456460
</div>
457461
</div>
458-
</div>
462+
</div>

src/doc/man/generated/cargo-doc.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ <h3 id="cargo_doc_package_selection">Package Selection</h3>
6868
<dd>
6969
<p>Document all members in the workspace.</p>
7070
</dd>
71+
<dt class="hdlist1"><strong>--all</strong></dt>
72+
<dd>
73+
<p>Deprecated alias for <code>--workspace</code>.</p>
74+
</dd>
7175
<dt class="hdlist1"><strong>--exclude</strong> <em>SPEC</em>&#8230;&#8203;</dt>
7276
<dd>
7377
<p>Exclude the specified packages. Must be used in conjunction with the
@@ -416,4 +420,4 @@ <h2 id="cargo_doc_see_also">SEE ALSO</h2>
416420
<p><a href="index.html">cargo(1)</a>, <a href="cargo-rustdoc.html">cargo-rustdoc(1)</a>, <a href="https://doc.rust-lang.org/rustdoc/index.html">rustdoc(1)</a></p>
417421
</div>
418422
</div>
419-
</div>
423+
</div>

src/doc/man/generated/cargo-fix.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,10 @@ <h3 id="cargo_fix_package_selection">Package Selection</h3>
123123
<dd>
124124
<p>Fix all members in the workspace.</p>
125125
</dd>
126+
<dt class="hdlist1"><strong>--all</strong></dt>
127+
<dd>
128+
<p>Deprecated alias for <code>--workspace</code>.</p>
129+
</dd>
126130
<dt class="hdlist1"><strong>--exclude</strong> <em>SPEC</em>&#8230;&#8203;</dt>
127131
<dd>
128132
<p>Exclude the specified packages. Must be used in conjunction with the
@@ -534,4 +538,4 @@ <h2 id="cargo_fix_see_also">SEE ALSO</h2>
534538
<p><a href="index.html">cargo(1)</a>, <a href="cargo-check.html">cargo-check(1)</a></p>
535539
</div>
536540
</div>
537-
</div>
541+
</div>

src/doc/man/generated/cargo-test.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,10 @@ <h3 id="cargo_test_package_selection">Package Selection</h3>
9898
<dd>
9999
<p>Test all members in the workspace.</p>
100100
</dd>
101+
<dt class="hdlist1"><strong>--all</strong></dt>
102+
<dd>
103+
<p>Deprecated alias for <code>--workspace</code>.</p>
104+
</dd>
101105
<dt class="hdlist1"><strong>--exclude</strong> <em>SPEC</em>&#8230;&#8203;</dt>
102106
<dd>
103107
<p>Exclude the specified packages. Must be used in conjunction with the
@@ -563,4 +567,4 @@ <h2 id="cargo_test_see_also">SEE ALSO</h2>
563567
<p><a href="index.html">cargo(1)</a>, <a href="cargo-bench.html">cargo-bench(1)</a></p>
564568
</div>
565569
</div>
566-
</div>
570+
</div>

0 commit comments

Comments
 (0)