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

Bundle bigdecimal and base64 #69

Closed
DannyBen opened this issue Feb 23, 2024 · 5 comments
Closed

Bundle bigdecimal and base64 #69

DannyBen opened this issue Feb 23, 2024 · 5 comments

Comments

@DannyBen
Copy link

Ruby 3.3 started issuing warnings about using base64 and bigdecimal without having them in the bundle of the gems.

Reproduction

# test.rb
require 'bundler/inline'

gemfile do
  source "https://rubygems.org"
  gem "multi_xml"
end

puts "DONE"

Output

$ ruby -v
ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [x86_64-linux]

$ ruby test.rb
/home/vagrant/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/multi_xml-0.6.0/lib/multi_xml.rb:1: warning: base64 was loaded from the standard library, but will no longer be part of the default gems since Ruby 3.4.0. Add base64 to your Gemfile or gemspec. Also contact author of multi_xml-0.6.0 to add base64 into its gemspec.
/home/vagrant/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/multi_xml-0.6.0/lib/multi_xml.rb:2: warning: bigdecimal was loaded from the standard library, but will no longer be part of the default gems since Ruby 3.4.0. Add bigdecimal to your Gemfile or gemspec. Also contact author of multi_xml-0.6.0 to add bigdecimal into its gemspec.
DONE

For me, the bigger issue is that this warning cascades down, so currently all my gems that use HTTParty (which uses multi_xml) are showing this problem and require me to add runtime dependencies that are not mine to bundle.

@wmanica
Copy link

wmanica commented Mar 28, 2024

Left a similar comment in HTTParty just now in an open issue about it

Other gems have resolved adding the gems to the gemspec, in this case base64 and bigdecimal.

here an example: https://github.com/thinreports/thinreports-generator/pull/134/files

@DannyBen
Copy link
Author

Other gems have resolved adding the gems to the gemspec, in this case base64 and bigdecimal.

Yes, as have I - but this is a stopgap measure. You should not need to bundle someone else's dependencies.

@sferik
Copy link
Owner

sferik commented Apr 30, 2024

Fixed in #67. I'll be pushing out a new gem release shortly.

@sferik sferik closed this as completed Apr 30, 2024
@sibbl
Copy link

sibbl commented May 2, 2024

Fyi, this somehow broke one of our Redmine plugins which still uses httparty in version 0.14 running in our internal Redmine instance:

An error occurred while installing bigdecimal (3.1.7), and Bundler cannot continue.

In Gemfile
  httparty was resolved 0.14.0, which depends on
    multi_xml as resolved o 0.7.1, which depends on
      bigdecimal

As httparty imports multi_xml >= 0.5.6, we could fix it by specifically adding version 0.6.0 of multi_xml to our gemfile.

@sferik
Copy link
Owner

sferik commented May 2, 2024

@sibbl What error do you get when you try to gem install bigdecimal?

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

No branches or pull requests

4 participants