-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Warn
--package
will be ignore if it comes up with --workspace
- Loading branch information
Showing
7 changed files
with
28 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2658,22 +2658,25 @@ fn warn_package_togother_with_workspace() { | |
// baz is present in the workspace and it is a real existing package. | ||
p.cargo("check --package baz --workspace") | ||
.with_stderr_data(str![[r#" | ||
[CHECKING] foo v0.1.0 ([ROOT]/foo) | ||
[WARNING] ignoring `--package` as the `--workspace` or `--all` flag is set | ||
[CHECKING] baz v0.1.0 ([ROOT]/foo/baz) | ||
[CHECKING] foo v0.1.0 ([ROOT]/foo) | ||
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s | ||
"#]]) | ||
.run(); | ||
|
||
p.cargo("check --package nonexistence --workspace") | ||
.with_stderr_data(str![[r#" | ||
[WARNING] ignoring `--package` as the `--workspace` or `--all` flag is set | ||
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s | ||
"#]]) | ||
.run(); | ||
|
||
p.cargo("package --package nonexistence --workspace") | ||
.with_stderr_data(str![[r#" | ||
[WARNING] ignoring `--package` as the `--workspace` or `--all` flag is set | ||
[WARNING] manifest has no description, license, license-file, documentation, homepage or repository. | ||
See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. | ||
[PACKAGING] baz v0.1.0 ([ROOT]/foo/baz) | ||
|
@@ -2694,6 +2697,7 @@ See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for | |
|
||
p.cargo("publish --dry-run --package nonexistence -Zpackage-workspace --workspace") | ||
.with_stderr_data(str![[r#" | ||
[WARNING] ignoring `--package` as the `--workspace` or `--all` flag is set | ||
[UPDATING] crates.io index | ||
[WARNING] crate [email protected] already exists on crates.io index | ||
[WARNING] manifest has no description, license, license-file, documentation, homepage or repository. | ||
|
@@ -2720,6 +2724,9 @@ See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for | |
.run(); | ||
|
||
p.cargo("tree --package nonexistence --workspace") | ||
.with_stderr_data(str![]) | ||
.with_stderr_data(str![[r#" | ||
[WARNING] ignoring `--package` as the `--workspace` or `--all` flag is set | ||
"#]]) | ||
.run(); | ||
} |