From 42566869b2ab3d1903d164c84da3308e7e890b8b Mon Sep 17 00:00:00 2001 From: Thomas Eizinger Date: Tue, 20 Jun 2023 08:42:53 +0200 Subject: [PATCH] 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 --- core/Cargo.toml | 4 ++-- swarm/Cargo.toml | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/core/Cargo.toml b/core/Cargo.toml index 84621df5..ef7de0d1 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -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"] } diff --git a/swarm/Cargo.toml b/swarm/Cargo.toml index d5a37ae9..34370371 100644 --- a/swarm/Cargo.toml +++ b/swarm/Cargo.toml @@ -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"