Pull in fewer dependencies#91
Merged
Merged
Conversation
This removes dependencies on aho-corasick, memchr, thread_local, and lazy_static. version-sync is a build and test-time dependency that does not need to be super fast.
This commit re-implements itertools::join in the helpers module. The implementation is small -- less than 15 lines of code -- which does not seem to justify a dependency on an entire external crate. This enables removing the itertools dependency and transitively removes either.
regex 1.3 is the first to expose the feature flags we're disabling. rust-lang/regex#613
Owner
|
Wow, thank you, this looks awesome! |
Owner
|
I'm not at a computer right now — did you happen to measure the time it takes to compile the crate before and after this change? |
Contributor
Author
|
Shaves off about 10% of the compile time. BeforeAfter |
Contributor
Author
|
When you get a moment, I would be excited to see this released as a v0.9.1 🙏 |
Owner
|
Thanks for the numbers! I see a similar speedup here. Version 0.9.1 has just been published to crates.io, including another little fix I noticed 🎉 |
This file contains hidden or 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
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.
This PR removes these crates from the dependency tree of
version-sync:itertoolseitheraho-corasickthread_locallazy_staticTo remove
itertoolsandeither, I reimplemented a free function for joining an iterator with a separator. The implementation is short and fairly straightforward, which I hope means the maintenance burden is acceptable. This also allows removing an entire crate with only 15 lines of code.To remove the remaining dependencies, I deactivated all
regexfeatures exceptstdandunicode.Thank you for the great tests! They made it easy to see what was safe to remove.