Skip to content

Commit f4ee0df

Browse files
authored
chore: update dependencies (#590)
For users who build tokio-console by installing it with `cargo`, it is common to use the `--locked` flag to indicate that the dependency versions from the lock file should be used. So it's worth having those dependencies up to date. This change checks in the result of running `cargo update` without changing the manifest (`Cargo.toml`) files. The patch (pre-1.0 minor) version change to `tonic-build` included a deprecation (rename) and some clippy lint allow directives in the generated Rust files. The update to `tracing` in the lockfile from 0.1.37 to 0.1.40 includes the changes from tokio-rs/tracing#2562. This change causes an instrumented future to be entered one final time when the future is dropped, so that any code run in the drop implementation will be in the scope of the span. This causes the number of polls recorded for a task to be incremented by 1 right before it is dropped. Due to this change, some of the `console-subscriber` tests needed to be updated. This behaviour was already present for many application using the `console-subscriber`, but not yet in the tests because we hadn't updated the lockfile for a while.
1 parent ae17230 commit f4ee0df

File tree

14 files changed

+653
-713
lines changed

14 files changed

+653
-713
lines changed

Cargo.lock

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

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -174,12 +174,12 @@ The Tokio console: a debugger for async Rust.
174174
Usage: tokio-console[EXE] [OPTIONS] [TARGET_ADDR] [COMMAND]
175175
176176
Commands:
177-
gen-config Generate a `console.toml` config file with the
178-
default configuration values, overridden by any
179-
provided command-line arguments
177+
gen-config Generate a `console.toml` config file with the default
178+
configuration values, overridden by any provided
179+
command-line arguments
180180
gen-completion Generate shell completions
181181
help Print this message or the help of the given
182-
subcommand(s)
182+
subcommand(s)
183183
184184
Arguments:
185185
[TARGET_ADDR]

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
///
44
/// This includes a list of any new async ops, and updates to the associated statistics
55
/// for any async ops that have changed since the last update.
6-
#[allow(clippy::derive_partial_eq_without_eq)]
76
#[derive(Clone, PartialEq, ::prost::Message)]
87
pub struct AsyncOpUpdate {
98
/// A list of new async operations that were created since the last `AsyncOpUpdate`
@@ -33,7 +32,6 @@ pub struct AsyncOpUpdate {
3332
/// An async operation is an operation that is associated with a resource
3433
/// This could, for example, be a read or write on a TCP stream, or a receive operation on
3534
/// a channel.
36-
#[allow(clippy::derive_partial_eq_without_eq)]
3735
#[derive(Clone, PartialEq, ::prost::Message)]
3836
pub struct AsyncOp {
3937
/// The async op's ID.
@@ -68,7 +66,6 @@ pub struct AsyncOp {
6866
pub resource_id: ::core::option::Option<super::common::Id>,
6967
}
7068
/// Statistics associated with a given async operation.
71-
#[allow(clippy::derive_partial_eq_without_eq)]
7269
#[derive(Clone, PartialEq, ::prost::Message)]
7370
pub struct Stats {
7471
/// Timestamp of when the async op has been created.

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

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
// This file is @generated by prost-build.
22
/// Unique identifier for each task.
3-
#[allow(clippy::derive_partial_eq_without_eq)]
43
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
54
pub struct Id {
65
/// The unique identifier's concrete value.
76
#[prost(uint64, tag = "1")]
87
pub id: u64,
98
}
109
/// A Rust source code location.
11-
#[allow(clippy::derive_partial_eq_without_eq)]
1210
#[derive(Clone, PartialEq, ::prost::Message)]
1311
pub struct Location {
1412
/// The file path
@@ -25,23 +23,20 @@ pub struct Location {
2523
pub column: ::core::option::Option<u32>,
2624
}
2725
/// Unique identifier for metadata.
28-
#[allow(clippy::derive_partial_eq_without_eq)]
2926
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
3027
pub struct MetaId {
3128
/// The unique identifier's concrete value.
3229
#[prost(uint64, tag = "1")]
3330
pub id: u64,
3431
}
3532
/// Unique identifier for spans.
36-
#[allow(clippy::derive_partial_eq_without_eq)]
3733
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
3834
pub struct SpanId {
3935
/// The unique identifier's concrete value.
4036
#[prost(uint64, tag = "1")]
4137
pub id: u64,
4238
}
4339
/// A message representing a key-value pair of data associated with a `Span`
44-
#[allow(clippy::derive_partial_eq_without_eq)]
4540
#[derive(Clone, PartialEq, ::prost::Message)]
4641
pub struct Field {
4742
/// Metadata for the task span that the field came from.
@@ -63,7 +58,6 @@ pub mod field {
6358
///
6459
/// This is either represented as a string, or as an index into a `Metadata`'s
6560
/// array of field name strings.
66-
#[allow(clippy::derive_partial_eq_without_eq)]
6761
#[derive(Clone, PartialEq, ::prost::Oneof)]
6862
pub enum Name {
6963
/// The string representation of the name.
@@ -75,7 +69,6 @@ pub mod field {
7569
NameIdx(u64),
7670
}
7771
/// The value of the key-value pair.
78-
#[allow(clippy::derive_partial_eq_without_eq)]
7972
#[derive(Clone, PartialEq, ::prost::Oneof)]
8073
pub enum Value {
8174
/// A value serialized to a string using `fmt::Debug`.
@@ -98,7 +91,6 @@ pub mod field {
9891
/// Represents a period of time in which a program was executing in a particular context.
9992
///
10093
/// Corresponds to `Span` in the `tracing` crate.
101-
#[allow(clippy::derive_partial_eq_without_eq)]
10294
#[derive(Clone, PartialEq, ::prost::Message)]
10395
pub struct Span {
10496
/// An Id that uniquely identifies it in relation to other spans.
@@ -117,7 +109,6 @@ pub struct Span {
117109
pub at: ::core::option::Option<::prost_types::Timestamp>,
118110
}
119111
/// Any new metadata that was registered since the last update.
120-
#[allow(clippy::derive_partial_eq_without_eq)]
121112
#[derive(Clone, PartialEq, ::prost::Message)]
122113
pub struct RegisterMetadata {
123114
/// The new metadata that was registered since the last update.
@@ -127,7 +118,6 @@ pub struct RegisterMetadata {
127118
/// Nested message and enum types in `RegisterMetadata`.
128119
pub mod register_metadata {
129120
/// One metadata element registered since the last update.
130-
#[allow(clippy::derive_partial_eq_without_eq)]
131121
#[derive(Clone, PartialEq, ::prost::Message)]
132122
pub struct NewMetadata {
133123
/// Unique identifier for `metadata`.
@@ -139,7 +129,6 @@ pub mod register_metadata {
139129
}
140130
}
141131
/// Metadata associated with a span or event.
142-
#[allow(clippy::derive_partial_eq_without_eq)]
143132
#[derive(Clone, PartialEq, ::prost::Message)]
144133
pub struct Metadata {
145134
/// The name of the span or event.
@@ -194,8 +183,8 @@ pub mod metadata {
194183
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
195184
pub fn as_str_name(&self) -> &'static str {
196185
match self {
197-
Kind::Span => "SPAN",
198-
Kind::Event => "EVENT",
186+
Self::Span => "SPAN",
187+
Self::Event => "EVENT",
199188
}
200189
}
201190
/// Creates an enum from field names used in the ProtoBuf definition.
@@ -250,11 +239,11 @@ pub mod metadata {
250239
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
251240
pub fn as_str_name(&self) -> &'static str {
252241
match self {
253-
Level::Error => "ERROR",
254-
Level::Warn => "WARN",
255-
Level::Info => "INFO",
256-
Level::Debug => "DEBUG",
257-
Level::Trace => "TRACE",
242+
Self::Error => "ERROR",
243+
Self::Warn => "WARN",
244+
Self::Info => "INFO",
245+
Self::Debug => "DEBUG",
246+
Self::Trace => "TRACE",
258247
}
259248
}
260249
/// Creates an enum from field names used in the ProtoBuf definition.
@@ -273,7 +262,6 @@ pub mod metadata {
273262
/// Contains stats about objects that can be polled. Currently these can be:
274263
/// - tasks that have been spawned
275264
/// - async operations on resources that are performed within the context of a task
276-
#[allow(clippy::derive_partial_eq_without_eq)]
277265
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
278266
pub struct PollStats {
279267
/// The total number of times this object has been polled.
@@ -322,7 +310,6 @@ pub struct PollStats {
322310
/// indicating how many permits they are trying to acquire vs how many are acquired.
323311
/// These values may change over time. Therefore, they live in the runtime stats rather
324312
/// than the static data describing the entity.
325-
#[allow(clippy::derive_partial_eq_without_eq)]
326313
#[derive(Clone, PartialEq, ::prost::Message)]
327314
pub struct Attribute {
328315
/// The key-value pair for the attribute

0 commit comments

Comments
 (0)