forked from rust-lang/cargo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Detect
cargo add foo
will inherit a workspace dependency
- Loading branch information
Showing
32 changed files
with
198 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[workspace] | ||
members = ["primary", "dependency"] | ||
|
||
[workspace.dependencies] | ||
foo = { version = "0.0.0", path = "./dependency"} |
3 changes: 3 additions & 0 deletions
3
tests/snapshots/add/detect_workspace_inherit.in/dependency/Cargo.toml
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[package] | ||
name = "foo" | ||
version = "0.0.0" |
Empty file.
5 changes: 5 additions & 0 deletions
5
tests/snapshots/add/detect_workspace_inherit.in/primary/Cargo.toml
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
cargo-features = ["workspace-inheritance"] | ||
|
||
[package] | ||
name = "bar" | ||
version = "0.0.0" |
Empty file.
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[workspace] | ||
members = ["primary", "dependency"] | ||
|
||
[workspace.dependencies] | ||
foo = { version = "0.0.0", path = "./dependency"} |
3 changes: 3 additions & 0 deletions
3
tests/snapshots/add/detect_workspace_inherit.out/dependency/Cargo.toml
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[package] | ||
name = "foo" | ||
version = "0.0.0" |
8 changes: 8 additions & 0 deletions
8
tests/snapshots/add/detect_workspace_inherit.out/primary/Cargo.toml
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
cargo-features = ["workspace-inheritance"] | ||
|
||
[package] | ||
name = "bar" | ||
version = "0.0.0" | ||
|
||
[dependencies] | ||
foo.workspace = true |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
Adding foo (workspace) to dependencies. |
Empty file.
5 changes: 5 additions & 0 deletions
5
tests/snapshots/add/detect_workspace_inherit_features.in/Cargo.toml
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[workspace] | ||
members = ["primary", "dependency"] | ||
|
||
[workspace.dependencies] | ||
foo = { version = "0.0.0", path = "./dependency", features = ["merge"] } |
14 changes: 14 additions & 0 deletions
14
tests/snapshots/add/detect_workspace_inherit_features.in/dependency/Cargo.toml
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
[package] | ||
name = "foo" | ||
version = "0.0.0" | ||
|
||
[features] | ||
default-base = [] | ||
default-test-base = [] | ||
default-merge-base = [] | ||
default = ["default-base", "default-test-base", "default-merge-base"] | ||
test-base = [] | ||
test = ["test-base", "default-test-base"] | ||
merge-base = [] | ||
merge = ["merge-base", "default-merge-base"] | ||
unrelated = [] |
Empty file.
5 changes: 5 additions & 0 deletions
5
tests/snapshots/add/detect_workspace_inherit_features.in/primary/Cargo.toml
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
cargo-features = ["workspace-inheritance"] | ||
|
||
[package] | ||
name = "bar" | ||
version = "0.0.0" |
Empty file.
5 changes: 5 additions & 0 deletions
5
tests/snapshots/add/detect_workspace_inherit_features.out/Cargo.toml
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[workspace] | ||
members = ["primary", "dependency"] | ||
|
||
[workspace.dependencies] | ||
foo = { version = "0.0.0", path = "./dependency", features = ["merge"] } |
14 changes: 14 additions & 0 deletions
14
tests/snapshots/add/detect_workspace_inherit_features.out/dependency/Cargo.toml
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
[package] | ||
name = "foo" | ||
version = "0.0.0" | ||
|
||
[features] | ||
default-base = [] | ||
default-test-base = [] | ||
default-merge-base = [] | ||
default = ["default-base", "default-test-base", "default-merge-base"] | ||
test-base = [] | ||
test = ["test-base", "default-test-base"] | ||
merge-base = [] | ||
merge = ["merge-base", "default-merge-base"] | ||
unrelated = [] |
8 changes: 8 additions & 0 deletions
8
tests/snapshots/add/detect_workspace_inherit_features.out/primary/Cargo.toml
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
cargo-features = ["workspace-inheritance"] | ||
|
||
[package] | ||
name = "bar" | ||
version = "0.0.0" | ||
|
||
[dependencies] | ||
foo = { workspace = true, features = ["test"] } |
10 changes: 10 additions & 0 deletions
10
tests/snapshots/add/detect_workspace_inherit_features.stderr
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
Adding foo (workspace) to dependencies. | ||
Features: | ||
+ default-base | ||
+ default-merge-base | ||
+ default-test-base | ||
+ merge | ||
+ merge-base | ||
+ test | ||
+ test-base | ||
- unrelated |
Empty file.
5 changes: 5 additions & 0 deletions
5
tests/snapshots/add/detect_workspace_inherit_optional.in/Cargo.toml
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[workspace] | ||
members = ["primary", "dependency"] | ||
|
||
[workspace.dependencies] | ||
foo = { version = "0.0.0", path = "./dependency"} |
3 changes: 3 additions & 0 deletions
3
tests/snapshots/add/detect_workspace_inherit_optional.in/dependency/Cargo.toml
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[package] | ||
name = "foo" | ||
version = "0.0.0" |
Empty file.
5 changes: 5 additions & 0 deletions
5
tests/snapshots/add/detect_workspace_inherit_optional.in/primary/Cargo.toml
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
cargo-features = ["workspace-inheritance"] | ||
|
||
[package] | ||
name = "bar" | ||
version = "0.0.0" |
Empty file.
5 changes: 5 additions & 0 deletions
5
tests/snapshots/add/detect_workspace_inherit_optional.out/Cargo.toml
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[workspace] | ||
members = ["primary", "dependency"] | ||
|
||
[workspace.dependencies] | ||
foo = { version = "0.0.0", path = "./dependency"} |
3 changes: 3 additions & 0 deletions
3
tests/snapshots/add/detect_workspace_inherit_optional.out/dependency/Cargo.toml
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[package] | ||
name = "foo" | ||
version = "0.0.0" |
8 changes: 8 additions & 0 deletions
8
tests/snapshots/add/detect_workspace_inherit_optional.out/primary/Cargo.toml
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
cargo-features = ["workspace-inheritance"] | ||
|
||
[package] | ||
name = "bar" | ||
version = "0.0.0" | ||
|
||
[dependencies] | ||
foo = { workspace = true, optional = true } |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
Adding foo (workspace) to optional dependencies. |
Empty file.
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