Skip to content
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

Either declare or remove dependency on base64 to avoid a Ruby 3.3 warning #6150

Closed
Earlopain opened this issue Jan 2, 2024 · 1 comment · Fixed by #6151
Closed

Either declare or remove dependency on base64 to avoid a Ruby 3.3 warning #6150

Earlopain opened this issue Jan 2, 2024 · 1 comment · Fixed by #6151

Comments

@Earlopain
Copy link
Contributor

Ruby version: 3.3.0
Sidekiq / Pro / Enterprise version(s): master

Ruby 3.3 emits a warning when base64 is required without being specified in the gemspec. Ruby 3.4 will error.

There are a few places in sidekiq where base64 is being made use of. These should either be refactored to not use the gem, or it should be added to the gemspec.

You can observe this warning in CI: https://github.com/sidekiq/sidekiq/actions/runs/7358335463/job/20031428359
image
Ignore the other warnings, they originate from other gems. drb is from rails I believe.

I've gone through a few gems I use and made PRs to replace this gem with pack/unpack, since that is basically everything that it's doing. However, here the url safe variants are used which does a bit more than just calling a differently named method and inlining that here doesn't feel that great.
https://github.com/ruby/base64/blob/9669a7d3b0e3b9a739969404daf58f912c58c6b3/lib/base64.rb#L328-L333
https://github.com/ruby/base64/blob/9669a7d3b0e3b9a739969404daf58f912c58c6b3/lib/base64.rb#L351-L362

@mperham
Copy link
Collaborator

mperham commented Jan 2, 2024

Thanks for catching this. I'm ok with a PR inlining the basic calls.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants