jruby-gradle / jruby-gradle-storm-plugin

JRuby Gradle plugin to manage creating Storm topology jars
MIT License
1 stars 3 forks source link

Gradle 2.2 cannot call super.getJrubyVersion() properly #26

Closed rtyler closed 9 years ago

rtyler commented 9 years ago

Working with the pre-release version of 0.4.0, and this line doesn't seem to want to cooperate

@ysb33r this ring any bells? :/

Caused by: groovy.lang.MissingMethodException: No signature of method: com.github.jrubygradle.storm.internal.JRubyStormJar_Decorated.getJrubyVersion() is applicable for argument types: () values: []
Possible solutions: getJrubyVersion(), getJrubyVersion(), getJrubyVersion(), jrubyVersion(java.lang.String), getVersion(), getJrubyMainsVersion()
        at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:55)
        at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:130)
        at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuper0(ScriptBytecodeAdapter.java:148)
        at com.github.jrubygradle.storm.internal.JRubyStormJar.getJrubyVersion(JRubyStormJar.groovy:24)
        at com.github.jrubygradle.storm.internal.JRubyStormJar_Decorated.getJrubyVersion(Unknown Source)
        at com.github.jrubygradle.jar.JRubyJar.addJRubyDependency(JRubyJar.groovy:209)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
ysb33r commented 9 years ago

First guess would be that you compiled for a post 2.4 gradle version and was trying to run against and older version.

rtyler commented 9 years ago

@ysb33r oh brother, I didn't realize there was any fundamental differences in generated output for Groovy 2.x versions.

Aside from just adding the compile time dependency to the right version of Groovy in a build.gradle is there any other means of pinning that version?

I should note that this issue only manifests on Gradle 2.2, not 2.0, 2.4 or 2.6

ysb33r commented 9 years ago

Gradle 2.2 is indeed the culprit. There was binary change in the Jar class when they moved it from a Groovy implementation to a Java one. It was corrected in a subequent release, but 2.2 remains an issue.

rtyler commented 9 years ago

@ysb33r Bugger; I think the best course of action is to work around the issue and now call super on the property, does that make sense to you?

ysb33r commented 9 years ago

If that solves it, so be it. Pragmatism before purism.