Don't activate default features of env_logger#33
Conversation
There was a problem hiding this comment.
Thanks! This looks like a sane thing to do if it reduces the binary size.
This dependency was probably brought in by fancier log filter. I need to check if it works as expected with this change, add a feature to disable it if it does not work for some reason.
|
Since this breaks backwards compatibility, would make this crate work differently than default
|
998b842 to
0c404d5
Compare
|
Sorry, looks like we need to leave |
Oh, true. I should not send PRs before my first coffee in the morning :D |
|
These are the default features of So |
|
This change is good overall, because we certainly don't need other |
This allows to deactivate the feature if wanted. env_logger comes with several optional-but-default-activated features, including a dependency on regex. Not everyone likes to pull in regex. Putting this behind a feature allows users of android_logger to use it with default-features=false and thus removing the regex dependency.
0c404d5 to
1db5caf
Compare
|
Well, then... |
env_logger comes with several optional-but-default-activated features,
including a dependency on regex.
There's no need for android_logger to require that. Deactivating default
features allows users of android_logger to define the features they
need.
Details
We're using regex in our own library, but with [recent changes](https://github.com/rust-lang/regex/pull/613) we were able to reduce our library size by 30% or so. However, now upgrading to the latest android_logger pulls in the whole of regex again, without a way to prevent that. If android_logger just won't ask for the default features our own library is free to specify the final feature set (of course only as long as no _other_ library also pulls in regex with default features).