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

Macros broken with jruby-1.6.4 #144

Closed
abscondment opened this Issue Sep 4, 2011 · 10 comments

Comments

Projects
None yet
3 participants
@abscondment
Contributor

abscondment commented Sep 4, 2011

1.6.3

brendan@ishmael:~/code/mirah$ ruby -v
jruby 1.6.3 (ruby-1.8.7-p330) (2011-07-07 965162f) (OpenJDK 64-Bit Server VM 1.6.0_22) [linux-amd64-java]
brendan@ishmael:~/code/mirah$ mirahc -v
Mirah v0.0.8

[snip]

brendan@ishmael:~/code/mirah$ mirahc square.mirah 
Parsing...
  square.mirah
Inferring types...
Warning: No ClassDefinition for Square. Macros can't be loaded from disk.
Compiling...
  square.mirah
Done!

1.6.4

brendan@ishmael:~/code/mirah$ ruby -v
jruby 1.6.4 (ruby-1.8.7-p330) (2011-08-23 17ea768) (OpenJDK 64-Bit Server VM 1.6.0_22) [linux-amd64-java]
brendan@ishmael:~/code/mirah$ mirahc -v
Mirah v0.0.8

[snip]

brendan@ishmael:~/code/mirah$ mirahc square.mirah 
Parsing...
  square.mirah
Inferring types...
Warning: No ClassDefinition for Square. Macros can't be loaded from disk.
square.mirah:26: java.lang.ClassNotFoundException: Square$Extension1$
puts sqrt '4'       # => 2
    ^^^^^^^^^
Mirah::InternalCompilerError: java.lang.ClassNotFoundException: Square$Extension1$
         infer at /home/brendan/.rvm/gems/jruby-1.6.4/gems/mirah-0.0.8-java/lib/mirah/typer/simple.rb:280
         infer at /home/brendan/.rvm/gems/jruby-1.6.4/gems/mirah-0.0.8-java/lib/mirah/typer/simple.rb:275
       resolve at /home/brendan/.rvm/gems/jruby-1.6.4/gems/mirah-0.0.8-java/lib/mirah/typer/simple.rb:324
          each at org/jruby/RubyHash.java:1170
       resolve at /home/brendan/.rvm/gems/jruby-1.6.4/gems/mirah-0.0.8-java/lib/mirah/typer/simple.rb:322
         cycle at /home/brendan/.rvm/gems/jruby-1.6.4/gems/mirah-0.0.8-java/lib/mirah/typer/simple.rb:236
         times at org/jruby/RubyFixnum.java:256
         cycle at /home/brendan/.rvm/gems/jruby-1.6.4/gems/mirah-0.0.8-java/lib/mirah/typer/simple.rb:233
       resolve at /home/brendan/.rvm/gems/jruby-1.6.4/gems/mirah-0.0.8-java/lib/mirah/typer/simple.rb:319
    infer_asts at /home/brendan/.rvm/gems/jruby-1.6.4/gems/mirah-0.0.8-java/lib/mirah/generator.rb:49
      generate at /home/brendan/.rvm/gems/jruby-1.6.4/gems/mirah-0.0.8-java/lib/mirah/generator.rb:35
       execute at /home/brendan/.rvm/gems/jruby-1.6.4/gems/mirah-0.0.8-java/lib/mirah/commands/compile.rb:26
  execute_base at /home/brendan/.rvm/gems/jruby-1.6.4/gems/mirah-0.0.8-java/lib/mirah/commands/base.rb:41
         catch at org/jruby/RubyKernel.java:1191
  execute_base at /home/brendan/.rvm/gems/jruby-1.6.4/gems/mirah-0.0.8-java/lib/mirah/commands/base.rb:38
       execute at /home/brendan/.rvm/gems/jruby-1.6.4/gems/mirah-0.0.8-java/lib/mirah/commands/compile.rb:23
       compile at /home/brendan/.rvm/gems/jruby-1.6.4/gems/mirah-0.0.8-java/lib/mirah.rb:40
        (root) at /home/brendan/.rvm/gems/jruby-1.6.4/gems/mirah-0.0.8-java/bin/mirahc:27
          load at org/jruby/RubyKernel.java:1063
        (root) at /home/brendan/.rvm/gems/jruby-1.6.4/bin/mirahc:19
brendan@ishmael:~/code/mirah$ 
@abscondment

This comment has been minimized.

Show comment
Hide comment
@abscondment

