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>

src/doc/man/options-packages.adoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ virtual workspace will include all workspace members (equivalent to passing
1717
*--workspace*::
1818
{actionverb} all members in the workspace.
1919

20+
*--all*::
21+
Deprecated alias for `--workspace`.
22+
2023
*--exclude* _SPEC_...::
2124
Exclude the specified packages. Must be used in conjunction with the
2225
`--workspace` flag. This flag may be specified multiple times.

src/etc/cargo.bashcomp.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ _cargo()
3737
local opt_quiet='-q --quiet'
3838
local opt_color='--color'
3939
local opt_common="$opt_help $opt_verbose $opt_quiet $opt_color"
40-
local opt_pkg_spec='-p --package --all --exclude'
40+
local opt_pkg_spec='-p --package --all --exclude --workspace'
4141
local opt_pkg='-p --package'
4242
local opt_feat='--features --all-features --no-default-features'
4343
local opt_mani='--manifest-path'

src/etc/man/cargo-bench.1

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,23 +85,28 @@ by the manifest will be selected.
8585
The default members of a workspace can be set explicitly with the
8686
\fBworkspace.default\-members\fP key in the root manifest. If this is not set, a
8787
virtual workspace will include all workspace members (equivalent to passing
88-
\fB\-\-all\fP), and a non\-virtual workspace will include only the root crate itself.
88+
\fB\-\-workspace\fP), and a non\-virtual workspace will include only the root crate itself.
8989
.sp
9090
\fB\-p\fP \fISPEC\fP..., \fB\-\-package\fP \fISPEC\fP...
9191
.RS 4
9292
Benchmark only the specified packages. See \fBcargo\-pkgid\fP(1) for the
9393
SPEC format. This flag may be specified multiple times.
9494
.RE
9595
.sp
96-
\fB\-\-all\fP
96+
\fB\-\-workspace\fP
9797
.RS 4
9898
Benchmark all members in the workspace.
9999
.RE
100100
.sp
101+
\fB\-\-all\fP
102+
.RS 4
103+
Deprecated alias for \fB\-\-workspace\fP.
104+
.RE
105+
.sp
101106
\fB\-\-exclude\fP \fISPEC\fP...
102107
.RS 4
103108
Exclude the specified packages. Must be used in conjunction with the
104-
\fB\-\-all\fP flag. This flag may be specified multiple times.
109+
\fB\-\-workspace\fP flag. This flag may be specified multiple times.
105110
.RE
106111
.SS "Target Selection"
107112
.sp

src/etc/man/cargo-build.1

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,23 +47,28 @@ by the manifest will be selected.
4747
The default members of a workspace can be set explicitly with the
4848
\fBworkspace.default\-members\fP key in the root manifest. If this is not set, a
4949
virtual workspace will include all workspace members (equivalent to passing
50-
\fB\-\-all\fP), and a non\-virtual workspace will include only the root crate itself.
50+
\fB\-\-workspace\fP), and a non\-virtual workspace will include only the root crate itself.
5151
.sp
5252
\fB\-p\fP \fISPEC\fP..., \fB\-\-package\fP \fISPEC\fP...
5353
.RS 4
5454
Build only the specified packages. See \fBcargo\-pkgid\fP(1) for the
5555
SPEC format. This flag may be specified multiple times.
5656
.RE
5757
.sp
58-
\fB\-\-all\fP
58+
\fB\-\-workspace\fP
5959
.RS 4
6060
Build all members in the workspace.
6161
.RE
6262
.sp
63+
\fB\-\-all\fP
64+
.RS 4
65+
Deprecated alias for \fB\-\-workspace\fP.
66+
.RE
67+
.sp
6368
\fB\-\-exclude\fP \fISPEC\fP...
6469
.RS 4
6570
Exclude the specified packages. Must be used in conjunction with the
66-
\fB\-\-all\fP flag. This flag may be specified multiple times.
71+
\fB\-\-workspace\fP flag. This flag may be specified multiple times.
6772
.RE
6873
.SS "Target Selection"
6974
.sp

src/etc/man/cargo-check.1

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,23 +51,28 @@ by the manifest will be selected.
5151
The default members of a workspace can be set explicitly with the
5252
\fBworkspace.default\-members\fP key in the root manifest. If this is not set, a
5353
virtual workspace will include all workspace members (equivalent to passing
54-
\fB\-\-all\fP), and a non\-virtual workspace will include only the root crate itself.
54+
\fB\-\-workspace\fP), and a non\-virtual workspace will include only the root crate itself.
5555
.sp
5656
\fB\-p\fP \fISPEC\fP..., \fB\-\-package\fP \fISPEC\fP...
5757
.RS 4
5858
Check only the specified packages. See \fBcargo\-pkgid\fP(1) for the
5959
SPEC format. This flag may be specified multiple times.
6060
.RE
6161
.sp
62-
\fB\-\-all\fP
62+
\fB\-\-workspace\fP
6363
.RS 4
6464
Check all members in the workspace.
6565
.RE
6666
.sp
67+
\fB\-\-all\fP
68+
.RS 4
69+
Deprecated alias for \fB\-\-workspace\fP.
70+
.RE
71+
.sp
6772
\fB\-\-exclude\fP \fISPEC\fP...
6873
.RS 4
6974
Exclude the specified packages. Must be used in conjunction with the
70-
\fB\-\-all\fP flag. This flag may be specified multiple times.
75+
\fB\-\-workspace\fP flag. This flag may be specified multiple times.
7176
.RE
7277
.SS "Target Selection"
7378
.sp

