chore: use path dependencies for all cyclic dev-dependencies

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>
This commit is contained in:
Thomas Eizinger 2023-06-20 08:42:53 +02:00 committed by GitHub
parent 755de30757
commit 42566869b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 7 deletions

View File

@ -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"] }

View File

@ -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"