Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tracing-subscriber enables the default features of tracing-core #2106

Closed
jamesmunns opened this issue May 5, 2022 · 0 comments · Fixed by #2107
Closed

tracing-subscriber enables the default features of tracing-core #2106

jamesmunns opened this issue May 5, 2022 · 0 comments · Fixed by #2107

Comments

@jamesmunns
Copy link
Contributor

jamesmunns commented May 5, 2022

Bug Report

Version

Current head of the master branch

Platform

N/A

Crates

tracing-subscriber, tracing-core

Description

Currently, the tracing-subscriber crate unconditionally depends on the tracing-core crate, which has a default feature set of ["std"]. This can be seen here.

This means that despite including both crates with default-features = false, the std feature is still enabled.

I'm working on getting tracing v0.2 working on an MCU platform, and this would be a problem. I may not actually need the tracing-subscriber crate (still learning), but I was surprised when I had access to std methods in tracing-core, specifically Dispatch::new().

The fix for this may be as simple as changing that dependency to include default-features = false, and propagating the std feature through when selected, but I'm not sure how to test that would be sufficient. I'll probably give it a go and see what CI thinks.

hawkw pushed a commit that referenced this issue May 5, 2022
This attempts to address #2106 by disabling the `tracing-core`
crate's default features in `tracing-subscriber`'s dependency.
Now, `tracing-core`'s optional "alloc" feature is only enabled
when "tracing-subscriber/alloc" is enabled.

Closes #2106
hawkw pushed a commit that referenced this issue Jun 6, 2022
This attempts to address #2106 by disabling the `tracing-core`
crate's default features in `tracing-subscriber`'s dependency.
Now, `tracing-core`'s optional "alloc" feature is only enabled
when "tracing-subscriber/alloc" is enabled.

Closes #2106
hawkw pushed a commit that referenced this issue Jun 7, 2022
This attempts to address #2106 by disabling the `tracing-core`
crate's default features in `tracing-subscriber`'s dependency.
Now, `tracing-core`'s optional "alloc" feature is only enabled
when "tracing-subscriber/alloc" is enabled.

Closes #2106
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant