Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion rs/web-transport-iroh/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ qlog = ["iroh/qlog"]
bytes = "1"
http = "1"
iroh = { version = "1", default-features = false, features = ["fast-apple-datapath"] }
kio = "0.5.4"
kio = "0.6.2"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Mark the public kio upgrade as breaking

This changes the nominal type accepted by the public SessionAccept::poll_accept_uni and poll_accept_bi methods (rs/web-transport-iroh/src/session.rs:570 and :650-653) from kio 0.5's Waiter to the semver-incompatible 0.6 type. Because the iroh crate does not re-export kio, a downstream poll-based consumer must depend on it directly; after an otherwise compatible web-transport-iroh update, Cargo can retain its 0.5 dependency alongside this new 0.6 dependency and the waiter argument will no longer type-check. The chore(deps) commit metadata normally requests only a patch release, and the configured semver checker does not detect changed parameter types, so this upgrade needs breaking-change metadata or insulation of the public API before release.

AGENTS.md reference: AGENTS.md:L61-L62

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Declining the iroh part of this. poll_accept_uni and poll_accept_bi are methods on H3SessionAccept, which is a private struct (struct H3SessionAccept in rs/web-transport-iroh/src/session.rs). Downstream code can't reach them. In web-transport-iroh, kio shows up only in private code, so the kio bump doesn't change its public API.

The broader point is fair for quiche, quinn, and noq. They pub use kio; and take &kio::Waiter in their public SessionAccept poll methods, so moving to kio 0.6 is semver-visible there. The PR description already notes this. Per the maintainer's direction, this PR doesn't touch versions or release metadata, and the bump is settled when the release-plz release PR is reviewed. I'll flag your point that cargo-semver-checks may not catch a changed foreign type, so that review should confirm a minor bump for those three crates.

(Written by Claude Opus 5.5)

n0-error = "1"
n0-future = "0.3.1"
tokio = { version = "1", default-features = false, features = [
Expand Down
2 changes: 1 addition & 1 deletion rs/web-transport-noq/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ qlog = ["noq/qlog"]
bytes = "1"
futures = "0.3"
http = "1"
kio = "0.5.4"
kio = "0.6.2"
noq = { version = "1", default-features = false, features = [
"tracing-log",
"platform-verifier",
Expand Down
2 changes: 1 addition & 1 deletion rs/web-transport-quiche/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ bytes = "1"
flume = "0.12"
futures = "0.3"
http = "1"
kio = "0.5.4"
kio = "0.6.2"
rustls-pki-types = "1"

thiserror = "2"
Expand Down
34 changes: 20 additions & 14 deletions rs/web-transport-quiche/src/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,15 @@ enum OpenUni {
enum OpenBi {
#[default]
Idle,
Header {
send: ez::SendStream,
recv: ez::RecvStream,
offset: usize,
},
/// Streams taken, header partially written. Boxed because a stream pair is
/// several times larger than `Idle`, which every session clone carries.
Header(Box<OpenBiHeader>),
}

struct OpenBiHeader {
send: ez::SendStream,
recv: ez::RecvStream,
offset: usize,
}

impl Clone for OpenUni {
Expand Down Expand Up @@ -923,24 +927,26 @@ impl web_transport_trait::poll::Session for Connection {
match &mut self.open_bi {
OpenBi::Idle => {
let (send, recv) = ready!(self.conn.poll_open_bi(waiter))?;
self.open_bi = OpenBi::Header {
self.open_bi = OpenBi::Header(Box::new(OpenBiHeader {
send,
recv,
offset: 0,
};
}));
}
OpenBi::Header { send, offset, .. } => {
while *offset < self.header_bi.len() {
let size = ready!(send.poll_write(waiter, &self.header_bi[*offset..]))
.map_err(SessionError::Header)?;
*offset += size;
OpenBi::Header(header) => {
while header.offset < self.header_bi.len() {
let size = ready!(header
.send
.poll_write(waiter, &self.header_bi[header.offset..]))
.map_err(SessionError::Header)?;
header.offset += size;
}

let OpenBi::Header { send, recv, .. } =
std::mem::replace(&mut self.open_bi, OpenBi::Idle)
let OpenBi::Header(header) = std::mem::replace(&mut self.open_bi, OpenBi::Idle)
else {
unreachable!("checked above");
};
let OpenBiHeader { send, recv, .. } = *header;

return Poll::Ready(Ok((SendStream::new(send), RecvStream::new(recv))));
}
Expand Down
2 changes: 1 addition & 1 deletion rs/web-transport-quinn/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ qlog = ["quinn/qlog"]
bytes = "1"
futures = "0.3"
http = "1"
kio = "0.5.4"
kio = "0.6.2"

quinn = { version = "0.11", default-features = false, features = [
"platform-verifier",
Expand Down
Loading