Regression in compiling with default 1.8 mode #1679

Closed
BanzaiMan opened this Issue May 4, 2014 · 9 comments

Projects

None yet

3 participants

@BanzaiMan
Member

When RVM installs JRuby with a non-default language mode (e.g., 1.8), it runs mvn with -Djruby.default.ruby.version=1.8.

This worked well for JRuby 1.7.11, but this no longer works with 1.7.12 release.

The failure looks like this (I removed irrelevant output while maven downloads the Internets):

mvn -Djruby.default.ruby.version=1.8
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] JRuby
[INFO] JRuby Core
[INFO] JRuby Ext
[INFO] JRuby OpenSSL
[INFO] JRuby Readline
[INFO] JRuby Ripper
[INFO] JRuby Lib Setup
[INFO]



[INFO]
[INFO] --- tesla-polyglot-maven-plugin:0.0.9:execute (install_gems) @ jruby-lib ---
NoMethodError: undefined method `match' for :clean:Symbol
    plugin_gav at file:/home/travis/.m2/repository/de/saumya/mojo/maven-tools/0.34.2/maven-tools-0.34.2.jar!/maven/tools/dsl.rb:643
        plugin at file:/home/travis/.m2/repository/de/saumya/mojo/maven-tools/0.34.2/maven-tools-0.34.2.jar!/maven/tools/dsl.rb:666
      eval_pom at (eval):39
          call at org/jruby/RubyProc.java:290
          call at org/jruby/RubyProc.java:224
  nested_block at file:/home/travis/.m2/repository/de/saumya/mojo/maven-tools/0.34.2/maven-tools-0.34.2.jar!/maven/tools/dsl.rb:1084
       project at file:/home/travis/.m2/repository/de/saumya/mojo/maven-tools/0.34.2/maven-tools-0.34.2.jar!/maven/tools/dsl.rb:347
      eval_pom at (eval):18
          call at org/jruby/RubyProc.java:290
          call at org/jruby/RubyProc.java:224
  nested_block at file:/home/travis/.m2/repository/de/saumya/mojo/maven-tools/0.34.2/maven-tools-0.34.2.jar!/maven/tools/dsl.rb:1084
         tesla at file:/home/travis/.m2/repository/de/saumya/mojo/maven-tools/0.34.2/maven-tools-0.34.2.jar!/maven/tools/dsl.rb:19
      eval_pom at (eval):1
          eval at org/jruby/RubyKernel.java:1096
      eval_pom at file:/home/travis/.m2/repository/de/saumya/mojo/maven-tools/0.34.2/maven-tools-0.34.2.jar!/maven/tools/dsl.rb:50
         parse at parser.rb:52
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] JRuby ............................................. SUCCESS [  0.674 s]
[INFO] JRuby Core ........................................ SUCCESS [ 23.993 s]
[INFO] JRuby Ext ......................................... SUCCESS [  0.004 s]
[INFO] JRuby OpenSSL ..................................... SUCCESS [  1.022 s]
[INFO] JRuby Readline .................................... SUCCESS [  0.122 s]
[INFO] JRuby Ripper ...................................... SUCCESS [  0.288 s]
[INFO] JRuby Lib Setup ................................... FAILURE [ 17.206 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 44.052 s
[INFO] Finished at: 2014-05-04T04:43:02+00:00
[INFO] Final Memory: 32M/224M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal io.tesla.polyglot:tesla-polyglot-maven-plugin:0.0.9:execute (install_gems) on project jruby-lib: Execution install_gems of goal io.tesla.polyglot:tesla-polyglot-maven-plugin:0.0.9:execute failed: (NoMethodError) undefined method `match' for :clean:Symbol -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :jruby-lib
@BanzaiMan BanzaiMan added the ruby 1.8 label May 4, 2014
@mkristian mkristian was assigned by BanzaiMan May 4, 2014
@BanzaiMan
Member

bisect says 7b2d512 is the bad one.

7b2d5120053afd6d333ecba36d196a7be49d5563 is the first bad commit
commit 7b2d5120053afd6d333ecba36d196a7be49d5563
Author: Christian Meier <m.kristian@web.de>
Date:   Wed Mar 12 09:59:09 2014 +0000

    install default gems on the fly

:040000 040000 0cc00b6c172442ae485a2de3d6c2bf35f32e04a3 3f7bc008aa256b65fc06cf7b8fc3aecefdc14acb M      ext
:040000 040000 82430ae31f0d96226134f37868361be8f38aad1a 117eb9ef9e64bfbc9280d06ba0ac72683e535b44 M      lib
:040000 040000 33eb46402f5245dab4998a5c88df15a1303c8068 aae808c5bdc9472a38a1563d49daf0451eb1919c M      maven
:100644 100644 e04adc26dfe903892b2d9ba901344e2a0051fc4e dc3c95ad2f81bc464aec736dd220056803f8d4e4 M      pom.xml
@BanzaiMan
Member

Hmm. That looks like the commit that introduced dependency on tesla-polyglot-maven-plugin.

Currently, error is thrown from https://github.com/torquebox/maven-tools/blob/0.34.2/lib/maven/tools/dsl.rb#L643 but I think the real problem is the invocation of plugin with a symbol (like this).

@BanzaiMan BanzaiMan added this to the JRuby 1.7.13 milestone May 4, 2014
@enebo
Member
enebo commented May 4, 2014

@mkristian already knows about this and is working on a fix for it. I should have opened an issue on this :) You were not the only person to notice this.

@mkristian
Member

fixed on jruby-1_7 branch (43ee988 and e49e6da)

the maven-tools does not work with 1.8 anymore and when using it inside the tesla-polyglot-maven-plugin it will now set the compat version explicitly to 1.9

it is really the fact that the build uses the jruby from the build at that point and this jruby was compile with 1.8 compat as default. so relying on the default was the problem ;)

@mkristian mkristian closed this May 5, 2014
@mkristian
Member

@enebo travis was almost green after I finally compiled the plugin with jdk6. so on my side nothing more to do . . . beside releasing the plugin to maven-central

@BanzaiMan
Member

@enebo Do you have a release date for 1.7.13? Travis CI can't use 1.7.12 because of this issue.

@enebo
Member
enebo commented May 5, 2014

@BanzaiMan not for a couple of weeks. I think you could probably just make a branch and apply only this fix if you want to put out 1.7.12. I believe this is only a pom update,

@mkristian
Member

@BanzaiMan yes, just look at those two commit I referenced above: pom.xml + lib/pom.xml

@BanzaiMan
Member

I created the tag 1.7.12-d18 based on 1.7.12 with just those two commits cherry-picked (and squashed). https://github.com/jruby/jruby/tree/1.7.12-d18

@BanzaiMan BanzaiMan referenced this issue in travis-ci/travis-ci May 5, 2014
Closed

JRuby 1.7.12 and 1.8 mode #2264

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