-
Notifications
You must be signed in to change notification settings - Fork 982
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
Remove runtime dependency on base64 #1541
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this approach. Thank you @Earlopain for bringing it up, in a PR.
(Seen other gems wrap local methods to break the gem dependency.)
Raises the question: Are there other gems in the Awesome Faraday list that sort of second-level depends on base64 being there for them?
Good point with the other parts of the ecosystem. I have checked every entry on the list and its looking pretty good. No direct usage, I haven't checked transitive dependencies however. The exception being Anything relating to faraday inside the lostisland org no Adapters
Middleware
Speaking of the awesome faraday list, the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the fix and the thorough analysis @Earlopain.
This should be enough to confidently remove the dependency, and I'd add that if a downstream gem (middleware or adapter) requires base64
then it should also list it as a dependency rather than relying on Faraday 👍
Description
#1525 removed a warning in ruby 3.3 because of the base64 dependency. Only a single method in one place is used so there's no need to pull it in. Since it's just a wrapper around the
pack
method it's trivial to replace.Same approach by other gems:
base64
gem from runtime dependency rubocop/rubocop#12313