Skip to content

Commit 7286d6f

Browse files
authored
fix(subscriber): bump minimum Tokio version (#397)
Fixes #386 Signed-off-by: hi-rustin <[email protected]>
1 parent f01c457 commit 7286d6f

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

Diff for: console-subscriber/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ env-filter = ["tracing-subscriber/env-filter"]
3232
[dependencies]
3333

3434
crossbeam-utils = "0.8.7"
35-
tokio = { version = "^1.15", features = ["sync", "time", "macros", "tracing"] }
35+
tokio = { version = "^1.21", features = ["sync", "time", "macros", "tracing"] }
3636
tokio-stream = "0.1"
3737
thread_local = "1.1.3"
3838
console-api = { version = "0.4.0", path = "../console-api", features = ["transport"] }

Diff for: console-subscriber/README.md

+9-6
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ runtime][Tokio] is considered *experimental*. In order to use
7878
```
7979
If you're using a workspace, you should put the `.cargo/config.toml` file in the root of your workspace.
8080
Otherwise, put the `.cargo/config.toml` file in the root directory of your crate.
81-
81+
8282
Putting `.cargo/config.toml` files below the workspace or crate root directory may lead to tools like
8383
Rust-Analyzer or VSCode not using your `.cargo/config.toml` since they invoke cargo from
8484
the workspace or crate root and cargo only looks for the `.cargo` directory in the current & parent directories.
@@ -101,17 +101,17 @@ runtime][Tokio] is considered *experimental*. In order to use
101101
[`EnvFilter`] or [`Targets`] filters from [`tracing-subscriber`], add
102102
`"tokio=trace,runtime=trace"` to your filter configuration.
103103

104-
+ Also, ensure you have not enabled any of the [compile time filter
104+
+ Also, ensure you have not enabled any of the [compile time filter
105105
features][compile_time_filters] in your `Cargo.toml`.
106-
106+
107107
#### Required Tokio Versions
108108

109109
Because instrumentation for different aspects of the runtime is being added to
110110
Tokio over time, the latest Tokio release is generally *recommended* to access all of
111111
the console's functionality. However, it should generally be compatible with
112112
earlier Tokio versions, although some information may not be available. A
113113
minimum version of [Tokio v1.0.0] or later is required to use the console's
114-
task instrumentation.
114+
task instrumentation.
115115

116116
Other instrumentation is added in later Tokio releases:
117117

@@ -126,8 +126,10 @@ Other instrumentation is added in later Tokio releases:
126126

127127
* [Tokio v1.15.0] or later is required to track [`tokio::sync`] resources, such
128128
as `Mutex`es, `RwLock`s, `Semaphore`s, `oneshot` channels, `mpsc` channels, et
129-
cetera.
130-
129+
cetera.
130+
131+
* [Tokio v1.21.0] or later is required to use newest `task::Builder::spawn*` APIs.
132+
131133
[Tokio v1.0.0]: https://github.com/tokio-rs/tokio/releases/tag/tokio-1.0.0
132134
[Tokio v1.7.0]: https://github.com/tokio-rs/tokio/releases/tag/tokio-1.7.0
133135
[Tokio v1.12.0]:https://github.com/tokio-rs/tokio/releases/tag/tokio-1.12.0
@@ -144,6 +146,7 @@ Other instrumentation is added in later Tokio releases:
144146
[builder]: https://docs.rs/console-subscriber/latest/console_subscriber/struct.Builder.html
145147
[init]: https://docs.rs/console-subscriber/latest/console_subscriber/fn.init.html
146148
[compile_time_filters]: https://docs.rs/tracing/latest/tracing/level_filters/index.html#compile-time-filters
149+
[Tokio v1.21.0]: https://github.com/tokio-rs/tokio/releases/tag/tokio-1.21.0
147150

148151
### Adding the Console Subscriber
149152

0 commit comments

Comments
 (0)