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
86 changes: 53 additions & 33 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 6 additions & 8 deletions console-api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
17 changes: 0 additions & 17 deletions console-api/src/common.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use std::fmt;
use std::hash::{Hash, Hasher};

pub use generated::*;

Expand Down Expand Up @@ -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<H: Hasher>(&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<u64> for Id {
Expand Down
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
Expand Up @@ -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.
///
Expand Down
22 changes: 11 additions & 11 deletions console-api/src/generated/rs.tokio.console.common.rs
Original file line number Diff line number Diff line change
@@ -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")]
Expand All @@ -23,21 +23,21 @@ pub struct Location {
pub column: ::core::option::Option<u32>,
}
/// 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")]
Expand All @@ -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")]
Expand All @@ -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")]
Expand Down Expand Up @@ -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")]
Expand All @@ -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")]
Expand Down Expand Up @@ -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")]
Expand Down Expand Up @@ -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")]
Expand Down
Loading
Loading