src/etc/man/cargo-doc.1

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,23 +64,28 @@ by the manifest will be selected.
6464
The default members of a workspace can be set explicitly with the
6565
\fBworkspace.default\-members\fP key in the root manifest. If this is not set, a
6666
virtual workspace will include all workspace members (equivalent to passing
67-
\fB\-\-all\fP), and a non\-virtual workspace will include only the root crate itself.
67+
\fB\-\-workspace\fP), and a non\-virtual workspace will include only the root crate itself.
6868
.sp
6969
\fB\-p\fP \fISPEC\fP..., \fB\-\-package\fP \fISPEC\fP...
7070
.RS 4
7171
Document only the specified packages. See \fBcargo\-pkgid\fP(1) for the
7272
SPEC format. This flag may be specified multiple times.
7373
.RE
7474
.sp
75-
\fB\-\-all\fP
75+
\fB\-\-workspace\fP
7676
.RS 4
7777
Document all members in the workspace.
7878
.RE
7979
.sp
80+
\fB\-\-all\fP
81+
.RS 4
82+
Deprecated alias for \fB\-\-workspace\fP.
83+
.RE
84+
.sp
8085
\fB\-\-exclude\fP \fISPEC\fP...
8186
.RS 4
8287
Exclude the specified packages. Must be used in conjunction with the
83-
\fB\-\-all\fP flag. This flag may be specified multiple times.
88+
\fB\-\-workspace\fP flag. This flag may be specified multiple times.
8489
.RE
8590
.SS "Target Selection"
8691
.sp

src/etc/man/cargo-fix.1

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,23 +121,28 @@ by the manifest will be selected.
121121
The default members of a workspace can be set explicitly with the
122122
\fBworkspace.default\-members\fP key in the root manifest. If this is not set, a
123123
virtual workspace will include all workspace members (equivalent to passing
124-
\fB\-\-all\fP), and a non\-virtual workspace will include only the root crate itself.
124+
\fB\-\-workspace\fP), and a non\-virtual workspace will include only the root crate itself.
125125
.sp
126126
\fB\-p\fP \fISPEC\fP..., \fB\-\-package\fP \fISPEC\fP...
127127
.RS 4
128128
Fix only the specified packages. See \fBcargo\-pkgid\fP(1) for the
129129
SPEC format. This flag may be specified multiple times.
130130
.RE
131131
.sp
132-
\fB\-\-all\fP
132+
\fB\-\-workspace\fP
133133
.RS 4
134134
Fix all members in the workspace.
135135
.RE
136136
.sp
137+
\fB\-\-all\fP
138+
.RS 4
139+
Deprecated alias for \fB\-\-workspace\fP.
140+
.RE
141+
.sp
137142
\fB\-\-exclude\fP \fISPEC\fP...
138143
.RS 4
139144
Exclude the specified packages. Must be used in conjunction with the
140-
\fB\-\-all\fP flag. This flag may be specified multiple times.
145+
\fB\-\-workspace\fP flag. This flag may be specified multiple times.
141146
.RE
142147
.SS "Target Selection"
143148
.sp

src/etc/man/cargo-test.1

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,23 +91,28 @@ by the manifest will be selected.
9191
The default members of a workspace can be set explicitly with the
9292
\fBworkspace.default\-members\fP key in the root manifest. If this is not set, a
9393
virtual workspace will include all workspace members (equivalent to passing
94-
\fB\-\-all\fP), and a non\-virtual workspace will include only the root crate itself.
94+
\fB\-\-workspace\fP), and a non\-virtual workspace will include only the root crate itself.
9595
.sp
9696
\fB\-p\fP \fISPEC\fP..., \fB\-\-package\fP \fISPEC\fP...
9797
.RS 4
9898
Test only the specified packages. See \fBcargo\-pkgid\fP(1) for the
9999
SPEC format. This flag may be specified multiple times.
100100
.RE
101101
.sp
102-
\fB\-\-all\fP
102+
\fB\-\-workspace\fP
103103
.RS 4
104104
Test all members in the workspace.
105105
.RE
106106
.sp
107+
\fB\-\-all\fP
108+
.RS 4
109+
Deprecated alias for \fB\-\-workspace\fP.
110+
.RE
111+
.sp
107112
\fB\-\-exclude\fP \fISPEC\fP...
108113
.RS 4
109114
Exclude the specified packages. Must be used in conjunction with the
110-
\fB\-\-all\fP flag. This flag may be specified multiple times.
115+
\fB\-\-workspace\fP flag. This flag may be specified multiple times.
111116
.RE
112117
.SS "Target Selection"
113118
.sp

0 commit comments

Comments
 (0)