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
Make Gem::Specification#required_ruby_version more flexible #1263
Comments
Just a quick followup, havenwood on IRC suggested making a distinction between the ruby version and the engine version since implementations like JRuby have multiple modes on the same engine. To that end he suggested adding a separate specification called "required_ruby_engine_version". That might be the way to go. |
@djberg96 I was going to suggest that. Seems fine to me if we go with required_engine_version rather than Ruby version. |
would something like this get Nokogiri's gemspec out of hoe/Rake? |
Ok, let's go with having the separate spec item required_ruby_engine_version (or just required_engine_version as tenderlove suggested, I guess we know it's Ruby). @kbrock It looks like it would clean it up a bit, but not remove it entirely, since only a portion appears to deal with java. I never noticed that before, yeesh. |
* Can be resolved by anima when rubygems fix this rubygems/rubygems#1263
Closing since the relevant PR was rejected. |
Currently the Gem::Specification#required_ruby_version allows a single string that corresponds to the ruby version, plus possible patchlevel information.
However, due to the existence of multiple Ruby implementations (JRuby, Rubinius, etc), and the various quirks of those implementations, it may be necessary to specify different minimum versions for different implementations. To wit, some of my own win32utils gems will need a later version of JRuby due to a bug in JRuby x64. So, while Ruby 1.9.3 is good enough for MRI, for JRuby some of my gems will need 9k. I'm also thinking it should be possible to mark certain implementations as unsupported.
I'm not sure how this should be implemented. My initial idea is to optionally allow required_ruby_version to accept a hash, using RUBY_ENGINE as the key, and the version as the value like so:
If a string is provided instead of a hash, then simply default to the current behavior to maintain backwards compatibility.
What do you think?
The text was updated successfully, but these errors were encountered: