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
subscriber: rm crossbeam-utils, make parking_lot opt-in #348
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
github-actions
bot
added
the
crate/subscriber
Related to the `tracing-subscriber` crate
label
Sep 13, 2019
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
hawkw
force-pushed
the
eliza/rm-subscriber-deps
branch
from
September 13, 2019 20:06
6d01a6c
to
ea38fcb
Compare
Switching from |
LucioFranco
approved these changes
Sep 13, 2019
hawkw
added a commit
that referenced
this pull request
Sep 13, 2019
Fixed: - `EnvFilter` ignoring directives with targets that are the same number of characters (#333) - `EnvFilter` failing to properly apply filter directives to events generated from `log` records by`tracing-log` (#344) Changed: - Renamed `Filter` to `EnvFilter`, deprecated `Filter` (#339) - Renamed "filter" feature flag to "env-filter", deprecated "filter" (#339) - `FmtSubscriber` now defaults to enabling only the `INFO` level and above when a max level filter or `EnvFilter` is not set (#336) - Made `parking_lot` dependency an opt-in feature flag (#348) Added: - `EnvFilter::add_directive` to add new directives to filters after they are constructed (#334) - `fmt::Builder::with_max_level` to set a global level filter for a `FmtSubscriber` without requiring the use of `EnvFilter` (#336) - `Layer` implementation for `LevelFilter` (#336) - `EnvFilter` now implements `fmt::Display` (#329) Removed: - Removed dependency on `crossbeam-util` (#348) 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
The
tracing-subscriber
currently depends on both thecrossbeam-util
crate (for its
ShardedLock
type) and theparking_lot
crate for it'sRwLock
implementation. The Rust standard library also provides aRwLock
implementation, so these external dependencies are not strictlynecessary. In the past, using these crates was anecdotally observed to
result in a performance improvement, but the tradeoff is adding
additonal crates (and their transitive dependencies) to the user's
dependency tree.
Solution
This branch removes the
crossbeam-util
dependency, and makes theparking_lot
dependency opt-in. The explicit use ofparking_lot::RwLock
with a wrapper type that abstracts over theparking_lot::RwLock
andstd::sync::RwLock
types to provide amatching API. This allows the
parking_lot
feature flag totransparently replace the use of
std::sync::RwLock
withparking_lot
,rather than making it required for other features.