-
Notifications
You must be signed in to change notification settings - Fork 12
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
Pull in fewer dependencies #91
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
Wow, thank you, this looks awesome! |
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? |
Shaves off about 10% of the compile time. Before
After
|
When you get a moment, I would be excited to see this released as a v0.9.1 🙏 |
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 PR removes these crates from the dependency tree of
version-sync
:itertools
either
aho-corasick
thread_local
lazy_static
To remove
itertools
andeither
, 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
regex
features exceptstd
andunicode
.Thank you for the great tests! They made it easy to see what was safe to remove.