Skip to content

Commit

Permalink
chore(iroh, iroh-relay): Avoid a duplicate tungstenite dependency (#3006
Browse files Browse the repository at this point in the history
)

## Description

Before we used to depend on both tungstenite version 0.21 as well as
0.24, because:
```
tungstenite v0.21.0
└── tokio-tungstenite v0.21.0
    └── tokio-tungstenite-wasm v0.3.1
        ├── iroh v0.29.0 (/home/philipp/program/work/iroh/iroh)
        └── iroh-relay v0.29.0 (/home/philipp/program/work/iroh/iroh-relay)
            ├── iroh v0.29.0 (/home/philipp/program/work/iroh/iroh)
            └── iroh-net-report v0.29.0 (/home/philipp/program/work/iroh/iroh-net-report)
                └── iroh v0.29.0 (/home/philipp/program/work/iroh/iroh)
tungstenite v0.24.0
└── tokio-tungstenite v0.24.0
    ├── iroh v0.29.0 (/home/philipp/program/work/iroh/iroh)
    └── iroh-relay v0.29.0 (/home/philipp/program/work/iroh/iroh-relay)
        ├── iroh v0.29.0 (/home/philipp/program/work/iroh/iroh)
        └── iroh-net-report v0.29.0 (/home/philipp/program/work/iroh/iroh-net-report)
            └── iroh v0.29.0 (/home/philipp/program/work/iroh/iroh)
```

Basically, `tokio-tungstenite-wasm` pulls in `0.21` and there's no newer
version of it yet.
But we updated all our dependencies including `tungstenite`, duplicating
it.

## Notes & open questions

<!-- Any notes, remarks or open questions you have to make about the PR.
-->

I want this to be temporary until we can finally switch to
`fasterwebsockets` entirely once it implements [`poll`-based
methods](denoland/fastwebsockets#78) (but I
worry the project's maintenance is ... unclear).

I checked the [tungstenite
changelog](https://github.com/snapview/tungstenite-rs/blob/master/CHANGELOG.md),
and it doesn't look like there's anything critical in there. The
`rustls` update doesn't affect us - we don't duplicate rustls versions
after this rollback.

## 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.
  • Loading branch information
matheus23 authored Dec 4, 2024
1 parent f75a04b commit 566d7eb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 36 deletions.
38 changes: 4 additions & 34 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion iroh-relay/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ tokio-rustls = { version = "0.26", default-features = false, features = [
"ring",
] }
tokio-rustls-acme = { version = "0.6", optional = true }
tokio-tungstenite = "0.24"
tokio-tungstenite = "0.21" # avoid duplicating this dependency as long as tokio-tungstenite-wasm isn't updated
tokio-tungstenite-wasm = "0.3"
tokio-util = { version = "0.7", features = ["io-util", "io", "codec", "rt"] }
toml = { version = "0.8", optional = true }
Expand Down
2 changes: 1 addition & 1 deletion iroh/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ tokio-rustls = { version = "0.26", default-features = false, features = [
"ring",
] }
tokio-stream = { version = "0.1.15" }
tokio-tungstenite = "0.24"
tokio-tungstenite = "0.21" # avoid duplicating this dependency as long as tokio-tungstenite-wasm isn't updated
tokio-tungstenite-wasm = "0.3"
tokio-util = { version = "0.7", features = ["io-util", "io", "codec", "rt"] }
tracing = "0.1"
Expand Down

0 comments on commit 566d7eb

Please sign in to comment.