You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
JRuby pre-9.1.5.0 master on any JVM (I would expect).
Expected Behavior
JRuby should be able to generate and bundle a Rails app with -X+C specified.
Actual Behavior
Instead, it blows up inside bundle install with the following output:
...
run bundle install
Fetching gem metadata from https://rubygems.org/Retrying fetcher due to error (2/4): Java::JavaLangInvoke::WrongMethodTypeException expected (ThreadContext,StaticScope,IRubyObject,IRubyObject[],Block,Block,Block)IRubyObject but found (ThreadContext,StaticScope,IRubyObject,IRubyObject[],Block,RubyModule,String)IRubyObject
Retrying fetcher due to error (3/4): Java::JavaLangInvoke::WrongMethodTypeException expected (ThreadContext,StaticScope,IRubyObject,IRubyObject[],Block,Block,Block)IRubyObject but found (ThreadContext,StaticScope,IRubyObject,IRubyObject[],Block,RubyModule,String)IRubyObject
Retrying fetcher due to error (4/4): Java::JavaLangInvoke::WrongMethodTypeException expected (ThreadContext,StaticScope,IRubyObject,IRubyObject[],Block,Block,Block)IRubyObject but found (ThreadContext,StaticScope,IRubyObject,IRubyObject[],Block,RubyModule,String)IRubyObject
--- ERROR REPORT TEMPLATE -------------------------------------------------------
- What did you do?
I ran the command `/Users/headius/projects/jruby/lib/ruby/gems/shared/gems/bundler-1.12.5/exe/bundle install`
- What did you expect to happen?
I expected Bundler to...
- What happened instead?
Instead, what actually happened was...
Error details
Java::JavaLangInvoke::WrongMethodTypeException: expected (ThreadContext,StaticScope,IRubyObject,IRubyObject[],Block,Block,Block)IRubyObject but found (ThreadContext,StaticScope,IRubyObject,IRubyObject[],Block,RubyModule,String)IRubyObject
java.lang.invoke.Invokers.newWrongMethodTypeException(Invokers.java:298)
java.lang.invoke.Invokers.checkExactType(Invokers.java:309)
org.jruby.internal.runtime.methods.CompiledIRMethod.invokeExact(CompiledIRMethod.java:210)
org.jruby.internal.runtime.methods.CompiledIRMethod.call(CompiledIRMethod.java:88)
org.jruby.internal.runtime.methods.CompiledIRMethod.call(CompiledIRMethod.java:113)
org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:198)
org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:205)
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:193)
Users.headius.projects.jruby.lib.ruby.gems.shared.gems.bundler_minus_1_dot_12_dot_5.lib.bundler.endpoint_specification.invokeOther0:build_dependency(/Users/headius/projects/jruby/lib/ruby/gems/shared/gems/bundler-1.12.5/lib/bundler/endpoint_specification.rb:15)
Users.headius.projects.jruby.lib.ruby.gems.shared.gems.bundler_minus_1_dot_12_dot_5.lib.bundler.endpoint_specification.RUBY$block$initialize$0(/Users/headius/projects/jruby/lib/ruby/gems/shared/gems/bundler-1.12.5/lib/bundler/endpoint_specification.rb:15)
...
It appears a method is not getting bound using CompiledIRMethod + indy handles properly. The method in question (from bundler's endpoint_specification.rb:15) looks like this...pretty mundane method signature etc:
defbuild_dependency(name, *requirements)Gem::Dependency.new(name, *requirements)rescueArgumentError=>eraiseunlesse.message.include?(ILLFORMED_MESSAGE)puts# we shouldn't print the error message on the "fetching info" status lineraiseGemspecError,"Unfortunately, the gem #{name} (#{version}) has an invalid " \
"gemspec.\nPlease ask the gem author to yank the bad version to fix " \
"this issue. For more information, see http://bit.ly/syck-defaultkey."end
The text was updated successfully, but these errors were encountered:
Ok, this appears to be a Graal error. If I run on OpenJDK 7 or 8 it works fine, but on Graal at some point an indy method handle's signature gets mangled to have three "Block" arguments instead of Block, RubyModule, String.
I tracked it down to JVMVisitor.signatureFor, which uses invokebinder to build up a Signature object.
I logged the body name, METHOD_SIGNATURE_BASE, and the insertArgs modified version of it, which looks like this:
The only method-type modification that happens inside Signature.insertArgs is MethodType.insertParameterTypes, so it seems like that's busted on Graal 0.15.
@thomaswue Would you prefer I move this to the Graal issue tracker?
Environment
JRuby pre-9.1.5.0 master on any JVM (I would expect).
Expected Behavior
JRuby should be able to generate and bundle a Rails app with -X+C specified.
Actual Behavior
Instead, it blows up inside bundle install with the following output:
It appears a method is not getting bound using CompiledIRMethod + indy handles properly. The method in question (from bundler's endpoint_specification.rb:15) looks like this...pretty mundane method signature etc:
The text was updated successfully, but these errors were encountered: