]> git.proxmox.com Git - cargo.git/commitdiff
Change --all to --workspace
authork-nasa <htilcs1115@gmail.com>
Mon, 12 Aug 2019 12:31:20 +0000 (21:31 +0900)
committerEric Huss <eric@huss.org>
Wed, 4 Sep 2019 00:14:34 +0000 (17:14 -0700)
23 files changed:
src/bin/cargo/commands/bench.rs
src/bin/cargo/commands/build.rs
src/bin/cargo/commands/check.rs
src/bin/cargo/commands/clippy.rs
src/bin/cargo/commands/test.rs
src/cargo/util/command_prelude.rs
src/doc/man/generated/cargo-bench.html
src/doc/man/generated/cargo-build.html
src/doc/man/generated/cargo-check.html
src/doc/man/generated/cargo-doc.html
src/doc/man/generated/cargo-fix.html
src/doc/man/generated/cargo-test.html
src/doc/man/options-packages.adoc
src/doc/src/reference/manifest.md
tests/testsuite/bad_config.rs
tests/testsuite/bench.rs
tests/testsuite/build.rs
tests/testsuite/check.rs
tests/testsuite/features.rs
tests/testsuite/freshness.rs
tests/testsuite/metabuild.rs
tests/testsuite/test.rs
tests/testsuite/workspaces.rs

index e4d9959f075d834e525c81c4f4efc962f922a3f7..6e96cf08f9f7f3f8c9ecc9b593e8f4d464a5f3bc 100644 (file)
@@ -59,9 +59,9 @@ which indicates which package should be benchmarked. If it is not given, then
 the current package is benchmarked. For more information on SPEC and its format,
 see the `cargo help pkgid` command.
 
-All packages in the workspace are benchmarked if the `--all` flag is supplied. The
-`--all` flag is automatically assumed for a virtual manifest.
-Note that `--exclude` has to be specified in conjunction with the `--all` flag.
+All packages in the workspace are benchmarked if the `--workspace` flag is supplied. The
+`--workspace` flag is automatically assumed for a virtual manifest.
+Note that `--exclude` has to be specified in conjunction with the `--workspace` flag.
 
 The `--jobs` argument affects the building of the benchmark executable but does
 not affect how many jobs are used when running the benchmarks.
