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 has a lot of default features #1258

Closed
matklad opened this issue Feb 22, 2021 · 1 comment · Fixed by #1647
Closed

tracing subscriber has a lot of default features #1258

matklad opened this issue Feb 22, 2021 · 1 comment · Fixed by #1647
Labels
crate/subscriber Related to the `tracing-subscriber` crate meta/breaking This is a breaking change, and should wait until the next breaking release.

Comments

@matklad
Copy link
Contributor

matklad commented Feb 22, 2021

I see that tracing-subscriber has a lot default features. This feels a bit wrong to me: I understand that this is the crate which should be used by libraries implementing subscribers. Ie, it's an intermediate library. In this context, authors of subscribers might forget to include default-features = false, and induce deps on final consumers. See rust-lang/chalk#686 (comment) for an example of this.

I wonder if maybe this is wrong crate factoring? Maybe subscriber should be just a cfged non-default module of the tracing crate?

Super unclear about what's the best solution here, but it's definitely a problem that rust-analyzer pulls in chrono, and I need to investigate which of my dependencies done this :)

@hawkw
Copy link
Member

hawkw commented Feb 22, 2021

I think it's definitely worth reconsidering this as part of the Tracing 0.2 work — for the next breaking change, I think we may want to factor out all of the subscriber implementations into a separate crate from the core trait definitions.

@hawkw hawkw added this to the tracing 0.2 milestone Feb 23, 2021
@hawkw hawkw added crate/subscriber Related to the `tracing-subscriber` crate meta/breaking This is a breaking change, and should wait until the next breaking release. labels Feb 23, 2021
hawkw added a commit that referenced this issue Oct 18, 2021
This changes `tracing-subscriber` so that the `env-filter`, `json`,
 and `chrono` features are not enabled by default, and instead require
users to opt in. This should significantly reduce the default
dependency footprint.

Of course, this is a breaking change, and therefore will be part of
`tracing-subscriber` v0.3.

Fixes #1258

Signed-off-by: Eliza Weisman <eliza@buoyant.io>
hawkw added a commit that referenced this issue Oct 18, 2021
This changes `tracing-subscriber` so that the `env-filter`, `json`,
 and `chrono` features are not enabled by default, and instead require
users to opt in. This should significantly reduce the default
dependency footprint.

Of course, this is a breaking change, and therefore will be part of
`tracing-subscriber` v0.3.

Fixes #1258

Signed-off-by: Eliza Weisman <eliza@buoyant.io>
hawkw added a commit that referenced this issue Oct 21, 2021
This changes `tracing-subscriber` so that the `env-filter`, `json`,
 and `chrono` features are not enabled by default, and instead require
users to opt in. This should significantly reduce the default
dependency footprint.

Of course, this is a breaking change, and therefore will be part of
`tracing-subscriber` v0.3.

Fixes #1258

Signed-off-by: Eliza Weisman <eliza@buoyant.io>
hawkw added a commit that referenced this issue Oct 21, 2021
This changes `tracing-subscriber` so that the `env-filter`, `json`,
 and `chrono` features are not enabled by default, and instead require
users to opt in. This should significantly reduce the default
dependency footprint.

Of course, this is a breaking change, and therefore will be part of
`tracing-subscriber` v0.3.

Fixes #1258

Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crate/subscriber Related to the `tracing-subscriber` crate meta/breaking This is a breaking change, and should wait until the next breaking release.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants