tracing
tracing copied to clipboard
Remove once_cell as a dependency
Motivation
Decrease the number of dependencies to improve compilation times.
Solution
Replace existing uses of once_cell::sync::Lazy with std::sync::OnceLock, or use const initialization where possible. This bumps the MSRV for a few crates to 1.70, but should keep the baseline MSRV at 1.63.
Can you please also look into updating thread-local? tracing-subscriber still transitively depends on once_cell because of that.
Debian Stable is a good MSRV limit, I'd say.
For the record, current Debian stable is bookworm which offers 1.63, which is the current MSRV version.
For thread-local, https://github.com/Amanieu/thread_local-rs/pull/76 should handle this without pushing past 1.63.
Note that the MSRV policy in the README states last 3 versions of stable Rust, which would put a cap at 1.74, far past 1.63. It does seem like Debian Sid is at 1.70 now, so it's likely it will be used in the next Debian release, but that need to wait until mid-2025 or later before that's available. I can separate out the changes for tracing-flame, tracing-subscriber, and tracing-log into a separate PR if need be.