-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Ignore spec different platfroms #8508
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
base: master
Are you sure you want to change the base?
Conversation
c316ba9 to
c5b7fb4
Compare
|
/cc @headius |
|
For what it's worth, I don't think this is the right fix because it will hide all instances of this warning in JRuby, not just the ones that are actually false positives. I'd prefer that we work on a proper solution. |
|
I don't imagine |
|
If a extension builds specific artifacts only under JRuby, but does not build those artifacts when installed under a different implementation, then if you switch to JRuby, you can't use the installation as is, but the artifacts will need to be built for JRuby, right? For example, will jruby-launcher extension work on JRuby if installed under non-jruby? |
| warn "Source #{source} is ignoring #{self} because it is missing extensions" | ||
| # If we share GEM_HOME for all of Ruby platform, the platform specific gem always warn that specification. | ||
| # ex `jruby-launcher` and CRuby | ||
| if platform == Gem::Platform::RUBY && RUBY_ENGINE != "jruby" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this only limited to jruby?
|
Sorry I missed this for a while. Answers to some questions: I don't think this is the right fix because it will hide all instances of this warning in JRubyIn general, extensions built for one configuration of JRuby (JRuby version plus Java version) will work on any other configuration. We do not expose a version-specific C API, so there's nothing to recompile, and Java-based extensions are shipped in a pre-built form. Unless an extension is using Java version-specific APIs (I don't know of any that do this), we do not need separate builds for each configuration. For example, will jruby-launcher extension work on JRuby if installed under non-jruby?jruby-launcher is a "-java" platform gem, so I don't expect CRuby users will ever install it. But even if they did, it just builds a plain C-based executable that has no dependencies on a specific JRuby or JVM version. Why is this only limited to jruby?Basically, this extension warning makes no sense for JRuby, because:
Basically, gems with native code installed on JRuby should work on just about any supported configuration of JRuby + Java. The warning is (almost always?) useless for us. I got sick of seeing these warnings again today and was about to monkey-patch RubyGems to stop producing this warning, but this PR would probably be a better option. (Edit: "exceptions" => "extensions") |
|
The jruby-launcher gem actually exposes another problem with this warning: it does not actually create an extension for the So there's basically no way to avoid this warning when using bundler and the jruby-launcher gem. |
Oops, I did not notice it was complaining about the "2.0.0.pre2" version of the jruby-launcher gem, so that was a red herring. But it is still a problem when switching Java versions, even though the installed executable works just fine: The main problem is when switching Java version, since that version gets baked into the extension dir and used for the |
743b51b to
ea0266e
Compare
ea0266e to
8cca385
Compare
What was the end-user or developer problem that led to this PR?
I'm working to provide shared
GEM_HOMEfor all of Ruby versions and platforms.If I used CRuby and
jruby-launchergem with that environment, RubyGems warns the following:In another case, I use JRuby and run
gem -v. RubyGems warns all of C extension gem:What is your fix for the problem, implemented in this PR?
I skip to warn with these cases.
TODO
write test code and consider to another cases.
Make sure the following tasks are checked