Skip to content

Commit

Permalink
(chore): bump tonic and prost dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
MarinPostma committed Sep 15, 2023
1 parent bc81b8a commit 1017c04
Show file tree
Hide file tree
Showing 11 changed files with 159 additions and 112 deletions.
181 changes: 112 additions & 69 deletions Cargo.lock

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions console-api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,23 +29,23 @@ keywords = [
transport = ["tonic/transport"]

[dependencies]
tonic = { version = "0.9", default-features = false, features = [
tonic = { version = "0.10", default-features = false, features = [
"prost",
"codegen",
"transport",
] }
prost = "0.11"
prost-types = "0.11"
prost = "0.12"
prost-types = "0.12"
tracing-core = "0.1.17"
futures-core = "0.3"

[dev-dependencies]
tonic-build = { version = "0.9", default-features = false, features = [
tonic-build = { version = "0.10", default-features = false, features = [
"prost", "transport"
] }
# explicit dep so we can get the version with fixed whitespace.
prost-build = "0.11.1"
prost-build = "0.12.0"

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]
rustdoc-args = ["--cfg", "docsrs"]
2 changes: 1 addition & 1 deletion console-api/src/generated/rs.tokio.console.async_ops.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/// An `AsyncOp` state update.
/// An `AsyncOp` state update.
///
/// This includes a list of any new async ops, and updates to the associated statistics
/// for any async ops that have changed since the last update.
Expand Down
4 changes: 2 additions & 2 deletions console-api/src/generated/rs.tokio.console.common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ pub struct Field {
pub metadata_id: ::core::option::Option<MetaId>,
/// The key of the key-value pair.
///
/// This is either represented as a string, or as an index into a `Metadata`'s
/// This is either represented as a string, or as an index into a `Metadata`'s
/// array of field name strings.
#[prost(oneof = "field::Name", tags = "1, 2")]
pub name: ::core::option::Option<field::Name>,
Expand All @@ -60,7 +60,7 @@ pub struct Field {
pub mod field {
/// The key of the key-value pair.
///
/// This is either represented as a string, or as an index into a `Metadata`'s
/// This is either represented as a string, or as an index into a `Metadata`'s
/// array of field name strings.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
Expand Down
42 changes: 22 additions & 20 deletions console-api/src/generated/rs.tokio.console.instrument.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,9 @@ pub mod instrument_client {
&mut self,
request: impl tonic::IntoRequest<super::InstrumentRequest>,
) -> std::result::Result<
tonic::Response<tonic::codec::Streaming<super::Update>>,
tonic::Status,
> {
tonic::Response<tonic::codec::Streaming<super::Update>>,
tonic::Status,
> {
self.inner
.ready()
.await
Expand Down Expand Up @@ -184,11 +184,9 @@ pub mod instrument_client {
&mut self,
request: impl tonic::IntoRequest<super::TaskDetailsRequest>,
) -> std::result::Result<
tonic::Response<
tonic::codec::Streaming<super::super::tasks::TaskDetails>,
>,
tonic::Status,
> {
tonic::Response<tonic::codec::Streaming<super::super::tasks::TaskDetails>>,
tonic::Status,
> {
self.inner
.ready()
.await
Expand Down Expand Up @@ -272,7 +270,7 @@ pub mod instrument_server {
#[async_trait]
pub trait Instrument: Send + Sync + 'static {
/// Server streaming response type for the WatchUpdates method.
type WatchUpdatesStream: futures_core::Stream<
type WatchUpdatesStream: tonic::codegen::tokio_stream::Stream<
Item = std::result::Result<super::Update, tonic::Status>,
>
+ Send
Expand All @@ -282,11 +280,11 @@ pub mod instrument_server {
&self,
request: tonic::Request<super::InstrumentRequest>,
) -> std::result::Result<
tonic::Response<Self::WatchUpdatesStream>,
tonic::Status,
>;
tonic::Response<Self::WatchUpdatesStream>,
tonic::Status,
>;
/// Server streaming response type for the WatchTaskDetails method.
type WatchTaskDetailsStream: futures_core::Stream<
type WatchTaskDetailsStream: tonic::codegen::tokio_stream::Stream<
Item = std::result::Result<
super::super::tasks::TaskDetails,
tonic::Status,
Expand All @@ -299,9 +297,9 @@ pub mod instrument_server {
&self,
request: tonic::Request<super::TaskDetailsRequest>,
) -> std::result::Result<
tonic::Response<Self::WatchTaskDetailsStream>,
tonic::Status,
>;
tonic::Response<Self::WatchTaskDetailsStream>,
tonic::Status,
>;
/// Registers that the console observer wants to pause the stream.
async fn pause(
&self,
Expand Down Expand Up @@ -412,7 +410,7 @@ pub mod instrument_server {
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
(*inner).watch_updates(request).await
<T as Instrument>::watch_updates(&inner, request).await
};
Box::pin(fut)
}
Expand Down Expand Up @@ -459,7 +457,7 @@ pub mod instrument_server {
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
(*inner).watch_task_details(request).await
<T as Instrument>::watch_task_details(&inner, request).await
};
Box::pin(fut)
}
Expand Down Expand Up @@ -502,7 +500,9 @@ pub mod instrument_server {
request: tonic::Request<super::PauseRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move { (*inner).pause(request).await };
let fut = async move {
<T as Instrument>::pause(&inner, request).await
};
Box::pin(fut)
}
}
Expand Down Expand Up @@ -544,7 +544,9 @@ pub mod instrument_server {
request: tonic::Request<super::ResumeRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move { (*inner).resume(request).await };
let fut = async move {
<T as Instrument>::resume(&inner, request).await
};
Box::pin(fut)
}
}
Expand Down
2 changes: 1 addition & 1 deletion console-api/src/generated/rs.tokio.console.resources.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ pub struct Resource {
pub parent_resource_id: ::core::option::Option<super::common::Id>,
/// Is the resource an internal component of another resource?
///
/// For example, a `tokio::time::Interval` resource might contain a
/// For example, a `tokio::time::Interval` resource might contain a
/// `tokio::time::Sleep` resource internally.
#[prost(bool, tag = "7")]
pub is_internal: bool,
Expand Down
2 changes: 1 addition & 1 deletion console-api/src/generated/rs.tokio.console.tasks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ pub struct Stats {
/// reflect any scheduled state where the task hasn't yet been polled.
/// Subtracting both `busy_time` (from the task's `PollStats`) and
/// `scheduled_time` from the total lifetime of the task results in the
/// amount of time it spent unable to progress because it was waiting on
/// amount of time it spent unable to progress because it was waiting on
/// some resource.
#[prost(message, optional, tag = "9")]
pub scheduled_time: ::core::option::Option<::prost_types::Duration>,
Expand Down
12 changes: 7 additions & 5 deletions console-api/src/generated/rs.tokio.console.trace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,9 @@ pub mod trace_client {
&mut self,
request: impl tonic::IntoRequest<super::WatchRequest>,
) -> std::result::Result<
tonic::Response<tonic::codec::Streaming<super::TraceEvent>>,
tonic::Status,
> {
tonic::Response<tonic::codec::Streaming<super::TraceEvent>>,
tonic::Status,
> {
self.inner
.ready()
.await
Expand Down Expand Up @@ -209,7 +209,7 @@ pub mod trace_server {
#[async_trait]
pub trait Trace: Send + Sync + 'static {
/// Server streaming response type for the Watch method.
type WatchStream: futures_core::Stream<
type WatchStream: tonic::codegen::tokio_stream::Stream<
Item = std::result::Result<super::TraceEvent, tonic::Status>,
>
+ Send
Expand Down Expand Up @@ -318,7 +318,9 @@ pub mod trace_server {
request: tonic::Request<super::WatchRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move { (*inner).watch(request).await };
let fut = async move {
<T as Trace>::watch(&inner, request).await
};
Box::pin(fut)
}
}
Expand Down
6 changes: 3 additions & 3 deletions console-subscriber/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,17 @@ tokio = { version = "^1.21", features = ["sync", "time", "macros", "tracing"] }
tokio-stream = { version = "0.1", features = ["net"] }
thread_local = "1.1.3"
console-api = { version = "0.5.0", path = "../console-api", features = ["transport"] }
tonic = { version = "0.9", features = ["transport"] }
tonic = { version = "0.10", features = ["transport"] }
tracing-core = "0.1.24"
tracing = "0.1.26"
tracing-subscriber = { version = "0.3.11", default-features = false, features = ["fmt", "registry"] }
tracing-subscriber = { version = "0.3.17", default-features = false, features = ["fmt", "registry"] }
futures-task = { version = "0.3", default-features = false }
hdrhistogram = { version = "7.3.0", default-features = false, features = ["serialization"] }
# The parking_lot dependency is renamed, because we want our `parking_lot`
# feature to also enable `tracing-subscriber`'s parking_lot feature flag.
parking_lot_crate = { package = "parking_lot", version = "0.12", optional = true }
humantime = "2.1.0"
prost-types = "0.11.0"
prost-types = "0.12.0"

# Required for recording:
serde = { version = "1", features = ["derive"] }
Expand Down
4 changes: 2 additions & 2 deletions tokio-console/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@ atty = "0.2"
console-api = { version = "0.5.0", path = "../console-api", features = ["transport"] }
clap = { version = "3", features = ["cargo", "derive", "env"] }
tokio = { version = "1", features = ["full", "rt-multi-thread"] }
tonic = { version = "0.9", features = ["transport"] }
tonic = { version = "0.10", features = ["transport"] }
futures = "0.3"
ratatui = { version = "0.20.1", default-features = false, features = ["crossterm"] }
tower = "0.4.12"
tracing = "0.1"
tracing-subscriber = { version = "0.3.0", features = ["env-filter"] }
tracing-journald = { version = "0.2", optional = true }
prost-types = "0.11"
prost-types = "0.12"
crossterm = { version = "0.26.1", features = ["event-stream"] }
color-eyre = { version = "0.6", features = ["issue-url"] }
hdrhistogram = { version = "7.3.0", default-features = false, features = ["serialization"] }
Expand Down
4 changes: 2 additions & 2 deletions xtask/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ rust-version = "1.60.0"
publish = false

[dependencies]
tonic-build = { version = "0.9", default-features = false, features = [
tonic-build = { version = "0.10", default-features = false, features = [
"prost", "transport"
] }
clap = { version = "3", features = ["derive"] }
color-eyre = "0.6"
color-eyre = "0.6"

0 comments on commit 1017c04

Please sign in to comment.