You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by "Victor Hugo Borja (JIRA)" <ji...@apache.org> on 2008/01/16 16:28:35 UTC

[jira] Updated: (BUILDR-3) Buildr being usable on JRuby

     [ https://issues.apache.org/jira/browse/BUILDR-3?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Victor Hugo Borja updated BUILDR-3:
-----------------------------------

    Attachment: 0001-More-JRuby-1.1RC1-integration-changes-for-buildr-1.patch

Thanks Assaf, these last changes helped a lot.

Here's a patch to get buildr HEAD running with JRuby 1.1RC1, of course, you can expect more patches to come.  

For anyone interested in running the specs under jruby, install JRuby 1.1RC and add JRUBY_HOME/bin to your PATH, make sure you have the buildr required gems installed on jruby and finally execute the specs:

    jruby -S spec spec/compile_spec.rb

Running compile_spec.rb  from HEAD using MRI results on:  111 examples, 26 failures, 1 pending
with this patch applied:
running compile_spec using MRI :       111 examples, 26 failures, 1 pending
running compile_spec using JRuby:    111 examples, 13 failures, 1 pending

>Major change alert. I decided to dump JavaWrapper, and go with the JRuby import style, so:
>
>Java.java.lang.String

Good!, although I hope we can later remove those now deprecated Java.java and friends. Having them still around causes any
call to "java.lang" or "::Java.lang" to try executing the java tool. As a workaround I've used Kernel.java on the attached patch to actually let JRuby do the work. 

>I did not add the RubyZip patch yet, and can't get the test cases to pass yet.
Good news on this one, I think we may not need the RubyZip changes from my previous patches. packaging_spec.rb runs flawlessly on JRuby, and archive_spec.rb reports only 1 failure which seems to be a JRuby bug with mtime.

      vic@odam ~/hk/buildr$ jruby -S spec spec/archive_spec.rb
       .......................................................................................................F..........
      
      1)
      'Buildr::Unzip should touch target directory' FAILED
      expected Wed Jan 16 15:21:36 UTC 2008 +/- (< 5), got Thu Jan 01 00:00:00 UTC 1970
      /home/vic/hk/buildr/./spec/archive_spec.rb:331:
      /home/vic/hk/buildr/./spec/archive_spec.rb:326:in `instance_eval'
      file:/home/vic/tmp/buildrJtestR/jruby-1.1RC1/lib/jruby.jar!/jruby/commands.rb:14
      :in `load'
      file:/home/vic/tmp/buildrJtestR/jruby-1.1RC1/lib/jruby.jar!/jruby/commands.rb:14
      :in `spec'
      file:/home/vic/tmp/buildrJtestR/jruby-1.1RC1/lib/jruby.jar!/jruby/commands.rb:11
      
      Finished in 11.619 seconds

      114 examples, 1 failure

Assaf, I'd really appreciate if you can help me to get compile_spec to pass all examples. 

Have a good day!


> Buildr being usable on JRuby
> ----------------------------
>
>                 Key: BUILDR-3
>                 URL: https://issues.apache.org/jira/browse/BUILDR-3
>             Project: Buildr
>          Issue Type: New Feature
>         Environment: JDK 1.6. 
> JRuby SNAPSHOT: jruby-complete-1.1-20071211.100054-17
>            Reporter: Victor Hugo Borja
>            Assignee: Assaf Arkin
>         Attachments: 0001-BuildR-is-usable-in-JRuby.patch, 0001-More-JRuby-1.1RC1-integration-changes-for-buildr-1.patch, 0002-Use-RubyString.to_java_bytes-instead-of-unpacking-th.patch
>
>
> Attached patch makes buildr-HEAD usable on JRuby. See the patch changelog for details.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.