jeremyevans / sequel

Sequel: The Database Toolkit for Ruby
http://sequel.jeremyevans.net
Other
4.98k stars 1.07k forks source link

Add bigdecimal as an explicit dependency #2003

Closed ekohl closed 1 year ago

ekohl commented 1 year ago

While sequel always requires bigdecimal, it's not listed as a dependency. It's possible to have a Ruby installation without bigdecimal (on EL8 / Fedora: dnf install ruby --setopt=install_weak_deps=False) and this helps. While Fedora already explicitly adds it as a dependency, listing it in the gemspec allows the dependency generator to pick it up automatically.

ekohl commented 1 year ago

After I opened a similar PR in Rails it was pointed out bigdecimal is actually a candidate for moving from a default gem to a bundled gem in Ruby 3.3: https://bugs.ruby-lang.org/issues/19351.

jeremyevans commented 1 year ago

As a general policy, Sequel does not declare dependencies on stdlib gems. If Fedora allows you to create a Ruby installation without the stdlib gems that ship with Ruby, that sounds like a problem with Fedora. If bigdecimal switches from a stdlib gem to a bundled gem, this could be reconsidered.

AlexWayfer commented 1 year ago

If you use installation method like "don't install deps" — it's a problem of installation method, yes, I agree.

In other hand, if we already have the official bigdecimal gem, and we can lock it better (major better versions), like with psych right now — I'd like to add this as dependency. I see nothing wrong with it, only pros.