Skip to content

Commit

Permalink
chore: use path dependencies for all cyclic dev-dependencies
Browse files Browse the repository at this point in the history
We have two "interface" crates in our workspace: `libp2p-core` and `libp2p-swarm`. Most crates depend on both of these. To compile the tests for this crate, we often need a concrete implementation to some of these interfaces. When specifying a workspace-inherited dependency, we don't get to choose to omit the `version` field next to the path. If a dependency is `path`-only however, it will be tripped by `cargo` during the release process which is why all of this worked before our move to workspace inheritance.

With this patch, we change the minimum amount of dependencies necessary back to `path` dependencies to allowing releasing of our crates.

Related: #4053.

Pull-Request: #4091.


  
Co-Authored-By: Thomas Eizinger <thomas@eizinger.io>
  • Loading branch information
thomaseizinger authored Jun 20, 2023
1 parent 755de30 commit 4256686
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ void = "1"

[dev-dependencies]
async-std = { version = "1.6.2", features = ["attributes"] }
libp2p-mplex = { workspace = true }
libp2p-noise = { workspace = true }
libp2p-mplex = { path = "../muxers/mplex" } # Using `path` here because this is a cyclic dev-dependency which otherwise breaks releasing.
libp2p-noise = { path = "../transports/noise" } # Using `path` here because this is a cyclic dev-dependency which otherwise breaks releasing.
multihash = { workspace = true , features = ["arb"] }
quickcheck = { workspace = true }
libp2p-identity = { workspace = true, features = ["ed25519"] }
Expand Down
10 changes: 5 additions & 5 deletions swarm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@ async-std = { version = "1.6.2", features = ["attributes"] }
either = "1.6.0"
env_logger = "0.10"
futures = "0.3.28"
libp2p-identify = { workspace = true }
libp2p-identify = { path = "../protocols/identify" } # Using `path` here because this is a cyclic dev-dependency which otherwise breaks releasing.
libp2p-identity = { workspace = true, features = ["ed25519"] }
libp2p-kad = { workspace = true }
libp2p-ping = { workspace = true }
libp2p-plaintext = { workspace = true }
libp2p-kad = { path = "../protocols/kad" } # Using `path` here because this is a cyclic dev-dependency which otherwise breaks releasing.
libp2p-ping = { path = "../protocols/ping" } # Using `path` here because this is a cyclic dev-dependency which otherwise breaks releasing.
libp2p-plaintext = { path = "../transports/plaintext" } # Using `path` here because this is a cyclic dev-dependency which otherwise breaks releasing.
libp2p-swarm-derive = { workspace = true }
libp2p-swarm-test = { workspace = true }
libp2p-swarm-test = { path = "../swarm-test" } # Using `path` here because this is a cyclic dev-dependency which otherwise breaks releasing.
libp2p-yamux = { workspace = true }
quickcheck = { workspace = true }
void = "1"
Expand Down

0 comments on commit 4256686

Please sign in to comment.