cannot load Java class org.mirah.DynalangBootstrap

9 views
Skip to first unread message

Daniel Sheppard

unread,
Jan 11, 2011, 10:23:42 PM1/11/11
to mi...@googlegroups.com

Looks like the class org.mirah.DynalangBootstrap is never compiled – a rake jar doesn’t touch it – perhaps it’s looking for .mirah files in that dir and ignoring the .java.

 

The rake gem task also seems to want some sort of wonky directory structure. I got it to build the first time by touching pkg/mirah-0.0.6.dev-java, but on subsequent builds it started complaining that it wanted that to be a directory, so I symlinked it to the root directory of my mirah clone – it runs again, but it puts the gem file in the parent directory.

 

Lastly, the compile task in mirah_task.rb is inconsistent in the use of expand_path so that it ended up looking in the wrong location for source files. Making the following change got it to mirah_task:

 

diff --git a/lib/mirah_task.rb b/lib/mirah_task.rb

index de061f6..df286fc 100644

--- a/lib/mirah_task.rb

+++ b/lib/mirah_task.rb

@@ -98,7 +98,7 @@ def mirahc(*files)

   end

   source_dir = options.fetch(:dir, Mirah.source_path)

   dest = File.expand_path(options.fetch(:dest, Mirah.dest_path))

-  files = files.map {|f| f.sub(/^#{source_dir}\//, '')}

+  files = files.map {|f| File.expand_path(f).sub(/^#{source_dir}\//, '')}

   flags = options.fetch(:options, Mirah.compiler_options)

   args = ['-d', dest, *flags] + files

   chdir(source_dir) do

Daniel Sheppard

unread,
Jan 11, 2011, 10:56:49 PM1/11/11
to mi...@googlegroups.com
Ah, I see the issue with DynalangBootstrap - it's relying on the java7 invokedynamic code, so it's not going to compile on java6.

Charles Oliver Nutter

unread,
Jan 12, 2011, 12:21:53 AM1/12/11
to mi...@googlegroups.com
Yeah, I'm hoping to revisit that now that invoekdynamic has started to
settle a bit. I think adding dynamic types to Mirah is a worthwhile
feature.

John Woodell

unread,
Jan 12, 2011, 12:28:18 AM1/12/11
to mi...@googlegroups.com
Can we wait until dynamic types settles completely?

I like to see open classes.  :-)
Reply all
Reply to author
Forward
0 new messages