Skip to content

Commit

Permalink
chore: Bump qlog to 0.13 and deal with the fallout (#1827)
Browse files Browse the repository at this point in the history
* chore: Bump qlog to 0.13 and deal with the fallout

Fixes #1826

* Update qlog.rs

Co-authored-by: Max Inden <mail@max-inden.de>
Signed-off-by: Lars Eggert <lars@eggert.org>

* Make `log` and `qlog` workspace dependencies

---------

Signed-off-by: Lars Eggert <lars@eggert.org>
Co-authored-by: Max Inden <mail@max-inden.de>
  • Loading branch information
larseggert and mxinden committed Apr 16, 2024
1 parent 670237d commit 3e53709
Show file tree
Hide file tree
Showing 9 changed files with 31 additions and 17 deletions.
4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ license = "MIT OR Apache-2.0"
# https://firefox-source-docs.mozilla.org/writing-rust-code/update-policy.html#schedule
rust-version = "1.74.0"

[workspace.dependencies]
log = { version = "0.4", default-features = false }
qlog = { version = "0.13", default-features = false }

[workspace.lints.clippy]
pedantic = { level = "warn", priority = -1 }

Expand Down
4 changes: 2 additions & 2 deletions neqo-bin/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ clap = { version = "4.4", default-features = false, features = ["std", "color",
clap-verbosity-flag = { version = "2.2", default-features = false }
futures = { version = "0.3", default-features = false, features = ["alloc"] }
hex = { version = "0.4", default-features = false, features = ["std"] }
log = { version = "0.4", default-features = false }
log = { workspace = true }
neqo-common = { path = "./../neqo-common" }
neqo-crypto = { path = "./../neqo-crypto" }
neqo-http3 = { path = "./../neqo-http3" }
neqo-qpack = { path = "./../neqo-qpack" }
neqo-transport = { path = "./../neqo-transport" }
qlog = { version = "0.12", default-features = false }
qlog = { workspace = true }
quinn-udp = { git = "https://github.com/quinn-rs/quinn/", rev = "a947962131aba8a6521253d03cc948b20098a2d6" }
regex = { version = "1.9", default-features = false, features = ["unicode-perl"] }
tokio = { version = "1", default-features = false, features = ["net", "time", "macros", "rt", "rt-multi-thread"] }
Expand Down
4 changes: 2 additions & 2 deletions neqo-common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ workspace = true
# Sync with https://searchfox.org/mozilla-central/source/Cargo.lock 2024-02-08
enum-map = { version = "2.7", default-features = false }
env_logger = { version = "0.10", default-features = false }
log = { version = "0.4", default-features = false }
qlog = { version = "0.12", default-features = false }
log = { workspace = true }
qlog = { workspace = true }
time = { version = "0.3", default-features = false, features = ["formatting"] }

[dev-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion neqo-crypto/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ workspace = true

[dependencies]
# Sync with https://searchfox.org/mozilla-central/source/Cargo.lock 2024-02-08
log = { version = "0.4", default-features = false }
log = { workspace = true }
neqo-common = { path = "../neqo-common" }

[build-dependencies]
Expand Down
4 changes: 2 additions & 2 deletions neqo-http3/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ workspace = true
[dependencies]
# Sync with https://searchfox.org/mozilla-central/source/Cargo.lock 2024-02-08
enumset = { version = "1.1", default-features = false }
log = { version = "0.4", default-features = false }
log = { workspace = true }
neqo-common = { path = "./../neqo-common" }
neqo-crypto = { path = "./../neqo-crypto" }
neqo-qpack = { path = "./../neqo-qpack" }
neqo-transport = { path = "./../neqo-transport" }
qlog = { version = "0.12", default-features = false }
qlog = { workspace = true }
sfv = { version = "0.9", default-features = false }
smallvec = { version = "1.11", default-features = false }
url = { version = "2.5", default-features = false }
Expand Down
4 changes: 2 additions & 2 deletions neqo-qpack/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ workspace = true

[dependencies]
# Sync with https://searchfox.org/mozilla-central/source/Cargo.lock 2024-02-08
log = { version = "0.4", default-features = false }
log = { workspace = true }
neqo-common = { path = "./../neqo-common" }
neqo-crypto = { path = "./../neqo-crypto" }
neqo-transport = { path = "./../neqo-transport" }
qlog = { version = "0.12", default-features = false }
qlog = { workspace = true }
static_assertions = { version = "1.1", default-features = false }

[dev-dependencies]
Expand Down
4 changes: 2 additions & 2 deletions neqo-transport/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ workspace = true
# Sync with https://searchfox.org/mozilla-central/source/Cargo.lock 2024-02-08
enum-map = { version = "2.7", default-features = false }
indexmap = { version = "1.9", default-features = false }
log = { version = "0.4", default-features = false }
log = { workspace = true }
neqo-common = { path = "../neqo-common" }
neqo-crypto = { path = "../neqo-crypto" }
qlog = { version = "0.12", default-features = false }
qlog = { workspace = true }
smallvec = { version = "1.11", default-features = false }

[dev-dependencies]
Expand Down
18 changes: 14 additions & 4 deletions neqo-transport/src/qlog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -390,10 +390,14 @@ pub fn metrics_updated(qlog: &mut NeqoQlog, updated_metrics: &[QlogMetric]) {
impl From<&Frame<'_>> for QuicFrame {
fn from(frame: &Frame) -> Self {
match frame {
// TODO: Add payload length to `QuicFrame::Padding` once
// https://github.com/cloudflare/quiche/pull/1745 is available via the qlog crate.
Frame::Padding { .. } => QuicFrame::Padding,
Frame::Ping => QuicFrame::Ping,
Frame::Padding(len) => QuicFrame::Padding {
length: None,
payload_length: u32::from(*len),
},
Frame::Ping => QuicFrame::Ping {
length: None,
payload_length: None,
},
Frame::Ack {
largest_acknowledged,
ack_delay,
Expand All @@ -419,6 +423,8 @@ impl From<&Frame<'_>> for QuicFrame {
ect1: ecn_count.map(|c| c[IpTosEcn::Ect1]),
ect0: ecn_count.map(|c| c[IpTosEcn::Ect0]),
ce: ecn_count.map(|c| c[IpTosEcn::Ce]),
length: None,
payload_length: None,
}
}
Frame::ResetStream {
Expand All @@ -429,13 +435,17 @@ impl From<&Frame<'_>> for QuicFrame {
stream_id: stream_id.as_u64(),
error_code: *application_error_code,
final_size: *final_size,
length: None,
payload_length: None,
},
Frame::StopSending {
stream_id,
application_error_code,
} => QuicFrame::StopSending {
stream_id: stream_id.as_u64(),
error_code: *application_error_code,
length: None,
payload_length: None,
},
Frame::Crypto { offset, data } => QuicFrame::Crypto {
offset: *offset,
Expand Down
4 changes: 2 additions & 2 deletions test-fixture/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ workspace = true

[dependencies]
# Sync with https://searchfox.org/mozilla-central/source/Cargo.lock 2024-02-08
log = { version = "0.4", default-features = false }
log = { workspace = true }
neqo-common = { path = "../neqo-common" }
neqo-crypto = { path = "../neqo-crypto" }
neqo-http3 = { path = "../neqo-http3" }
neqo-qpack = { path = "../neqo-qpack" }
neqo-transport = { path = "../neqo-transport" }
qlog = { version = "0.12", default-features = false }
qlog = { workspace = true }

[features]
bench = []
Expand Down

0 comments on commit 3e53709

Please sign in to comment.