From 5c430d1c8585c00b9eba4c9a69c1dd3f2f80cd7c Mon Sep 17 00:00:00 2001 From: Eliza Weisman Date: Wed, 20 Oct 2021 11:33:47 -0700 Subject: [PATCH] chore: change `tracing-subscriber` dependencies to enable `std` ## Motivation Currently, some `tracing-subscriber` dependencies in other crates use `default-features = false`, to ensure that unneeded default features of `tracing-subscriber` are not inadvertently enabled. However, some of the features those crates enable also require the `std` feature flag. The `default-features = false` config _disables_ the `std` feature, so the required features are not available. ## Solution This branch changes those crates' dependencies on `tracing-subscriber` to also enable the `std` feature. ## Alternatives As an alternative solution, we could change `tracing-subscriber`'s feature flags so that features that require the standard library _also_ enable the `std` feature, rather than having those features _require_ it. I think this _might_ actually provide a better experience for most users. --- tracing-error/Cargo.toml | 7 ++++++- tracing-flame/Cargo.toml | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/tracing-error/Cargo.toml b/tracing-error/Cargo.toml index 48193be622..90111bb2df 100644 --- a/tracing-error/Cargo.toml +++ b/tracing-error/Cargo.toml @@ -38,9 +38,14 @@ default = ["traced-error"] traced-error = [] [dependencies] -tracing-subscriber = { path = "../tracing-subscriber", version = "0.3", default-features = false, features = ["registry", "fmt"] } tracing = { path = "../tracing", version = "0.2", default-features = false, features = ["std"] } +[dependencies.tracing-subscriber] +path = "../tracing-subscriber" +version = "0.3" +default-features = false +features = ["registry", "fmt", "std"] + [badges] maintenance = { status = "experimental" } diff --git a/tracing-flame/Cargo.toml b/tracing-flame/Cargo.toml index cf2a04609c..c6952d7246 100644 --- a/tracing-flame/Cargo.toml +++ b/tracing-flame/Cargo.toml @@ -25,9 +25,14 @@ default = ["smallvec"] smallvec = ["tracing-subscriber/smallvec"] [dependencies] -tracing-subscriber = { path = "../tracing-subscriber", version = "0.3", default-features = false, features = ["registry", "fmt"] } tracing = { path = "../tracing", version = "0.2", default-features = false, features = ["std"] } lazy_static = "1.3.0" +[dependencies.tracing-subscriber] +path = "../tracing-subscriber" +version = "0.3" +default-features = false +features = ["registry", "fmt", "std"] + [dev-dependencies] tempfile = "3"