Skip to content

Commit 7176df0

Browse files
k-nasaehuss
authored andcommitted
Change --all to --workspace
1 parent 49fbf52 commit 7176df0

23 files changed

+81
-76
lines changed

src/bin/cargo/commands/bench.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ which indicates which package should be benchmarked. If it is not given, then
5959
the current package is benchmarked. For more information on SPEC and its format,
6060
see the `cargo help pkgid` command.
6161
62-
All packages in the workspace are benchmarked if the `--all` flag is supplied. The
63-
`--all` flag is automatically assumed for a virtual manifest.
64-
Note that `--exclude` has to be specified in conjunction with the `--all` flag.
62+
All packages in the workspace are benchmarked if the `--workspace` flag is supplied. The
63+
`--workspace` flag is automatically assumed for a virtual manifest.
64+
Note that `--exclude` has to be specified in conjunction with the `--workspace` flag.
6565
6666
The `--jobs` argument affects the building of the benchmark executable but does
6767
not affect how many jobs are used when running the benchmarks.

src/bin/cargo/commands/build.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ pub fn cli() -> App {
4242
.arg_build_plan()
4343
.after_help(
4444
"\
45-
All packages in the workspace are built if the `--all` flag is supplied. The
46-
`--all` flag is automatically assumed for a virtual manifest.
47-
Note that `--exclude` has to be specified in conjunction with the `--all` flag.
45+
All packages in the workspace are built if the `--workspace` flag is supplied. The
46+
`--workspace` flag is automatically assumed for a virtual manifest.
47+
Note that `--exclude` has to be specified in conjunction with the `--workspace` flag.
4848
4949
Compilation can be configured via the use of profiles which are configured in
5050
the manifest. The default profile for this command is `dev`, but passing

src/bin/cargo/commands/check.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ which indicates which package should be built. If it is not given, then the
4040
current package is built. For more information on SPEC and its format, see the
4141
`cargo help pkgid` command.
4242
43-
All packages in the workspace are checked if the `--all` flag is supplied. The
44-
`--all` flag is automatically assumed for a virtual manifest.
45-
Note that `--exclude` has to be specified in conjunction with the `--all` flag.
43+
All packages in the workspace are checked if the `--workspace` flag is supplied. The
44+
`--workspace` flag is automatically assumed for a virtual manifest.
45+
Note that `--exclude` has to be specified in conjunction with the `--workspace` flag.
4646
4747
Compilation can be configured via the use of profiles which are configured in
4848
the manifest. The default profile for this command is `dev`, but passing

src/bin/cargo/commands/clippy.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ which indicates which package should be built. If it is not given, then the
3838
current package is built. For more information on SPEC and its format, see the
3939
`cargo help pkgid` command.
4040
41-
All packages in the workspace are checked if the `--all` flag is supplied. The
42-
`--all` flag is automatically assumed for a virtual manifest.
43-
Note that `--exclude` has to be specified in conjunction with the `--all` flag.
41+
All packages in the workspace are checked if the `--workspace` flag is supplied. The
42+
`--workspace` flag is automatically assumed for a virtual manifest.
43+
Note that `--exclude` has to be specified in conjunction with the `--workspace` flag.
4444
4545
To allow or deny a lint from the command line you can use `cargo clippy --`
4646
with:

src/bin/cargo/commands/test.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,9 @@ which indicates which package should be tested. If it is not given, then the
6969
current package is tested. For more information on SPEC and its format, see the
7070
`cargo help pkgid` command.
7171
72-
All packages in the workspace are tested if the `--all` flag is supplied. The
73-
`--all` flag is automatically assumed for a virtual manifest.
74-
Note that `--exclude` has to be specified in conjunction with the `--all` flag.
72+
All packages in the workspace are tested if the `--workspace` flag is supplied. The
73+
`--workspace` flag is automatically assumed for a virtual manifest.
74+
Note that `--exclude` has to be specified in conjunction with the `--workspace` flag.
7575
7676
The `--jobs` argument affects the building of the test executable but does
7777
not affect how many jobs are used when running the tests. The default value

src/cargo/util/command_prelude.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,11 @@ pub trait AppExt: Sized {
3131
exclude: &'static str,
3232
) -> Self {
3333
self.arg_package_spec_simple(package)
34-
._arg(opt("all", all))
34+
._arg(opt(
35+
"all",
36+
"Will be changed to 'workspace' option (deprecated)",
37+
))
38+
._arg(opt("workspace", all))
3539
._arg(multi_opt("exclude", "SPEC", exclude))
3640
}
3741

@@ -290,7 +294,8 @@ pub trait ArgMatchesExt {
290294
workspace: Option<&Workspace<'a>>,
291295
) -> CargoResult<CompileOptions<'a>> {
292296
let spec = Packages::from_flags(
293-
self._is_present("all"),
297+
// TODO Integrate into 'workspace'
298+
self._is_present("workspace") || self._is_present("all"),
294299
self._values_of("exclude"),
295300
self._values_of("package"),
296301
)?;

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ <h3 id="cargo_bench_package_selection">Package Selection</h3>
7878
<p>The default members of a workspace can be set explicitly with the
7979
<code>workspace.default-members</code> key in the root manifest. If this is not set, a
8080
virtual workspace will include all workspace members (equivalent to passing
81-
<code>--all</code>), and a non-virtual workspace will include only the root crate itself.</p>
81+
<code>--workspace</code>), and a non-virtual workspace will include only the root crate itself.</p>
8282
</div>
8383
<div class="dlist">
8484
<dl>
@@ -88,14 +88,14 @@ <h3 id="cargo_bench_package_selection">Package Selection</h3>
8888
<p>Benchmark only the specified packages. See <a href="cargo-pkgid.html">cargo-pkgid(1)</a> for the
8989
SPEC format. This flag may be specified multiple times.</p>
9090
</dd>
91-
<dt class="hdlist1"><strong>--all</strong></dt>
91+
<dt class="hdlist1"><strong>--workspace</strong></dt>
9292
<dd>
9393
<p>Benchmark all members in the workspace.</p>
9494
</dd>
9595
<dt class="hdlist1"><strong>--exclude</strong> <em>SPEC</em>&#8230;&#8203;</dt>
9696
<dd>
9797
<p>Exclude the specified packages. Must be used in conjunction with the
98-
<code>--all</code> flag. This flag may be specified multiple times.</p>
98+
<code>--workspace</code> flag. This flag may be specified multiple times.</p>
9999
</dd>
100100
</dl>
101101
</div>
@@ -501,4 +501,4 @@ <h2 id="cargo_bench_see_also">SEE ALSO</h2>
501501
<p><a href="index.html">cargo(1)</a>, <a href="cargo-test.html">cargo-test(1)</a></p>
502502
</div>
503503
</div>
504-
</div>
504+
</div>

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ <h3 id="cargo_build_package_selection">Package Selection</h3>
3434
<p>The default members of a workspace can be set explicitly with the
3535
<code>workspace.default-members</code> key in the root manifest. If this is not set, a
3636
virtual workspace will include all workspace members (equivalent to passing
37-
<code>--all</code>), and a non-virtual workspace will include only the root crate itself.</p>
37+
<code>--workspace</code>), and a non-virtual workspace will include only the root crate itself.</p>
3838
</div>
3939
<div class="dlist">
4040
<dl>
@@ -44,14 +44,14 @@ <h3 id="cargo_build_package_selection">Package Selection</h3>
4444
<p>Build only the specified packages. See <a href="cargo-pkgid.html">cargo-pkgid(1)</a> for the
4545
SPEC format. This flag may be specified multiple times.</p>
4646
</dd>
47-
<dt class="hdlist1"><strong>--all</strong></dt>
47+
<dt class="hdlist1"><strong>--workspace</strong></dt>
4848
<dd>
4949
<p>Build all members in the workspace.</p>
5050
</dd>
5151
<dt class="hdlist1"><strong>--exclude</strong> <em>SPEC</em>&#8230;&#8203;</dt>
5252
<dd>
5353
<p>Exclude the specified packages. Must be used in conjunction with the
54-
<code>--all</code> flag. This flag may be specified multiple times.</p>
54+
<code>--workspace</code> flag. This flag may be specified multiple times.</p>
5555
</dd>
5656
</dl>
5757
</div>
@@ -464,4 +464,4 @@ <h2 id="cargo_build_see_also">SEE ALSO</h2>
464464
<p><a href="index.html">cargo(1)</a>, <a href="cargo-rustc.html">cargo-rustc(1)</a></p>
465465
</div>
466466
</div>
467-
</div>
467+
</div>

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ <h3 id="cargo_check_package_selection">Package Selection</h3>
3838
<p>The default members of a workspace can be set explicitly with the
3939
<code>workspace.default-members</code> key in the root manifest. If this is not set, a
4040
virtual workspace will include all workspace members (equivalent to passing
41-
<code>--all</code>), and a non-virtual workspace will include only the root crate itself.</p>
41+
<code>--workspace</code>), and a non-virtual workspace will include only the root crate itself.</p>
4242
</div>
4343
<div class="dlist">
4444
<dl>
@@ -48,14 +48,14 @@ <h3 id="cargo_check_package_selection">Package Selection</h3>
4848
<p>Check only the specified packages. See <a href="cargo-pkgid.html">cargo-pkgid(1)</a> for the
4949
SPEC format. This flag may be specified multiple times.</p>
5050
</dd>
51-
<dt class="hdlist1"><strong>--all</strong></dt>
51+
<dt class="hdlist1"><strong>--workspace</strong></dt>
5252
<dd>
5353
<p>Check all members in the workspace.</p>
5454
</dd>
5555
<dt class="hdlist1"><strong>--exclude</strong> <em>SPEC</em>&#8230;&#8203;</dt>
5656
<dd>
5757
<p>Exclude the specified packages. Must be used in conjunction with the
58-
<code>--all</code> flag. This flag may be specified multiple times.</p>
58+
<code>--workspace</code> flag. This flag may be specified multiple times.</p>
5959
</dd>
6060
</dl>
6161
</div>
@@ -455,4 +455,4 @@ <h2 id="cargo_check_see_also">SEE ALSO</h2>
455455
<p><a href="index.html">cargo(1)</a>, <a href="cargo-build.html">cargo-build(1)</a></p>
456456
</div>
457457
</div>
458-
</div>
458+
</div>

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ <h3 id="cargo_doc_package_selection">Package Selection</h3>
5454
<p>The default members of a workspace can be set explicitly with the
5555
<code>workspace.default-members</code> key in the root manifest. If this is not set, a
5656
virtual workspace will include all workspace members (equivalent to passing
57-
<code>--all</code>), and a non-virtual workspace will include only the root crate itself.</p>
57+
<code>--workspace</code>), and a non-virtual workspace will include only the root crate itself.</p>
5858
</div>
5959
<div class="dlist">
6060
<dl>
@@ -64,14 +64,14 @@ <h3 id="cargo_doc_package_selection">Package Selection</h3>
6464
<p>Document only the specified packages. See <a href="cargo-pkgid.html">cargo-pkgid(1)</a> for the
6565
SPEC format. This flag may be specified multiple times.</p>
6666
</dd>
67-
<dt class="hdlist1"><strong>--all</strong></dt>
67+
<dt class="hdlist1"><strong>--workspace</strong></dt>
6868
<dd>
6969
<p>Document all members in the workspace.</p>
7070
</dd>
7171
<dt class="hdlist1"><strong>--exclude</strong> <em>SPEC</em>&#8230;&#8203;</dt>
7272
<dd>
7373
<p>Exclude the specified packages. Must be used in conjunction with the
74-
<code>--all</code> flag. This flag may be specified multiple times.</p>
74+
<code>--workspace</code> flag. This flag may be specified multiple times.</p>
7575
</dd>
7676
</dl>
7777
</div>
@@ -416,4 +416,4 @@ <h2 id="cargo_doc_see_also">SEE ALSO</h2>
416416
<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>
417417
</div>
418418
</div>
419-
</div>
419+
</div>

0 commit comments

Comments
 (0)