index ba83b7c1f02c8f58927f63c45312c5e0d1e40996..5dee4e03984956412fb843e19ecea85327306475 100644 (file)
@@ -42,9 +42,9 @@ pub fn cli() -> App {
         .arg_build_plan()
         .after_help(
             "\
-All packages in the workspace are built if the `--all` flag is supplied. The
-`--all` flag is automatically assumed for a virtual manifest.
-Note that `--exclude` has to be specified in conjunction with the `--all` flag.
+All packages in the workspace are built if the `--workspace` flag is supplied. The
+`--workspace` flag is automatically assumed for a virtual manifest.
+Note that `--exclude` has to be specified in conjunction with the `--workspace` flag.
 
 Compilation can be configured via the use of profiles which are configured in
 the manifest. The default profile for this command is `dev`, but passing
index d0d5c6215bd93c8350d70e0510892244f1804d20..74c1a688927117e0036908166def0129e5c73e1f 100644 (file)
@@ -40,9 +40,9 @@ which indicates which package should be built. If it is not given, then the
 current package is built. For more information on SPEC and its format, see the
 `cargo help pkgid` command.
 
-All packages in the workspace are checked if the `--all` flag is supplied. The
-`--all` flag is automatically assumed for a virtual manifest.
-Note that `--exclude` has to be specified in conjunction with the `--all` flag.
+All packages in the workspace are checked if the `--workspace` flag is supplied. The
+`--workspace` flag is automatically assumed for a virtual manifest.
+Note that `--exclude` has to be specified in conjunction with the `--workspace` flag.
 
 Compilation can be configured via the use of profiles which are configured in
 the manifest. The default profile for this command is `dev`, but passing
index 135fe51bfcb6b25d2f687d1c469583eda7548d90..4aa412ceecae30411f14ee6a5e37b74225e8cf62 100644 (file)
@@ -38,9 +38,9 @@ which indicates which package should be built. If it is not given, then the
 current package is built. For more information on SPEC and its format, see the
 `cargo help pkgid` command.
 
-All packages in the workspace are checked if the `--all` flag is supplied. The
-`--all` flag is automatically assumed for a virtual manifest.
-Note that `--exclude` has to be specified in conjunction with the `--all` flag.
+All packages in the workspace are checked if the `--workspace` flag is supplied. The
+`--workspace` flag is automatically assumed for a virtual manifest.
+Note that `--exclude` has to be specified in conjunction with the `--workspace` flag.
 
 To allow or deny a lint from the command line you can use `cargo clippy --`
 with:
index 06ef20d849ca61c9ea5a588ae47cf879bc6d065c..c9457023986472ba7f4f58b056e1630574a8890c 100644 (file)
@@ -69,9 +69,9 @@ which indicates which package should be tested. If it is not given, then the
 current package is tested. For more information on SPEC and its format, see the
 `cargo help pkgid` command.
 
-All packages in the workspace are tested if the `--all` flag is supplied. The
-`--all` flag is automatically assumed for a virtual manifest.
-Note that `--exclude` has to be specified in conjunction with the `--all` flag.
+All packages in the workspace are tested if the `--workspace` flag is supplied. The
+`--workspace` flag is automatically assumed for a virtual manifest.
+Note that `--exclude` has to be specified in conjunction with the `--workspace` flag.
 
 The `--jobs` argument affects the building of the test executable but does
 not affect how many jobs are used when running the tests. The default value
index e8963cec1477e41ce46ffae59946b9b5a171756b..4a1450b3c2fd961492ee6ff466f98873c6b7d5ae 100644 (file)
@@ -31,7 +31,11 @@ pub trait AppExt: Sized {
         exclude: &'static str,
     ) -> Self {
         self.arg_package_spec_simple(package)
-            ._arg(opt("all", all))
+            ._arg(opt(
+                "all",
+                "Will be changed to 'workspace' option (deprecated)",
+            ))
+            ._arg(opt("workspace", all))
             ._arg(multi_opt("exclude", "SPEC", exclude))
     }
 
@@ -290,7 +294,8 @@ pub trait ArgMatchesExt {
         workspace: Option<&Workspace<'a>>,
     ) -> CargoResult<CompileOptions<'a>> {
         let spec = Packages::from_flags(
-            self._is_present("all"),
+            // TODO Integrate into 'workspace'
+            self._is_present("workspace") || self._is_present("all"),
             self._values_of("exclude"),
             self._values_of("package"),
         )?;
index 3117d547690fbd1ae024884cd1507f531d220207..4326901ae19d83c3dab85db79afce96296a8d117 100644 (file)
@@ -78,7 +78,7 @@ by the manifest will be selected.</p>
 <p>The default members of a workspace can be set explicitly with the
 <code>workspace.default-members</code> key in the root manifest. If this is not set, a
 virtual workspace will include all workspace members (equivalent to passing
-<code>--all</code>), and a non-virtual workspace will include only the root crate itself.</p>
+<code>--workspace</code>), and a non-virtual workspace will include only the root crate itself.</p>
 </div>
 <div class="dlist">
 <dl>
@@ -88,14 +88,14 @@ virtual workspace will include all workspace members (equivalent to passing
 <p>Benchmark only the specified packages. See <a href="cargo-pkgid.html">cargo-pkgid(1)</a> for the
 SPEC format. This flag may be specified multiple times.</p>
 </dd>
-<dt class="hdlist1"><strong>--all</strong></dt>
+<dt class="hdlist1"><strong>--workspace</strong></dt>
 <dd>
 <p>Benchmark all members in the workspace.</p>
 </dd>
 <dt class="hdlist1"><strong>--exclude</strong> <em>SPEC</em>&#8230;&#8203;</dt>
 <dd>
 <p>Exclude the specified packages. Must be used in conjunction with the
-<code>--all</code> flag. This flag may be specified multiple times.</p>
+<code>--workspace</code> flag. This flag may be specified multiple times.</p>
 </dd>
 </dl>
 </div>
@@ -501,4 +501,4 @@ details on environment variables that Cargo reads.</p>
 <p><a href="index.html">cargo(1)</a>, <a href="cargo-test.html">cargo-test(1)</a></p>
 </div>
 </div>
-</div>
\ No newline at end of file
+</div>
index 6bb4d6f1dfe5e61042c1f144a5cce465eaee32e5..4f88c0e14495b585107202dddf9180098fb91450 100644 (file)
@@ -34,7 +34,7 @@ by the manifest will be selected.</p>
 <p>The default members of a workspace can be set explicitly with the
 <code>workspace.default-members</code> key in the root manifest. If this is not set, a
 virtual workspace will include all workspace members (equivalent to passing
-<code>--all</code>), and a non-virtual workspace will include only the root crate itself.</p>
+<code>--workspace</code>), and a non-virtual workspace will include only the root crate itself.</p>
 </div>
 <div class="dlist">
 <dl>
@@ -44,14 +44,14 @@ virtual workspace will include all workspace members (equivalent to passing
 <p>Build only the specified packages. See <a href="cargo-pkgid.html">cargo-pkgid(1)</a> for the
 SPEC format. This flag may be specified multiple times.</p>
 </dd>
-<dt class="hdlist1"><strong>--all</strong></dt>
+<dt class="hdlist1"><strong>--workspace</strong></dt>
 <dd>
 <p>Build all members in the workspace.</p>
 </dd>
 <dt class="hdlist1"><strong>--exclude</strong> <em>SPEC</em>&#8230;&#8203;</dt>
 <dd>
 <p>Exclude the specified packages. Must be used in conjunction with the
-<code>--all</code> flag. This flag may be specified multiple times.</p>
+<code>--workspace</code> flag. This flag may be specified multiple times.</p>
 </dd>
 </dl>
 </div>
@@ -464,4 +464,4 @@ details on environment variables that Cargo reads.</p>
 <p><a href="index.html">cargo(1)</a>, <a href="cargo-rustc.html">cargo-rustc(1)</a></p>
 </div>
 </div>
-</div>
\ No newline at end of file
+</div>
index 1360cc6cc42051d26c98e729eb285dec7567aaf8..6e3722b1dad27d212f638928e34b963672648903 100644 (file)
@@ -38,7 +38,7 @@ by the manifest will be selected.</p>
 <p>The default members of a workspace can be set explicitly with the
 <code>workspace.default-members</code> key in the root manifest. If this is not set, a
 virtual workspace will include all workspace members (equivalent to passing
-<code>--all</code>), and a non-virtual workspace will include only the root crate itself.</p>
+<code>--workspace</code>), and a non-virtual workspace will include only the root crate itself.</p>
 </div>
 <div class="dlist">
 <dl>
@@ -48,14 +48,14 @@ virtual workspace will include all workspace members (equivalent to passing
 <p>Check only the specified packages. See <a href="cargo-pkgid.html">cargo-pkgid(1)</a> for the
 SPEC format. This flag may be specified multiple times.</p>
 </dd>
-<dt class="hdlist1"><strong>--all</strong></dt>
+<dt class="hdlist1"><strong>--workspace</strong></dt>
 <dd>
 <p>Check all members in the workspace.</p>
 </dd>
 <dt class="hdlist1"><strong>--exclude</strong> <em>SPEC</em>&#8230;&#8203;</dt>
 <dd>
 <p>Exclude the specified packages. Must be used in conjunction with the
-<code>--all</code> flag. This flag may be specified multiple times.</p>
+<code>--workspace</code> flag. This flag may be specified multiple times.</p>
 </dd>
 </dl>
 </div>
@@ -455,4 +455,4 @@ details on environment variables that Cargo reads.</p>
 <p><a href="index.html">cargo(1)</a>, <a href="cargo-build.html">cargo-build(1)</a></p>
 </div>
 </div>
-</div>
\ No newline at end of file
+</div>
index c94c121bf6307173a3f94eaac9461e69d9caca5f..eb0393eafcef5c523c49080ec9701b5c912d23ba 100644 (file)
@@ -54,7 +54,7 @@ by the manifest will be selected.</p>
 <p>The default members of a workspace can be set explicitly with the
 <code>workspace.default-members</code> key in the root manifest. If this is not set, a
 virtual workspace will include all workspace members (equivalent to passing
-<code>--all</code>), and a non-virtual workspace will include only the root crate itself.</p>
+<code>--workspace</code>), and a non-virtual workspace will include only the root crate itself.</p>
 </div>
 <div class="dlist">
 <dl>
@@ -64,14 +64,14 @@ virtual workspace will include all workspace members (equivalent to passing
 <p>Document only the specified packages. See <a href="cargo-pkgid.html">cargo-pkgid(1)</a> for the
 SPEC format. This flag may be specified multiple times.</p>
 </dd>
-<dt class="hdlist1"><strong>--all</strong></dt>
+<dt class="hdlist1"><strong>--workspace</strong></dt>
 <dd>
 <p>Document all members in the workspace.</p>
 </dd>
 <dt class="hdlist1"><strong>--exclude</strong> <em>SPEC</em>&#8230;&#8203;</dt>
 <dd>
 <p>Exclude the specified packages. Must be used in conjunction with the
-<code>--all</code> flag. This flag may be specified multiple times.</p>
+<code>--workspace</code> flag. This flag may be specified multiple times.</p>
 </dd>
 </dl>
 </div>
@@ -416,4 +416,4 @@ details on environment variables that Cargo reads.</p>
 <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>
 </div>
 </div>
-</div>
\ No newline at end of file
+</div>
index 190f31c47e57809c6be3631a3ab9cf315ebd6e20..6fd1e2c0fa1df5dba1f79830b3d69b974b564b13 100644 (file)
@@ -109,7 +109,7 @@ by the manifest will be selected.</p>
 <p>The default members of a workspace can be set explicitly with the
 <code>workspace.default-members</code> key in the root manifest. If this is not set, a
 virtual workspace will include all workspace members (equivalent to passing
-<code>--all</code>), and a non-virtual workspace will include only the root crate itself.</p>
+<code>--workspace</code>), and a non-virtual workspace will include only the root crate itself.</p>
 </div>
 <div class="dlist">
 <dl>
@@ -119,14 +119,14 @@ virtual workspace will include all workspace members (equivalent to passing
 <p>Fix only the specified packages. See <a href="cargo-pkgid.html">cargo-pkgid(1)</a> for the
 SPEC format. This flag may be specified multiple times.</p>
 </dd>
-<dt class="hdlist1"><strong>--all</strong></dt>
+<dt class="hdlist1"><strong>--workspace</strong></dt>
 <dd>
 <p>Fix all members in the workspace.</p>
 </dd>
 <dt class="hdlist1"><strong>--exclude</strong> <em>SPEC</em>&#8230;&#8203;</dt>
 <dd>
 <p>Exclude the specified packages. Must be used in conjunction with the
-<code>--all</code> flag. This flag may be specified multiple times.</p>
+<code>--workspace</code> flag. This flag may be specified multiple times.</p>
 </dd>
 </dl>
 </div>
@@ -534,4 +534,4 @@ details on environment variables that Cargo reads.</p>
 <p><a href="index.html">cargo(1)</a>, <a href="cargo-check.html">cargo-check(1)</a></p>
 </div>
 </div>
-</div>
\ No newline at end of file
+</div>
index 02ff2670fcad278181f6e45fe6787b13f374530c..f4593674614b9ba3c17d10827f143817b3649733 100644 (file)
@@ -84,7 +84,7 @@ by the manifest will be selected.</p>
 <p>The default members of a workspace can be set explicitly with the
 <code>workspace.default-members</code> key in the root manifest. If this is not set, a
 virtual workspace will include all workspace members (equivalent to passing
-<code>--all</code>), and a non-virtual workspace will include only the root crate itself.</p>
+<code>--workspace</code>), and a non-virtual workspace will include only the root crate itself.</p>
 </div>
 <div class="dlist">
 <dl>
@@ -94,14 +94,14 @@ virtual workspace will include all workspace members (equivalent to passing
 <p>Test only the specified packages. See <a href="cargo-pkgid.html">cargo-pkgid(1)</a> for the
 SPEC format. This flag may be specified multiple times.</p>
 </dd>
-<dt class="hdlist1"><strong>--all</strong></dt>
+<dt class="hdlist1"><strong>--workspace</strong></dt>
 <dd>
 <p>Test all members in the workspace.</p>
 </dd>
 <dt class="hdlist1"><strong>--exclude</strong> <em>SPEC</em>&#8230;&#8203;</dt>
 <dd>
 <p>Exclude the specified packages. Must be used in conjunction with the
-<code>--all</code> flag. This flag may be specified multiple times.</p>
+<code>--workspace</code> flag. This flag may be specified multiple times.</p>
 </dd>
 </dl>
 </div>
@@ -563,4 +563,4 @@ details on environment variables that Cargo reads.</p>
 <p><a href="index.html">cargo(1)</a>, <a href="cargo-bench.html">cargo-bench(1)</a></p>
 </div>
 </div>
-</div>
\ No newline at end of file
+</div>
index cd671059d6e3169cc07281ce5b8b60c1c3bbbf87..cf287fd5e938cb9c0910c25ce81486a5ebfc59aa 100644 (file)
@@ -7,16 +7,16 @@ by the manifest will be selected.
 The default members of a workspace can be set explicitly with the
 `workspace.default-members` key in the root manifest. If this is not set, a
 virtual workspace will include all workspace members (equivalent to passing
-`--all`), and a non-virtual workspace will include only the root crate itself.
+`--workspace`), and a non-virtual workspace will include only the root crate itself.
 
 *-p* _SPEC_...::
 *--package* _SPEC_...::
     {actionverb} only the specified packages. See man:cargo-pkgid[1] for the
     SPEC format. This flag may be specified multiple times.
 
-*--all*::
+*--workspace*::
     {actionverb} all members in the workspace.
 
 *--exclude* _SPEC_...::
     Exclude the specified packages. Must be used in conjunction with the
-    `--all` flag. This flag may be specified multiple times.
+    `--workspace` flag. This flag may be specified multiple times.
index fb0e020705a0bf02f125433514103d9daef93677..40e3dbf980d57223e7eca655c80c0e60dc45d93f 100644 (file)
@@ -658,7 +658,7 @@ manifest*.
 #### Package selection
 
 In a workspace, package-related cargo commands like [`cargo build`] apply to
-packages selected by `-p` / `--package` or `--all` command-line parameters.
+packages selected by `-p` / `--package` or `--workspace` command-line parameters.
 When neither is specified, the optional `default-members` configuration is used:
 
 ```toml
@@ -670,7 +670,7 @@ default-members = ["path/to/member2", "path/to/member3/foo"]
 When specified, `default-members` must expand to a subset of `members`.
 
 When `default-members` is not specified, the default is the root manifest
-if it is a package, or every member manifest (as if `--all` were specified
+if it is a package, or every member manifest (as if `--workspace` were specified
 on the command-line) for virtual workspaces.
 
 ### The project layout
index ccc318e969e1c60d264048c1c4e2477935d1accc..cab90956d83e92b287b90c9b925a484b443ef9fb 100644 (file)
@@ -780,7 +780,7 @@ fn unused_keys_in_virtual_manifest() {
         .file("bar/Cargo.toml", &basic_manifest("bar", "0.0.1"))
         .file("bar/src/lib.rs", r"")
         .build();
-    p.cargo("build --all")
+    p.cargo("build --workspace")
         .with_stderr(
             "\
 [WARNING] [..]/foo/Cargo.toml: unused manifest key: workspace.bulid
index 35488793671baff80bb7e45723ae549346e2281e..0e8c78543fd864dac03b8bdff07d5fb6822e1df8 100644 (file)
@@ -1382,7 +1382,7 @@ fn bench_all_workspace() {
         )
         .build();
 
-    p.cargo("bench --all")
+    p.cargo("bench --workspace")
         .with_stderr_contains("[RUNNING] target/release/deps/bar-[..][EXE]")
         .with_stdout_contains("test bench_bar ... bench: [..]")
         .with_stderr_contains("[RUNNING] target/release/deps/foo-[..][EXE]")
@@ -1430,7 +1430,7 @@ fn bench_all_exclude() {
         )
         .build();
 
-    p.cargo("bench --all --exclude baz")
+    p.cargo("bench --workspace --exclude baz")
         .with_stdout_contains(
             "\
 running 1 test
@@ -1484,7 +1484,7 @@ fn bench_all_virtual_manifest() {
         .build();
 
     // The order in which bar and baz are built is not guaranteed
-    p.cargo("bench --all")
+    p.cargo("bench --workspace")
         .with_stderr_contains("[RUNNING] target/release/deps/baz-[..][EXE]")
         .with_stdout_contains("test bench_baz ... bench: [..]")
         .with_stderr_contains("[RUNNING] target/release/deps/bar-[..][EXE]")
index 9a280ff3461c501fc2e3537e48188f2985778a54..016eaac8d5a7065ec0c49e16e00c10bc46453948 100644 (file)
@@ -129,7 +129,7 @@ fn incremental_config() {
 fn cargo_compile_with_workspace_excluded() {
     let p = project().file("src/main.rs", "fn main() {}").build();
 
-    p.cargo("build --all --exclude foo")
+    p.cargo("build --workspace --exclude foo")
         .with_stderr_does_not_contain("[..]virtual[..]")
         .with_stderr_contains("[..]no packages to compile")
         .with_status(101)
@@ -3390,7 +3390,7 @@ fn build_all_workspace() {
         .file("bar/src/lib.rs", "pub fn bar() {}")
         .build();
 
-    p.cargo("build --all")
+    p.cargo("build --workspace")
         .with_stderr(
             "[..] Compiling bar v0.1.0 ([..])\n\
              [..] Compiling foo v0.1.0 ([..])\n\
@@ -3420,7 +3420,7 @@ fn build_all_exclude() {
         .file("baz/src/lib.rs", "pub fn baz() { break_the_build(); }")
         .build();
 
-    p.cargo("build --all --exclude baz")
+    p.cargo("build --workspace --exclude baz")
         .with_stderr_contains("[..]Compiling foo v0.1.0 [..]")
         .with_stderr_contains("[..]Compiling bar v0.1.0 [..]")
         .with_stderr_does_not_contain("[..]Compiling baz v0.1.0 [..]")
@@ -3456,7 +3456,7 @@ fn build_all_workspace_implicit_examples() {
         .file("bar/examples/h.rs", "fn main() {}")
         .build();
 
-    p.cargo("build --all --examples")
+    p.cargo("build --workspace --examples")
         .with_stderr(
             "[..] Compiling bar v0.1.0 ([..])\n\
              [..] Compiling foo v0.1.0 ([..])\n\
@@ -3490,7 +3490,7 @@ fn build_all_virtual_manifest() {
         .build();
 
     // The order in which bar and baz are built is not guaranteed
-    p.cargo("build --all")
+    p.cargo("build --workspace")
         .with_stderr_contains("[..] Compiling baz v0.1.0 ([..])")
         .with_stderr_contains("[..] Compiling bar v0.1.0 ([..])")
         .with_stderr(
@@ -3580,7 +3580,7 @@ fn build_all_virtual_manifest_implicit_examples() {
         .build();
 
     // The order in which bar and baz are built is not guaranteed
-    p.cargo("build --all --examples")
+    p.cargo("build --workspace --examples")
         .with_stderr_contains("[..] Compiling baz v0.1.0 ([..])")
         .with_stderr_contains("[..] Compiling bar v0.1.0 ([..])")
         .with_stderr(
@@ -3625,7 +3625,7 @@ fn build_all_member_dependency_same_name() {
 
     Package::new("a", "0.1.0").publish();
 
-    p.cargo("build --all")
+    p.cargo("build --workspace")
         .with_stderr(
             "[UPDATING] `[..]` index\n\
              [DOWNLOADING] crates ...\n\
@@ -3695,7 +3695,7 @@ fn run_proper_alias_binary_from_src() {
         .file("src/bar.rs", r#"fn main() { println!("bar"); }"#)
         .build();
 
-    p.cargo("build --all").run();
+    p.cargo("build --workspace").run();
     p.process(&p.bin("foo")).with_stdout("foo\n").run();
     p.process(&p.bin("bar")).with_stdout("bar\n").run();
 }
@@ -3719,7 +3719,7 @@ fn run_proper_alias_binary_main_rs() {
         .file("src/main.rs", r#"fn main() { println!("main"); }"#)
         .build();
 
-    p.cargo("build --all").run();
+    p.cargo("build --workspace").run();
     p.process(&p.bin("foo")).with_stdout("main\n").run();
     p.process(&p.bin("bar")).with_stdout("main\n").run();
 }
index 147098bc9c71d2f031615fb3d5f0e9c5a9409ad1..8fc886a88a48a6d6a81ca36f6e71884ceb183dae 100644 (file)
@@ -396,7 +396,7 @@ fn check_all() {
         .file("b/src/lib.rs", "")
         .build();
 
-    p.cargo("check --all -v")
+    p.cargo("check --workspace -v")
         .with_stderr_contains("[..] --crate-name foo src/lib.rs [..]")
         .with_stderr_contains("[..] --crate-name foo src/main.rs [..]")
         .with_stderr_contains("[..] --crate-name b b/src/lib.rs [..]")
@@ -429,7 +429,7 @@ fn check_virtual_all_implied() {
 #[cargo_test]
 fn exclude_warns_on_non_existing_package() {
     let p = project().file("src/lib.rs", "").build();
-    p.cargo("check --all --exclude bar")
+    p.cargo("check --workspace --exclude bar")
         .with_stdout("")
         .with_stderr(
             r#"[WARNING] excluded package(s) bar not found in workspace `[CWD]`
index 4fa585dd97ac502a72034795b413742648b90ba9..c1753f5e2fc22fb0613d6d0d6b4767c993cf46bf 100644 (file)
@@ -1397,7 +1397,7 @@ fn combining_features_and_package() {
         )
         .build();
 
-    p.cargo("build -Z package-features --all --features main")
+    p.cargo("build -Z package-features --workspace --features main")
         .masquerade_as_nightly_cargo()
         .with_status(101)
         .with_stderr_contains("[ERROR] cannot specify features for more than one package")
@@ -1419,7 +1419,7 @@ fn combining_features_and_package() {
         .with_stderr_contains("[ERROR] cannot specify features for packages outside of workspace")
         .run();
 
-    p.cargo("build -Z package-features --all --all-features")
+    p.cargo("build -Z package-features --workspace --all-features")
         .masquerade_as_nightly_cargo()
         .run();
     p.cargo("run -Z package-features --package bar --features main")
index e103da47b77b76af4371feeec3e5980852043b11..037777194557b9ba5fb6e3a1dd0d842cd172dc6a 100644 (file)
@@ -1134,7 +1134,7 @@ fn reuse_shared_build_dep() {
         .file("bar/build.rs", "fn main() {}")
         .build();
 
-    p.cargo("build --all").run();
+    p.cargo("build --workspace").run();
     // This should not recompile!
     p.cargo("build -p foo -v")
         .with_stderr(
index c1bc4fda11cb225e0f306857994db577beda7a75..2f6486beee6cbb4b5adcfb4585940a3efd251386 100644 (file)
@@ -409,7 +409,7 @@ fn metabuild_workspace() {
         )
         .build();
 
-    p.cargo("build -vv --all")
+    p.cargo("build -vv --workspace")
         .masquerade_as_nightly_cargo()
         .with_stdout_contains("[member1 0.0.1] Hello mb1 [..]member1")
         .with_stdout_contains("[member1 0.0.1] Hello mb2 [..]member1")
@@ -613,7 +613,7 @@ fn metabuild_two_versions() {
         )
         .build();
 
-    p.cargo("build -vv --all")
+    p.cargo("build -vv --workspace")
         .masquerade_as_nightly_cargo()
         .with_stdout_contains("[member1 0.0.1] Hello mb1 [..]member1")
         .with_stdout_contains("[member2 0.0.1] Hello mb2 [..]member2")
index 3c6fb5314b8464ecc24802c4f82b86ac12df00bf..d9e73f8b0a43f99870a0186158cc52a1d957228e 100644 (file)
@@ -2797,7 +2797,7 @@ fn test_all_workspace() {
         .file("bar/src/lib.rs", "#[test] fn bar_test() {}")
         .build();
 
-    p.cargo("test --all")
+    p.cargo("test --workspace")
         .with_stdout_contains("test foo_test ... ok")
         .with_stdout_contains("test bar_test ... ok")
         .run();
@@ -2824,7 +2824,7 @@ fn test_all_exclude() {
         .file("baz/src/lib.rs", "#[test] pub fn baz() { assert!(false); }")
         .build();
 
-    p.cargo("test --all --exclude baz")
+    p.cargo("test --workspace --exclude baz")
         .with_stdout_contains(
             "running 1 test
 test bar ... ok",
@@ -2848,7 +2848,7 @@ fn test_all_virtual_manifest() {
         .file("b/src/lib.rs", "#[test] fn b() {}")
         .build();
 
-    p.cargo("test --all")
+    p.cargo("test --workspace")
         .with_stdout_contains("test a ... ok")
         .with_stdout_contains("test b ... ok")
         .run();
@@ -2902,7 +2902,7 @@ fn test_all_member_dependency_same_name() {
 
     Package::new("a", "0.1.0").publish();
 
-    p.cargo("test --all")
+    p.cargo("test --workspace")
         .with_stdout_contains("test a ... ok")
         .run();
 }
@@ -3037,7 +3037,7 @@ fn doctest_and_registry() {
 
     Package::new("b", "0.1.0").publish();
 
-    p.cargo("test --all -v").run();
+    p.cargo("test --workspace -v").run();
 }
 
 #[cargo_test]
@@ -3075,7 +3075,7 @@ fn test_order() {
         .file("tests/z.rs", "#[test] fn test_z() {}")
         .build();
 
-    p.cargo("test --all")
+    p.cargo("test --workspace")
         .with_stdout_contains(
             "
 running 1 test
@@ -3117,7 +3117,7 @@ fn cyclic_dev() {
         .file("tests/foo.rs", "extern crate foo;")
         .build();
 
-    p.cargo("test --all").run();
+    p.cargo("test --workspace").run();
 }
 
 #[cargo_test]
@@ -3228,7 +3228,7 @@ fn find_dependency_of_proc_macro_dependency_with_target() {
         .dep("bar", "0.1")
         .file("src/lib.rs", "extern crate bar;")
         .publish();
-    p.cargo("test --all --target").arg(rustc_host()).run();
+    p.cargo("test --workspace --target").arg(rustc_host()).run();
 }
 
 #[cargo_test]
@@ -3310,7 +3310,7 @@ fn test_hint_workspace_nonvirtual() {
         .file("a/src/lib.rs", "#[test] fn t1() {assert!(false)}")
         .build();
 
-    p.cargo("test --all")
+    p.cargo("test --workspace")
         .with_stderr_contains("[ERROR] test failed, to rerun pass '-p a --lib'")
         .with_status(101)
         .run();
index e1dba6416b4e024da30dc005fb950bc27b604902..0ec72048032682e5e57495aadf802f7a27f95752 100644 (file)
@@ -1862,7 +1862,7 @@ fn dep_used_with_separate_features() {
     let p = p.build();
 
     // Build the entire workspace.
-    p.cargo("build --all")
+    p.cargo("build --workspace")
         .with_stderr(
             "\
 [..]Compiling feat_lib v0.1.0 ([..])