-
Notifications
You must be signed in to change notification settings - Fork 754
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
Feature-dependent dependencies are documented to not work #365
Comments
According to rust-lang/cargo#7442 (comment), |
Thanks for bringing this up! The intention was to follow the convention commonly used by other crates which can conditionally support I think the only viable solution here is to change from having a |
Well, right now everything is getting the |
Upon further consideration, I think the best approach is probably to do the following:
This has some potential downsides for |
Following the suggested fix on #365: #365 (comment) tracing-core's use of `spin` is feature-gated. `lazy_static` is vendored for either feature but I've modified it to respect our feature flags. I've also removed doc comments that no longer compile and suppressed a couple of warnings with the lints that are now being applied. At this point * Including this in another project with std `lazy_static` works * Tracing unit tests pass both with and without `--no-default-features` Fixes #365 * core: vendor lazy_static and spin for no_std support * core: fmt vendored code * core: trim down vendored spin, reduce visibility and addresss warnings * core: limit vendored lazy_static for use only with no_std, fix warnings * core: update paths to now-vendored no_std libs * tracing: use spin::Once re-exported from tracing-core instead of crate * core: remove ineffectual doc(hidden) * core: refmt stdlib module * core: bump to 0.1.8 to expose export of vendored spin::Once to tracing
Bug Report
Version
Current git master
Crates
Description
According to the Cargo documentation:
However, the tracing crates are apparently doing this successfully:
It seems like something which could break in future versions of Cargo.
Corresponding Cargo issue: rust-lang/cargo#7442
The text was updated successfully, but these errors were encountered: