diff --git a/Cargo.lock b/Cargo.lock index dbce3a185..759d2e9a7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -356,10 +356,10 @@ version = "0.8.1" dependencies = [ "futures-core", "prost", - "prost-build", "prost-types", "tonic", - "tonic-build 0.13.0", + "tonic-prost", + "tonic-prost-build", "tracing-core", ] @@ -873,7 +873,7 @@ dependencies = [ "http-body", "hyper", "pin-project-lite", - "socket2", + "socket2 0.5.7", "tokio", "tower-service", "tracing", @@ -1072,9 +1072,9 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "libc" -version = "0.2.161" +version = "0.2.176" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e9489c2807c139ffd9c1794f4af0ebe86a828db53ecdc7fea2111d0fed085d1" +checksum = "58f929b4d672ea937a23a1ab494143d968337a5f47e56d0815df1e0890ddf174" [[package]] name = "libredox" @@ -1403,9 +1403,9 @@ dependencies = [ [[package]] name = "prost" -version = "0.13.3" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b0487d90e047de87f984913713b85c601c05609aad5b0df4b4573fbf69aa13f" +checksum = "7231bd9b3d3d33c86b58adbac74b5ec0ad9f496b19d22801d773636feaa95f3d" dependencies = [ "bytes", "prost-derive", @@ -1413,11 +1413,10 @@ dependencies = [ [[package]] name = "prost-build" -version = "0.13.3" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c1318b19085f08681016926435853bbf7858f9c082d0999b80550ff5d9abe15" +checksum = "ac6c3320f9abac597dcbc668774ef006702672474aad53c6d596b62e487b40b1" dependencies = [ - "bytes", "heck", "itertools 0.13.0", "log", @@ -1434,9 +1433,9 @@ dependencies = [ [[package]] name = "prost-derive" -version = "0.13.3" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9552f850d5f0964a4e4d0bf306459ac29323ddfbae05e35a7c0d35cb0803cc5" +checksum = "9120690fafc389a67ba3803df527d0ec9cbbc9cc45e4cc20b332996dfb672425" dependencies = [ "anyhow", "itertools 0.13.0", @@ -1447,9 +1446,9 @@ dependencies = [ [[package]] name = "prost-types" -version = "0.13.3" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4759aa0d3a6232fb8dbdb97b61de2c20047c68aca932c7ed76da9d788508d670" +checksum = "b9b4db3d6da204ed77bb26ba83b6122a73aeb2e87e25fbf7ad2e84c4ccbf8f72" dependencies = [ "prost", ] @@ -1761,6 +1760,16 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "socket2" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "233504af464074f9d066d7b5416c5f9b894a5862a6506e306f7b816cdd6f1807" +dependencies = [ + "libc", + "windows-sys 0.59.0", +] + [[package]] name = "stability" version = "0.2.1" @@ -1824,9 +1833,9 @@ dependencies = [ [[package]] name = "sync_wrapper" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" +checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" [[package]] name = "synstructure" @@ -1915,7 +1924,7 @@ dependencies = [ "parking_lot", "pin-project-lite", "signal-hook-registry", - "socket2", + "socket2 0.5.7", "tokio-macros", "tracing", "windows-sys 0.52.0", @@ -1990,9 +1999,9 @@ dependencies = [ [[package]] name = "tokio-vsock" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1824fc0300433f400df6b6264a9ab00ba93f39d38c3157fb5f05183476c4af10" +checksum = "8b319ef9394889dab2e1b4f0085b45ba11d0c79dc9d1a9d1afc057d009d0f1c7" dependencies = [ "bytes", "futures", @@ -2035,9 +2044,9 @@ dependencies = [ [[package]] name = "tonic" -version = "0.13.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85839f0b32fd242bb3209262371d07feda6d780d16ee9d2bc88581b89da1549b" +checksum = "eb7613188ce9f7df5bfe185db26c5814347d110db17920415cf2fbcad85e7203" dependencies = [ "async-trait", "axum", @@ -2052,8 +2061,8 @@ dependencies = [ "hyper-util", "percent-encoding", "pin-project", - "prost", - "socket2", + "socket2 0.6.0", + "sync_wrapper", "tokio", "tokio-stream", "tower 0.5.2", @@ -2064,23 +2073,32 @@ dependencies = [ [[package]] name = "tonic-build" -version = "0.12.3" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9557ce109ea773b399c9b9e5dca39294110b74f1f342cb347a80d1fce8c26a11" +checksum = "4c40aaccc9f9eccf2cd82ebc111adc13030d23e887244bc9cfa5d1d636049de3" dependencies = [ "prettyplease", "proc-macro2", - "prost-build", - "prost-types", "quote", "syn", ] [[package]] -name = "tonic-build" -version = "0.13.0" +name = "tonic-prost" +version = "0.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "66bd50ad6ce1252d87ef024b3d64fe4c3cf54a86fb9ef4c631fdd0ded7aeaa67" +dependencies = [ + "bytes", + "prost", + "tonic", +] + +[[package]] +name = "tonic-prost-build" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d85f0383fadd15609306383a90e85eaed44169f931a5d2be1b42c76ceff1825e" +checksum = "b4a16cba4043dc3ff43fcb3f96b4c5c154c64cbd18ca8dce2ab2c6a451d058a2" dependencies = [ "prettyplease", "proc-macro2", @@ -2088,13 +2106,15 @@ dependencies = [ "prost-types", "quote", "syn", + "tempfile", + "tonic-build", ] [[package]] name = "tonic-web" -version = "0.13.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad8e4a5564e49598cbdefefb5b982c243b11009bdaf36ad59487c2253cb73379" +checksum = "75214f6b6bd28c19aa752ac09fdf0eea546095670906c21fe3940e180a4c43f2" dependencies = [ "base64 0.22.1", "bytes", @@ -2593,7 +2613,7 @@ dependencies = [ "clap", "color-eyre", "regex", - "tonic-build 0.12.3", + "tonic-prost-build", ] [[package]] diff --git a/console-api/Cargo.toml b/console-api/Cargo.toml index c4126b397..43e9f3534 100644 --- a/console-api/Cargo.toml +++ b/console-api/Cargo.toml @@ -29,22 +29,20 @@ keywords = [ transport = ["tonic/transport"] [dependencies] -tonic = { version = "0.13.0", default-features = false, features = [ - "prost", +tonic = { version = "0.14.2", default-features = false, features = [ "codegen", "transport", ] } -prost = "0.13.3" -prost-types = "0.13.3" +tonic-prost = "0.14.2" +prost = "0.14.1" +prost-types = "0.14.1" tracing-core = "0.1.30" futures-core = "0.3.31" [dev-dependencies] -tonic-build = { version = "0.13.0", default-features = false, features = [ - "prost", "transport" +tonic-prost-build = { version = "0.14.2", default-features = false, features = [ + "transport" ] } -# explicit dep so we can get the version with fixed whitespace. -prost-build = "0.13.1" [package.metadata.docs.rs] all-features = true diff --git a/console-api/src/common.rs b/console-api/src/common.rs index d367450ad..9fa862837 100644 --- a/console-api/src/common.rs +++ b/console-api/src/common.rs @@ -1,5 +1,4 @@ use std::fmt; -use std::hash::{Hash, Hasher}; pub use generated::*; @@ -206,22 +205,6 @@ impl From<&dyn std::fmt::Debug> for field::Value { } } -// Clippy warns when a type derives `PartialEq` but has a manual `Hash` impl, -// or vice versa. However, this is unavoidable here, because `prost` generates -// a struct with `#[derive(PartialEq)]`, but we cannot add`#[derive(Hash)]` to the -// generated code. -#[allow(clippy::derived_hash_with_manual_eq)] -impl Hash for field::Name { - fn hash(&self, state: &mut H) { - match self { - field::Name::NameIdx(idx) => idx.hash(state), - field::Name::StrName(s) => s.hash(state), - } - } -} - -impl Eq for field::Name {} - // === IDs === impl From for Id { diff --git a/console-api/src/generated/rs.tokio.console.async_ops.rs b/console-api/src/generated/rs.tokio.console.async_ops.rs index 93cff96f9..875cffa98 100644 --- a/console-api/src/generated/rs.tokio.console.async_ops.rs +++ b/console-api/src/generated/rs.tokio.console.async_ops.rs @@ -32,7 +32,7 @@ pub struct AsyncOpUpdate { /// An async operation is an operation that is associated with a resource /// This could, for example, be a read or write on a TCP stream, or a receive operation on /// a channel. -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct AsyncOp { /// The async op's ID. /// diff --git a/console-api/src/generated/rs.tokio.console.common.rs b/console-api/src/generated/rs.tokio.console.common.rs index 5da884e61..698e37181 100644 --- a/console-api/src/generated/rs.tokio.console.common.rs +++ b/console-api/src/generated/rs.tokio.console.common.rs @@ -1,13 +1,13 @@ // This file is @generated by prost-build. /// Unique identifier for each task. -#[derive(Clone, Copy, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct Id { /// The unique identifier's concrete value. #[prost(uint64, tag = "1")] pub id: u64, } /// A Rust source code location. -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct Location { /// The file path #[prost(string, optional, tag = "1")] @@ -23,21 +23,21 @@ pub struct Location { pub column: ::core::option::Option, } /// Unique identifier for metadata. -#[derive(Clone, Copy, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct MetaId { /// The unique identifier's concrete value. #[prost(uint64, tag = "1")] pub id: u64, } /// Unique identifier for spans. -#[derive(Clone, Copy, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct SpanId { /// The unique identifier's concrete value. #[prost(uint64, tag = "1")] pub id: u64, } /// A message representing a key-value pair of data associated with a `Span` -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct Field { /// Metadata for the task span that the field came from. #[prost(message, optional, tag = "8")] @@ -58,7 +58,7 @@ pub mod field { /// /// This is either represented as a string, or as an index into a `Metadata`'s /// array of field name strings. - #[derive(Clone, PartialEq, ::prost::Oneof)] + #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)] pub enum Name { /// The string representation of the name. #[prost(string, tag = "1")] @@ -69,7 +69,7 @@ pub mod field { NameIdx(u64), } /// The value of the key-value pair. - #[derive(Clone, PartialEq, ::prost::Oneof)] + #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)] pub enum Value { /// A value serialized to a string using `fmt::Debug`. #[prost(string, tag = "3")] @@ -118,7 +118,7 @@ pub struct RegisterMetadata { /// Nested message and enum types in `RegisterMetadata`. pub mod register_metadata { /// One metadata element registered since the last update. - #[derive(Clone, PartialEq, ::prost::Message)] + #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct NewMetadata { /// Unique identifier for `metadata`. #[prost(message, optional, tag = "1")] @@ -129,7 +129,7 @@ pub mod register_metadata { } } /// Metadata associated with a span or event. -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct Metadata { /// The name of the span or event. #[prost(string, tag = "1")] @@ -262,7 +262,7 @@ pub mod metadata { /// Contains stats about objects that can be polled. Currently these can be: /// - tasks that have been spawned /// - async operations on resources that are performed within the context of a task -#[derive(Clone, Copy, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct PollStats { /// The total number of times this object has been polled. #[prost(uint64, tag = "1")] @@ -310,7 +310,7 @@ pub struct PollStats { /// indicating how many permits they are trying to acquire vs how many are acquired. /// These values may change over time. Therefore, they live in the runtime stats rather /// than the static data describing the entity. -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct Attribute { /// The key-value pair for the attribute #[prost(message, optional, tag = "1")] diff --git a/console-api/src/generated/rs.tokio.console.instrument.rs b/console-api/src/generated/rs.tokio.console.instrument.rs index 85deb0ed6..0cef186ea 100644 --- a/console-api/src/generated/rs.tokio.console.instrument.rs +++ b/console-api/src/generated/rs.tokio.console.instrument.rs @@ -5,21 +5,21 @@ /// TODO: In the future allow for the request to specify /// only the data that the caller cares about (i.e. only /// tasks but no resources) -#[derive(Clone, Copy, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct InstrumentRequest {} /// TaskDetailsRequest requests the stream of updates about /// the specific task identified in the request. -#[derive(Clone, Copy, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct TaskDetailsRequest { /// Identifies the task for which details were requested. #[prost(message, optional, tag = "1")] pub id: ::core::option::Option, } /// PauseRequest requests the stream of updates to pause. -#[derive(Clone, Copy, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct PauseRequest {} /// ResumeRequest requests the stream of updates to resume after a pause. -#[derive(Clone, Copy, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct ResumeRequest {} /// Update carries all information regarding tasks, resources, async operations /// and resource operations in one message. There are a couple of reasons to combine all @@ -51,19 +51,19 @@ pub struct Update { pub new_metadata: ::core::option::Option, } /// StateRequest requests the current state of the aggregator. -#[derive(Clone, Copy, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct StateRequest {} /// State carries the current state of the aggregator. -#[derive(Clone, Copy, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct State { #[prost(enumeration = "Temporality", tag = "1")] pub temporality: i32, } /// `PauseResponse` is the value returned after a pause request. -#[derive(Clone, Copy, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct PauseResponse {} /// `ResumeResponse` is the value returned after a resume request. -#[derive(Clone, Copy, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct ResumeResponse {} /// The time "state" of the aggregator. #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] @@ -202,7 +202,7 @@ pub mod instrument_client { format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rs.tokio.console.instrument.Instrument/WatchUpdates", ); @@ -232,7 +232,7 @@ pub mod instrument_client { format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rs.tokio.console.instrument.Instrument/WatchTaskDetails", ); @@ -262,7 +262,7 @@ pub mod instrument_client { format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rs.tokio.console.instrument.Instrument/WatchState", ); @@ -289,7 +289,7 @@ pub mod instrument_client { format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rs.tokio.console.instrument.Instrument/Pause", ); @@ -313,7 +313,7 @@ pub mod instrument_client { format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rs.tokio.console.instrument.Instrument/Resume", ); @@ -500,7 +500,7 @@ pub mod instrument_server { let inner = self.inner.clone(); let fut = async move { let method = WatchUpdatesSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, @@ -546,7 +546,7 @@ pub mod instrument_server { let inner = self.inner.clone(); let fut = async move { let method = WatchTaskDetailsSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, @@ -592,7 +592,7 @@ pub mod instrument_server { let inner = self.inner.clone(); let fut = async move { let method = WatchStateSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, @@ -635,7 +635,7 @@ pub mod instrument_server { let inner = self.inner.clone(); let fut = async move { let method = PauseSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, @@ -678,7 +678,7 @@ pub mod instrument_server { let inner = self.inner.clone(); let fut = async move { let method = ResumeSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, diff --git a/console-api/src/generated/rs.tokio.console.resources.rs b/console-api/src/generated/rs.tokio.console.resources.rs index 9794a621e..8292d5487 100644 --- a/console-api/src/generated/rs.tokio.console.resources.rs +++ b/console-api/src/generated/rs.tokio.console.resources.rs @@ -32,7 +32,7 @@ pub struct ResourceUpdate { pub dropped_events: u64, } /// Static data recorded when a new resource is created. -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct Resource { /// The resources's ID. /// @@ -66,7 +66,7 @@ pub struct Resource { /// Nested message and enum types in `Resource`. pub mod resource { /// The kind of resource (e.g. timer, mutex). - #[derive(Clone, PartialEq, ::prost::Message)] + #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct Kind { /// Every resource is either a known kind or an other (unknown) kind. #[prost(oneof = "kind::Kind", tags = "1, 2")] @@ -110,7 +110,7 @@ pub mod resource { } } /// Every resource is either a known kind or an other (unknown) kind. - #[derive(Clone, PartialEq, ::prost::Oneof)] + #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)] pub enum Kind { /// `known` signals that this kind of resource is known to the console API. #[prost(enumeration = "Known", tag = "1")] @@ -140,7 +140,7 @@ pub struct Stats { } /// A `PollOp` describes each poll operation that completes within the async /// application. -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct PollOp { /// The numeric ID of the op's `Metadata`. /// diff --git a/console-api/src/generated/rs.tokio.console.tasks.rs b/console-api/src/generated/rs.tokio.console.tasks.rs index f9f31df84..6b3c13a6b 100644 --- a/console-api/src/generated/rs.tokio.console.tasks.rs +++ b/console-api/src/generated/rs.tokio.console.tasks.rs @@ -36,7 +36,7 @@ pub struct TaskUpdate { pub dropped_events: u64, } /// A task details update -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct TaskDetails { /// The task's ID which the details belong to. #[prost(message, optional, tag = "1")] @@ -67,7 +67,7 @@ pub mod task_details { /// - the raw binary representation of a HdrHistogram.rs `Histogram` /// serialized to binary in the V2 format (legacy) /// - a binary histogram plus details on outliers (current) - #[derive(Clone, PartialEq, ::prost::Oneof)] + #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)] pub enum PollTimesHistogram { /// HdrHistogram.rs `Histogram` serialized to binary in the V2 format #[prost(bytes, tag = "3")] @@ -164,7 +164,7 @@ pub mod task { } } /// Task performance statistics. -#[derive(Clone, Copy, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct Stats { /// Timestamp of when the task was spawned. #[prost(message, optional, tag = "1")] @@ -204,7 +204,7 @@ pub struct Stats { #[prost(message, optional, tag = "9")] pub scheduled_time: ::core::option::Option<::prost_types::Duration>, } -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct DurationHistogram { /// HdrHistogram.rs `Histogram` serialized to binary in the V2 format #[prost(bytes = "vec", tag = "1")] diff --git a/console-api/src/generated/rs.tokio.console.trace.rs b/console-api/src/generated/rs.tokio.console.trace.rs index b6790947c..bdb53193b 100644 --- a/console-api/src/generated/rs.tokio.console.trace.rs +++ b/console-api/src/generated/rs.tokio.console.trace.rs @@ -1,6 +1,6 @@ // This file is @generated by prost-build. /// Start watching trace events with the provided filter. -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct WatchRequest { /// Specifies which trace events should be streamed. #[prost(string, tag = "1")] @@ -23,7 +23,7 @@ pub mod trace_event { pub names: ::std::collections::HashMap, } /// `Enter` signals that a span was entered. - #[derive(Clone, Copy, PartialEq, ::prost::Message)] + #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct Enter { /// `span_id` identifies the span that was entered. #[prost(message, optional, tag = "1")] @@ -36,7 +36,7 @@ pub mod trace_event { pub at: ::core::option::Option<::prost_types::Timestamp>, } /// `Exit` signals that a span was exited. - #[derive(Clone, Copy, PartialEq, ::prost::Message)] + #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct Exit { /// `span_id` identifies the span that was exited. #[prost(message, optional, tag = "1")] @@ -49,7 +49,7 @@ pub mod trace_event { pub at: ::core::option::Option<::prost_types::Timestamp>, } /// `Close` signals that a span was closed. - #[derive(Clone, Copy, PartialEq, ::prost::Message)] + #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct Close { /// `span_id` identifies the span that was closed. #[prost(message, optional, tag = "1")] @@ -189,7 +189,7 @@ pub mod trace_client { format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/rs.tokio.console.trace.Trace/Watch", ); @@ -333,7 +333,7 @@ pub mod trace_server { let inner = self.inner.clone(); let fut = async move { let method = WatchSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, diff --git a/console-api/tests/bootstrap.rs b/console-api/tests/bootstrap.rs index 7e3ce0f26..8802714b3 100644 --- a/console-api/tests/bootstrap.rs +++ b/console-api/tests/bootstrap.rs @@ -31,7 +31,7 @@ fn bootstrap() { let out_dir = root_dir.join("src").join("generated"); - if let Err(error) = tonic_build::configure() + if let Err(error) = tonic_prost_build::configure() .build_client(true) .build_server(true) .emit_rerun_if_changed(false) diff --git a/console-subscriber/Cargo.toml b/console-subscriber/Cargo.toml index 0bfd9caed..e715434f3 100644 --- a/console-subscriber/Cargo.toml +++ b/console-subscriber/Cargo.toml @@ -37,7 +37,7 @@ tokio = { version = "1.34", features = ["sync", "time", "macros", "tracing"] } tokio-stream = { version = "0.1.16", features = ["net"] } thread_local = "1.1.4" console-api = { version = "0.8.0", path = "../console-api", features = ["transport"] } -tonic = { version = "0.13.0", features = ["transport"] } +tonic = { version = "0.14.2", features = ["transport"] } tracing-core = "0.1.30" tracing = "0.1.35" tracing-subscriber = { version = "0.3.17", default-features = false, features = ["fmt", "registry"] } @@ -45,8 +45,8 @@ futures-task = { version = "0.3.31", default-features = false } hdrhistogram = { version = "7.4.0", default-features = false, features = ["serialization"] } parking_lot = { version = "0.12.1", optional = true } humantime = "2.1.0" -prost = "0.13.3" -prost-types = "0.13.3" +prost = "0.14.1" +prost-types = "0.14.1" hyper-util = { version = "0.1.6", features = ["tokio"] } # Required for recording: @@ -55,7 +55,7 @@ serde_json = "1" crossbeam-channel = "0.5" # Only for the vsock feature: -tokio-vsock = { version = "0.7.1", optional = true, features = ["tonic013"]} +tokio-vsock = { version = "0.7.2", optional = true, features = ["tonic014"]} [dev-dependencies] tokio = { version = "1.34", features = ["full", "rt-multi-thread"] } @@ -63,7 +63,7 @@ tower = { version = "0.4.12", default-features = false, features = ["util"] } futures = "0.3" http = "1.1" tower-http = { version = "0.5", features = ["cors"] } -tonic-web = "0.13" +tonic-web = "0.14.2" [lints.rust.unexpected_cfgs] level = "warn" diff --git a/tokio-console/Cargo.toml b/tokio-console/Cargo.toml index 482c90dc2..5b38889bf 100644 --- a/tokio-console/Cargo.toml +++ b/tokio-console/Cargo.toml @@ -37,14 +37,14 @@ console-api = { version = "0.8.1", path = "../console-api", features = ["transpo clap = { version = "~4.5.4", features = ["wrap_help", "cargo", "derive", "env"] } clap_complete = "~4.5.2" tokio = { version = "1.34", features = ["full", "rt-multi-thread"] } -tonic = { version = "0.13.0", features = ["transport"] } +tonic = { version = "0.14.2", features = ["transport"] } futures = "0.3" ratatui = { version = "0.26.2", default-features = false, features = ["crossterm"] } tower = { version = "0.4.12", features = ["util"] } tracing = "0.1.35" tracing-subscriber = { version = "0.3.17" } tracing-journald = { version = "0.2", optional = true } -prost-types = "0.13.3" +prost-types = "0.14.1" crossterm = { version = "0.27.0", features = ["event-stream"] } color-eyre = { version = "0.6", features = ["issue-url"] } hdrhistogram = { version = "7.4.0", default-features = false, features = ["serialization"] } @@ -60,7 +60,7 @@ serde = { version = "1.0.145", features = ["derive"] } toml = "0.5" dirs = "5" hyper-util = { version = "0.1.6", features = ["tokio"] } -tokio-vsock = { version = "0.7.1", features = ["tonic013"], optional = true } +tokio-vsock = { version = "0.7.2", features = ["tonic014"], optional = true } [features] # Enable support for VSOCK address family, used in VMs diff --git a/xtask/Cargo.toml b/xtask/Cargo.toml index e66bec883..b99e41bde 100644 --- a/xtask/Cargo.toml +++ b/xtask/Cargo.toml @@ -7,8 +7,8 @@ rust-version = "1.74.0" publish = false [dependencies] -tonic-build = { version = "0.12.3", default-features = false, features = [ - "prost", "transport" +tonic-prost-build = { version = "0.14.2", default-features = false, features = [ + "transport" ] } clap = { version = "~4.5.4", features = ["derive"] } color-eyre = "0.6" diff --git a/xtask/src/main.rs b/xtask/src/main.rs index b074c550f..864390add 100644 --- a/xtask/src/main.rs +++ b/xtask/src/main.rs @@ -80,7 +80,7 @@ fn gen_proto() -> Result<()> { let out_dir = api_dir.join("src").join("generated"); - tonic_build::configure() + tonic_prost_build::configure() .build_client(true) .build_server(true) .emit_rerun_if_changed(false)