abscondment Sep 4, 2011

Contributor

Also:

brendan@ishmael:~/code/mirah$ ls *.class
[snip]
-rw-r--r-- 1 brendan brendan 4.8K 2011-09-03 18:38 Square$Extension1.class

Is that trailing $ the just an extra, bad char? Or is that actually how we'd refer to Square$Extension1.class?

Contributor

abscondment commented Sep 4, 2011

Also:

brendan@ishmael:~/code/mirah$ ls *.class
[snip]
-rw-r--r-- 1 brendan brendan 4.8K 2011-09-03 18:38 Square$Extension1.class

Is that trailing $ the just an extra, bad char? Or is that actually how we'd refer to Square$Extension1.class?

@baroquebobcat

This comment has been minimized.

Show comment
Hide comment
@baroquebobcat

baroquebobcat Sep 4, 2011

Member

Hmm. I'm going to look into it this afternoon.

Member

baroquebobcat commented Sep 4, 2011

Hmm. I'm going to look into it this afternoon.

@baroquebobcat

This comment has been minimized.

Show comment
Hide comment
@baroquebobcat

baroquebobcat Sep 4, 2011

Member

I'm still able to reproduce it with JRuby HEAD.

Member

baroquebobcat commented Sep 4, 2011

I'm still able to reproduce it with JRuby HEAD.

@baroquebobcat

This comment has been minimized.

Show comment
Hide comment
@baroquebobcat

baroquebobcat Sep 4, 2011

Member

@headius, do you have any thoughts?

Member

baroquebobcat commented Sep 4, 2011

@headius, do you have any thoughts?

@baroquebobcat

This comment has been minimized.

Show comment
Hide comment
@baroquebobcat

baroquebobcat Sep 6, 2011

Member

after digging into this a bit, it looks like this change in JRuby is at least partially responsible. jruby/jruby@1.6.3...1.6.4diff-156

when I revert the catch blocks back to catch(Exception e), I no longer get that particular error--I get a different one.

Member

baroquebobcat commented Sep 6, 2011

after digging into this a bit, it looks like this change in JRuby is at least partially responsible. jruby/jruby@1.6.3...1.6.4diff-156

when I revert the catch blocks back to catch(Exception e), I no longer get that particular error--I get a different one.

@abscondment

This comment has been minimized.

Show comment
Hide comment
@abscondment

abscondment Sep 6, 2011

Contributor

git bisect on jruby points to this commit:

jruby/jruby@3c6a6a2

Think I should open the bug up over there?

Contributor

abscondment commented Sep 6, 2011

git bisect on jruby points to this commit:

jruby/jruby@3c6a6a2

Think I should open the bug up over there?

@abscondment

This comment has been minimized.

Show comment
Hide comment
@abscondment

abscondment Sep 6, 2011

Contributor

also, helpful for testing this: https://gist.github.com/1198458

Contributor

abscondment commented Sep 6, 2011

also, helpful for testing this: https://gist.github.com/1198458

@headius

This comment has been minimized.

Show comment
Hide comment
@headius

headius Sep 6, 2011

Member

I will look into this today. Let's call it a JRuby bug. Can someone reopen it there?

Member

headius commented Sep 6, 2011

I will look into this today. Let's call it a JRuby bug. Can someone reopen it there?

@headius headius closed this Sep 6, 2011

@abscondment

This comment has been minimized.

Show comment
Hide comment
@abscondment

abscondment Sep 6, 2011

Contributor

Will do.

On Tue, Sep 6, 2011 at 11:10 AM, headius
reply@reply.github.com
wrote:

I will look into this today. Let's call it a JRuby bug. Can someone reopen it there?

Reply to this email directly or view it on GitHub:
#144 (comment)

Contributor

abscondment commented Sep 6, 2011

Will do.

On Tue, Sep 6, 2011 at 11:10 AM, headius
reply@reply.github.com
wrote:

I will look into this today. Let's call it a JRuby bug. Can someone reopen it there?

Reply to this email directly or view it on GitHub:
#144 (comment)

@abscondment

This comment has been minimized.

Show comment
Hide comment
Contributor

abscondment commented Sep 6, 2011

baroquebobcat added a commit to baroquebobcat/mirah that referenced this issue Nov 20, 2011

use self hosted classloader fixes #144
add a self hosted class loader to work around JRuby 1.6.4's behavior
use a workaround for Java's String encoding behavior
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment