Skip to content

Commit fb20176

Browse files
refactor: cleanup internal dependency references (#2976)
## Description - no more patching - always use local path deps for workspace dependencies - fix clippy complaints on rust `1.83` ## Breaking Changes None ## Notes & open questions <!-- Any notes, remarks or open questions you have to make about the PR. --> ## Change checklist - [x] Self-review. - [x] Documentation updates following the [style guide](https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#appendix-a-full-conventions-text), if relevant. - [ ] Tests if relevant. - [x] All breaking changes documented.
1 parent 73c9b75 commit fb20176

File tree

11 files changed

+49
-80
lines changed

11 files changed

+49
-80
lines changed

Cargo.lock

Lines changed: 19 additions & 40 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,3 @@ unexpected_cfgs = { level = "warn", check-cfg = ["cfg(iroh_docsrs)"] }
4545

4646
[workspace.lints.clippy]
4747
unused-async = "warn"
48-
49-
# Temporary fix for dependencies
50-
[patch.crates-io]
51-
iroh = { path = "./iroh" }
52-
iroh-base = { path = "./iroh-base" }
53-
iroh-metrics = { path = "./iroh-metrics" }
54-
iroh-test = { path = "./iroh-test" }

iroh-base/src/relay_url.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ impl fmt::Debug for RelayUrl {
8484
/// output.
8585
struct DbgStr<'a>(&'a str);
8686

87-
impl<'a> fmt::Debug for DbgStr<'a> {
87+
impl fmt::Debug for DbgStr<'_> {
8888
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
8989
write!(f, r#""{}""#, self.0)
9090
}

iroh-dns-server/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ governor = "0.6.3" #needs new release of tower_governor for 0.7.0
2929
hickory-proto = "=0.25.0-alpha.2"
3030
hickory-server = { version = "=0.25.0-alpha.2", features = ["dns-over-rustls"] }
3131
http = "1.0.0"
32-
iroh-metrics = { version = "0.28.0" }
32+
iroh-metrics = { version = "0.28.0", path = "../iroh-metrics" }
3333
lru = "0.12.3"
3434
parking_lot = "0.12.1"
3535
pkarr = { version = "2.2.0", features = [ "async", "relay", "dht"], default-features = false }
@@ -60,8 +60,8 @@ z32 = "1.1.1"
6060

6161
[dev-dependencies]
6262
hickory-resolver = "=0.25.0-alpha.2"
63-
iroh = { version = "0.28.0" }
64-
iroh-test = "0.28.0"
63+
iroh = { version = "0.28.0", path = "../iroh" }
64+
iroh-test = { version = "0.28.0", path = "../iroh-test" }
6565
pkarr = { version = "2.2.0", features = ["rand"] }
6666

6767
[package.metadata.docs.rs]

iroh-net-report/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ derive_more = { version = "1.0.0", features = ["display"] }
2222
futures-buffered = "0.2.8"
2323
futures-lite = "2.3"
2424
hickory-resolver = "=0.25.0-alpha.2"
25-
iroh-base = { version = "0.28.0", default-features = false, features = ["relay"] }
26-
iroh-metrics = { version = "0.28.0", default-features = false, optional = true }
25+
iroh-base = { version = "0.28.0", path = "../iroh-base", default-features = false, features = ["relay"] }
26+
iroh-metrics = { version = "0.28.0", path = "../iroh-metrics", default-features = false, optional = true }
2727
iroh-relay = { version = "0.28", path = "../iroh-relay" }
2828
netwatch = { version = "0.1.0", path = "../net-tools/netwatch" }
2929
portmapper = { version = "0.1.0", path = "../net-tools/portmapper" }
@@ -39,7 +39,7 @@ url = { version = "2.4" }
3939

4040
[dev-dependencies]
4141
iroh-relay = { version = "0.28", path = "../iroh-relay", features = ["test-utils", "server"] }
42-
iroh-test = "0.28.0"
42+
iroh-test = { version = "0.28.0", path = "../iroh-test" }
4343
once_cell = "1.18.0"
4444
pretty_assertions = "1.4"
4545
testresult = "0.4.0"

iroh-node-util/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ workspace = true
1919
anyhow = "1"
2020
clap = { version = "4", features = ["derive"], optional = true }
2121
tokio = "1"
22-
iroh = { path = "../iroh" }
22+
iroh = { version = "0.28.1", path = "../iroh" }
2323
tempfile = "3"
2424
strum = "0.26"
2525
nested_enum_utils = "0.1.0"

iroh-relay/Cargo.toml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ http = "1"
3838
http-body-util = "0.1.0"
3939
hyper = { version = "1", features = ["server", "client", "http1"] }
4040
hyper-util = "0.1.1"
41-
iroh-base = { version = "0.28.0", features = ["key"] }
42-
iroh-metrics = { version = "0.28.0", default-features = false }
41+
iroh-base = { version = "0.28.0", path = "../iroh-base", features = ["key"] }
42+
iroh-metrics = { version = "0.28.0", path = "../iroh-metrics", default-features = false }
4343
libc = "0.2.139"
4444
num_enum = "0.7"
4545
once_cell = "1.18.0"
@@ -110,12 +110,9 @@ tokio = { version = "1", features = [
110110
"test-util",
111111
] }
112112
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
113-
iroh-test = "0.28.0"
113+
iroh-test = { version = "0.28.0", path = "../iroh-test" }
114114
serde_json = "1"
115115

116-
[build-dependencies]
117-
duct = "0.13.6"
118-
119116
[features]
120117
default = ["metrics", "server"]
121118
server = [

iroh-relay/src/protos/relay.rs

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,16 @@
11
//! This module implements the relaying protocol used the [`crate::server`] and [`crate::client`].
2+
//!
3+
//! Protocol flow:
4+
//!
5+
//! Login:
6+
//! * client connects
7+
//! * -> client sends `FrameType::ClientInfo`
8+
//!
9+
//! Steady state:
10+
//! * server occasionally sends `FrameType::KeepAlive` (or `FrameType::Ping`)
11+
//! * client responds to any `FrameType::Ping` with a `FrameType::Pong`
12+
//! * clients sends `FrameType::SendPacket`
13+
//! * server then sends `FrameType::RecvPacket` to recipient
214
315
use std::time::Duration;
416

@@ -51,21 +63,9 @@ pub(crate) const PER_CLIENT_READ_QUEUE_DEPTH: usize = 512;
5163
/// with nodes running earlier protocol versions.
5264
pub(crate) const PROTOCOL_VERSION: usize = 3;
5365

54-
///
55-
/// Protocol flow:
56-
///
57-
/// Login:
58-
/// * client connects
59-
/// * -> client sends FrameType::ClientInfo
60-
///
61-
/// Steady state:
62-
/// * server occasionally sends FrameType::KeepAlive (or FrameType::Ping)
63-
/// * client responds to any FrameType::Ping with a FrameType::Pong
64-
/// * clients sends FrameType::SendPacket
65-
/// * server then sends FrameType::RecvPacket to recipient
66-
66+
/// Indicates this IS the client's home node
6767
const PREFERRED: u8 = 1u8;
68-
/// indicates this is NOT the client's home node
68+
/// Indicates this IS NOT the client's home node
6969
const NOT_PREFERRED: u8 = 0u8;
7070

7171
/// The one byte frame type at the beginning of the frame

iroh/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ http-body-util = "0.1.0"
4444
hyper = { version = "1", features = ["server", "client", "http1"] }
4545
hyper-util = "0.1.1"
4646
igd-next = { version = "0.15.1", features = ["aio_tokio"] }
47-
iroh-base = { version = "0.28.0", features = ["key"] }
47+
iroh-base = { version = "0.28.0", features = ["key"], path = "../iroh-base" }
4848
iroh-relay = { version = "0.28", path = "../iroh-relay" }
4949
libc = "0.2.139"
5050
netdev = "0.31.0"
@@ -110,7 +110,7 @@ z32 = "1.0.3"
110110
net-report = { package = "iroh-net-report", path = "../iroh-net-report", version = "0.28" }
111111

112112
# metrics
113-
iroh-metrics = { version = "0.28.0", default-features = false }
113+
iroh-metrics = { version = "0.28.0", path = "../iroh-metrics", default-features = false }
114114
strum = { version = "0.26", features = ["derive"] }
115115

116116
# local-swarm-discovery
@@ -166,7 +166,7 @@ tokio = { version = "1", features = [
166166
"test-util",
167167
] }
168168
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
169-
iroh-test = "0.28.0"
169+
iroh-test = { version = "0.28.0", path = "../iroh-test" }
170170
serde_json = "1"
171171
testresult = "0.4.0"
172172
iroh-relay = { version = "0.28", path = "../iroh-relay", features = ["test-utils", "server"] }

iroh/src/endpoint.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1070,7 +1070,7 @@ pub struct Accept<'a> {
10701070
ep: Endpoint,
10711071
}
10721072

1073-
impl<'a> Future for Accept<'a> {
1073+
impl Future for Accept<'_> {
10741074
type Output = Option<Incoming>;
10751075

10761076
fn poll(self: Pin<&mut Self>, cx: &mut std::task::Context<'_>) -> Poll<Self::Output> {

net-tools/portmapper/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ derive_more = { version = "1.0.0", features = ["debug", "display", "from", "try_
2020
futures-lite = "2.5"
2121
futures-util = "0.3.25"
2222
igd-next = { version = "0.15.1", features = ["aio_tokio"] }
23-
iroh-metrics = { version = "0.28.0", default-features = false }
23+
iroh-metrics = { version = "0.28.0", path = "../../iroh-metrics", default-features = false }
2424
libc = "0.2.139"
2525
netwatch = { version = "0.1.0", path = "../netwatch" }
2626
num_enum = "0.7"

0 commit comments

Comments
 (0)