Bug 828002
Summary: | ruby package does not dep-in rubygem-bigdecimal | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | postmodern <postmodern.mod3> |
Component: | ruby | Assignee: | Jeroen van Meeuwen <vanmeeuwen+fedora> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 17 | CC: | bkabrda, jeremy, mmorsi, mtasaka, sshedmak, tagoh, vanmeeuwen+fedora, vondruch |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2012-06-15 09:53:53 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
postmodern
2012-06-04 00:55:24 UTC
bigdecimal Gem is one of the bundled Gems in new Ruby. We unbundled it and we now ship it as a separate package (rubygem-bigdecimal). As this Gem is not a hard dependency for Ruby itself (the only thing that requires it from the rest of Ruby is "/ext/psych/lib/psych/visitors/to_ruby.rb"), I would say that it's an optional dependency and doesn't have to be required by Ruby itself. I am however leaving this bug open for more people from Ruby SIG to express their opinions. BTW, these "fake gems" are showing more issues, that are even not Fedora specific. See [1] for the reports on Redmine. [1] https://bugs.ruby-lang.org/issues/6124 Many RubyGems require bigdecimal [1], but do not define a dependency on the actual bigdecimal gem [2], thus expecting bigdecimal to be installed along with the Ruby stdlib. [1]: https://github.com/search?q=%22require+%27bigdecimal%27%22&repo=&langOverride=&start_value=1&type=Code&language=Ruby [2]: https://rubygems.org/gems/bigdecimal BTW, these fake stdlib gems also confused the Bundler utility [1]. Although, I expect the Bundler developers will support /usr/share/gems soon. The ruby-core team eventually plans to gemify stdlib in Ruby 3.0 [2]. I like Fedora's approach to beginning the gemification of the Ruby stdlib. [1]: https://github.com/carlhuda/bundler/issues/1960 [2]: http://bugs.ruby-lang.org/issues/5481 Hi postmodern, I understand your sentiment and I can assure you that we are not happy about the situation. But we strive for correct solution. The only correct solution IMO is to gemify the stdlib correctly. If it will be gemified correctly, all the gems you mention should depend on bigdecimal. That is why are we trying to correct the situation with upstream, as mentioned by Slavek [1]. [1] https://bugs.ruby-lang.org/issues/6124 I've found a workaround to this issue. Simply add symlinks into /usr/share/ruby/ and /usr/lib/ruby/ to bigdecimal. $ ln -s /usr/share/gems/gems/bigdecimal-1.1.0/lib/bigdecimal /usr/share/ruby/bigdecimal $ ln -s /usr/lib/gems/exts/bigdecimal-1.1.0/lib/bigdecimal.so /usr/lib/ruby/bigdecimal.so This allows Ruby projects that use Bundler to require bigdecimal, without explicitly depending on bigdecimal. Perhaps rubygem-bigdecimal, rubygem-json, rubygem-io-console could add these symlinks for maximum backwards compatibility? (In reply to comment #5) > Perhaps rubygem-bigdecimal, rubygem-json, rubygem-io-console could add these > symlinks for maximum backwards compatibility? I am against this idea. Once you put these symlinks in place, you will never be able to correct this situation, since you will not be able to detect this issue. (In reply to comment #6) > (In reply to comment #5) > > Perhaps rubygem-bigdecimal, rubygem-json, rubygem-io-console could add these > > symlinks for maximum backwards compatibility? > > I am against this idea. Once you put these symlinks in place, you will never > be able to correct this situation, since you will not be able to detect this > issue. Also, as already mentioned in [1], this prevents using newer versions of these gems, if they are not in Gemfile or gemspecs (therefore don't get picked up by rubygems loading mechanism). It is not the case for json, but it is the case for io-console and most importantly bigdecimal. [1] https://bugs.ruby-lang.org/issues/6124 The symlinks were added for bigdecimal and io-console in this update: https://admin.fedoraproject.org/updates/FEDORA-2012-9264/ruby-1.9.3.194-13.fc17 Use 'sudo yum update ruby rubygem-bigdecimal rubygem-io-console --enablerepo=udpates-testing' to update. Updated and my test-suites pass now. Thank you! |