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

jrubyc broken for simple (self-executing) scripts in 9.1.7.0 #4472

Closed
the-michael-toy opened this Issue Feb 3, 2017 · 2 comments

Comments

Projects
None yet
3 participants
@the-michael-toy

the-michael-toy commented Feb 3, 2017

We found this because we wrote a test case for #4445 which failed when we were investigating the possibility of moving from 9.1.5.0 to 9.1.7.0. You can't run jrubyc on even a trivial source input without getting this error

% rvm uninstall --gems jruby-9.1.7.0
% rvm install jruby-9.1.7.0
% rvm use jruby-9.1.7.0
% echo "42" > 42.rb
% jrubyc 42.rb
TypeError: failed to coerce org.objectweb.asm.ClassWriter to org.jruby.org.objectweb.asm.ClassVisitor
  block in compile_files_with_options at /Users/mtoy/.rvm/rubies/jruby-9.1.7.0/lib/ruby/stdlib/jruby/compiler.rb:189
  block in compile_files_with_options at /Users/mtoy/.rvm/rubies/jruby-9.1.7.0/lib/ruby/stdlib/jruby/compiler.rb:297
                                 each at org/jruby/RubyArray.java:1733
           compile_files_with_options at /Users/mtoy/.rvm/rubies/jruby-9.1.7.0/lib/ruby/stdlib/jruby/compiler.rb:281
                         compile_argv at /Users/mtoy/.rvm/rubies/jruby-9.1.7.0/lib/ruby/stdlib/jruby/compiler.rb:94
                               <main> at /Users/mtoy/.rvm/rubies/jruby-9.1.7.0/bin/jrubyc:5
% jruby -e "puts RUBY_DESCRIPTION"
jruby 9.1.7.0 (2.3.1) 2017-01-11 68056ae Java HotSpot(TM) 64-Bit Server VM 25.112-b16 on 1.8.0_112-b16 +jit [darwin-x86_64]

@kares

This comment has been minimized.

Show comment
Hide comment
@kares

kares Feb 4, 2017

Member

hopefully not totally :) ... such simple self-executing scripts are less common to be jrubyc-iled.
but yeah this should be fixed and covered by the compiler specs.

Member

kares commented Feb 4, 2017

hopefully not totally :) ... such simple self-executing scripts are less common to be jrubyc-iled.
but yeah this should be fixed and covered by the compiler specs.

@kares kares added this to the JRuby 9.1.8.0 milestone Feb 4, 2017

@kares kares added the regression label Feb 4, 2017

@kares kares changed the title from Is jrubyc totally broken in 9.1.7.0? to jrubyc broken for simple (self-executing) scripts in 9.1.7.0 Feb 4, 2017

@headius

This comment has been minimized.

Show comment
Hide comment
@headius

headius Feb 8, 2017

Member

Delete lib/jruby-truffle.jar and this should work ok. It's picking up the non-shaded ASM classes from that jar.

JRuby 9.1.8.0 will no longer ship jruby-truffle, so this is fixed already.

Member

headius commented Feb 8, 2017

Delete lib/jruby-truffle.jar and this should work ok. It's picking up the non-shaded ASM classes from that jar.

JRuby 9.1.8.0 will no longer ship jruby-truffle, so this is fixed already.

@headius headius closed this Feb 8, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment