Skip to content

Commit

Permalink
Avoid 'duplicate package' warnings when depending on cbindgen via git
Browse files Browse the repository at this point in the history
When specifying `cbindgen` as a dependency via git, several 'skipping duplicate
package' warnings pop up regarding some of the test crates.

The warning seems to be spurious given that the test packages aren't needed when
depending on `cbindgen` (see rust-lang/cargo#10752),
but while a fix is being considered for Cargo, this commit disambiguates the
duplicated package names by referring to their relative paths.
  • Loading branch information
irh committed Apr 13, 2023
1 parent 52a65e5 commit e76da3a
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions tests/rust/dep_v2/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[package]
name = "expand-dep"
name = "dep-2"
version = "0.1.0"
authors = ["cbindgen"]
edition = "2018"

[dependencies]
dep = { path = "dep" }
dep = { path = "dep_v2" }
2 changes: 1 addition & 1 deletion tests/rust/dep_v2/dep/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "dep"
name = "dep-2-dep"
version = "0.1.0"
authors = ["cbindgen"]
edition = "2018"
Expand Down
2 changes: 1 addition & 1 deletion tests/rust/expand_default_features/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "expand"
name = "expand-default-features"
version = "0.1.0"
authors = ["cbindgen"]

Expand Down
2 changes: 1 addition & 1 deletion tests/rust/expand_dep_v2/dep/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "dep"
name = "expand-dep-2-dep"
version = "0.1.0"
authors = ["cbindgen"]
edition = "2018"
Expand Down
2 changes: 1 addition & 1 deletion tests/rust/expand_dep_v2/dep_v2/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "dep"
name = "expand-dep-2-dep-2"
version = "0.2.0"
authors = ["cbindgen"]
edition = "2018"
Expand Down
2 changes: 1 addition & 1 deletion tests/rust/expand_features/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "expand"
name = "expand-features"
version = "0.1.0"
authors = ["cbindgen"]

Expand Down
2 changes: 1 addition & 1 deletion tests/rust/expand_no_default_features/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "expand"
name = "expand-no-default-features"
version = "0.1.0"
authors = ["cbindgen"]

Expand Down
2 changes: 1 addition & 1 deletion tests/rust/workspace/dep/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "dep"
name = "workspace-dep"
version = "0.1.0"
authors = ["cbindgen"]

Expand Down

0 comments on commit e76da3a

Please sign in to comment.