Skip to content

Commit dca4748

Browse files
authored
Bump tonic to 0.14 (#642)
Also bumps prost to 0.14 as well
1 parent d3848d7 commit dca4748

14 files changed

+115
-114
lines changed

Cargo.lock

Lines changed: 53 additions & 33 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

console-api/Cargo.toml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,22 +29,20 @@ keywords = [
2929
transport = ["tonic/transport"]
3030

3131
[dependencies]
32-
tonic = { version = "0.13.0", default-features = false, features = [
33-
"prost",
32+
tonic = { version = "0.14.2", default-features = false, features = [
3433
"codegen",
3534
"transport",
3635
] }
37-
prost = "0.13.3"
38-
prost-types = "0.13.3"
36+
tonic-prost = "0.14.2"
37+
prost = "0.14.1"
38+
prost-types = "0.14.1"
3939
tracing-core = "0.1.30"
4040
futures-core = "0.3.31"
4141

4242
[dev-dependencies]
43-
tonic-build = { version = "0.13.0", default-features = false, features = [
44-
"prost", "transport"
43+
tonic-prost-build = { version = "0.14.2", default-features = false, features = [
44+
"transport"
4545
] }
46-
# explicit dep so we can get the version with fixed whitespace.
47-
prost-build = "0.13.1"
4846

4947
[package.metadata.docs.rs]
5048
all-features = true

console-api/src/common.rs

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
use std::fmt;
2-
use std::hash::{Hash, Hasher};
32

43
pub use generated::*;
54

@@ -206,22 +205,6 @@ impl From<&dyn std::fmt::Debug> for field::Value {
206205
}
207206
}
208207

209-
// Clippy warns when a type derives `PartialEq` but has a manual `Hash` impl,
210-
// or vice versa. However, this is unavoidable here, because `prost` generates
211-
// a struct with `#[derive(PartialEq)]`, but we cannot add`#[derive(Hash)]` to the
212-
// generated code.
213-
#[allow(clippy::derived_hash_with_manual_eq)]
214-
impl Hash for field::Name {
215-
fn hash<H: Hasher>(&self, state: &mut H) {
216-
match self {
217-
field::Name::NameIdx(idx) => idx.hash(state),
218-
field::Name::StrName(s) => s.hash(state),
219-
}
220-
}
221-
}
222-
223-
impl Eq for field::Name {}
224-
225208
// === IDs ===
226209

227210
impl From<u64> for Id {

console-api/src/generated/rs.tokio.console.async_ops.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ pub struct AsyncOpUpdate {
3232
/// An async operation is an operation that is associated with a resource
3333
/// This could, for example, be a read or write on a TCP stream, or a receive operation on
3434
/// a channel.
35-
#[derive(Clone, PartialEq, ::prost::Message)]
35+
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
3636
pub struct AsyncOp {
3737
/// The async op's ID.
3838
///

console-api/src/generated/rs.tokio.console.common.rs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
// This file is @generated by prost-build.
22
/// Unique identifier for each task.
3-
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
3+
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
44
pub struct Id {
55
/// The unique identifier's concrete value.
66
#[prost(uint64, tag = "1")]
77
pub id: u64,
88
}
99
/// A Rust source code location.
10-
#[derive(Clone, PartialEq, ::prost::Message)]
10+
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1111
pub struct Location {
1212
/// The file path
1313
#[prost(string, optional, tag = "1")]
@@ -23,21 +23,21 @@ pub struct Location {
2323
pub column: ::core::option::Option<u32>,
2424
}
2525
/// Unique identifier for metadata.
26-
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
26+
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
2727
pub struct MetaId {
2828
/// The unique identifier's concrete value.
2929
#[prost(uint64, tag = "1")]
3030
pub id: u64,
3131
}
3232
/// Unique identifier for spans.
33-
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
33+
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
3434
pub struct SpanId {
3535
/// The unique identifier's concrete value.
3636
#[prost(uint64, tag = "1")]
3737
pub id: u64,
3838
}
3939
/// A message representing a key-value pair of data associated with a `Span`
40-
#[derive(Clone, PartialEq, ::prost::Message)]
40+
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4141
pub struct Field {
4242
/// Metadata for the task span that the field came from.
4343
#[prost(message, optional, tag = "8")]
@@ -58,7 +58,7 @@ pub mod field {
5858
///
5959
/// This is either represented as a string, or as an index into a `Metadata`'s
6060
/// array of field name strings.
61-
#[derive(Clone, PartialEq, ::prost::Oneof)]
61+
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
6262
pub enum Name {
6363
/// The string representation of the name.
6464
#[prost(string, tag = "1")]
@@ -69,7 +69,7 @@ pub mod field {
6969
NameIdx(u64),
7070
}
7171
/// The value of the key-value pair.
72-
#[derive(Clone, PartialEq, ::prost::Oneof)]
72+
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
7373
pub enum Value {
7474
/// A value serialized to a string using `fmt::Debug`.
7575
#[prost(string, tag = "3")]
@@ -118,7 +118,7 @@ pub struct RegisterMetadata {
118118
/// Nested message and enum types in `RegisterMetadata`.
119119
pub mod register_metadata {
120120
/// One metadata element registered since the last update.
121-
#[derive(Clone, PartialEq, ::prost::Message)]
121+
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
122122
pub struct NewMetadata {
123123
/// Unique identifier for `metadata`.
124124
#[prost(message, optional, tag = "1")]
@@ -129,7 +129,7 @@ pub mod register_metadata {
129129
}
130130
}
131131
/// Metadata associated with a span or event.
132-
#[derive(Clone, PartialEq, ::prost::Message)]
132+
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
133133
pub struct Metadata {
134134
/// The name of the span or event.
135135
#[prost(string, tag = "1")]
@@ -262,7 +262,7 @@ pub mod metadata {
262262
/// Contains stats about objects that can be polled. Currently these can be:
263263
/// - tasks that have been spawned
264264
/// - async operations on resources that are performed within the context of a task
265-
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
265+
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
266266
pub struct PollStats {
267267
/// The total number of times this object has been polled.
268268
#[prost(uint64, tag = "1")]
@@ -310,7 +310,7 @@ pub struct PollStats {
310310
/// indicating how many permits they are trying to acquire vs how many are acquired.
311311
/// These values may change over time. Therefore, they live in the runtime stats rather
312312
/// than the static data describing the entity.
313-
#[derive(Clone, PartialEq, ::prost::Message)]
313+
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
314314
pub struct Attribute {
315315
/// The key-value pair for the attribute
316316
#[prost(message, optional, tag = "1")]

0 commit comments

Comments
 (0)