These are chat archives for jruby-gradle/jruby-gradle-plugin

11th
Apr 2016
Christian Meier
@mkristian
Apr 11 2016 08:33
@ysb33r I also realized that I can not pick an update jar-dependencies gem for my application but need to use the one from jruby-gradle-plugin. and this could actually the problem with the ScriptingContainer if I remember the backtraces from yesterday correctly
Schalk W. Cronjé
@ysb33r
Apr 11 2016 10:16
@mkristian Let me work through these things one at a time.
Schalk W. Cronjé
@ysb33r
Apr 11 2016 10:47
@mkristian Any idea how to change the listen port for a sinatra app?
Christian Meier
@mkristian
Apr 11 2016 10:47
quick guess -p 1234 on the command line
Schalk W. Cronjé
@ysb33r
Apr 11 2016 10:48
OK I’ll try that
Schalk W. Cronjé
@ysb33r
Apr 11 2016 16:18
Hey that works
R. Tyler Croy
@rtyler
Apr 11 2016 16:24
moin
Christian Meier
@mkristian
Apr 11 2016 16:24
moinmoin
Schalk W. Cronjé
@ysb33r
Apr 11 2016 16:39
moinmoinmoin
“moin” * 3 (in Groovy)
Christian Meier
@mkristian
Apr 11 2016 16:40
"moin" * 4 (in ruby)
Schalk W. Cronjé
@ysb33r
Apr 11 2016 17:10
@mkristian what is the problem with the jar-dependencies that you mentioned earlier?
Christian Meier
@mkristian
Apr 11 2016 17:12
let say the latest is 0.3.2 and we are using 0.1.5 so there are probably a few things improved by now. one thing is to look for the jars - yesterday I saw an error not finding a jar coming inside jruby-complete.jar which is not suppose to happen. and I suspect jar-dependencies-0.1.5 not looking at the right places
something I just saw with ScriptingContainer
Schalk W. Cronjé
@ysb33r
Apr 11 2016 17:13
where to we set the version for jar-dependencies?
Christian Meier
@mkristian
Apr 11 2016 17:17
still looking
R. Tyler Croy
@rtyler
Apr 11 2016 17:20
@mkristian isn't 0.1.5 really really old?
Christian Meier
@mkristian
Apr 11 2016 17:20
yes it is really really old
Schalk W. Cronjé
@ysb33r
Apr 11 2016 17:25
mmm.. I think this code is wrong
        if (version.startsWith('1.7.1')) {
            project.dependencies.add(configuration,
                    "rubygems:jar-dependencies:${JAR_DEPENDENCIES_VERSION}")
        }
THat is going to fail for jruby 9k
Christian Meier
@mkristian
Apr 11 2016 17:26
jruby comes with jar-dependencies as default gem. after 1.7.20+ at least
Schalk W. Cronjé
@ysb33r
Apr 11 2016 17:26
or is it only meant to be loaded for 1.7.1 versions ?
R. Tyler Croy
@rtyler
Apr 11 2016 17:26
:+1:
Schalk W. Cronjé
@ysb33r
Apr 11 2016 17:26
ah
I take it back: That code is good!
Christian Meier
@mkristian
Apr 11 2016 17:27
so I am not sure why I did see this 0.1.15 and was not able to pick a newer version
it was the aws project where I did see this 0.1.15 which uses jruby-9.0.5.0 - strange
Schalk W. Cronjé
@ysb33r
Apr 11 2016 17:29

looking at the dependencies of my project I can see that

jrubyJar
\--- rubygems:jar-dependencies:0.1.15

(also listed under gems)

R. Tyler Croy
@rtyler
Apr 11 2016 17:30
which jruby are you using?
Schalk W. Cronjé
@ysb33r
Apr 11 2016 17:30
iI am forcing 9.0.5.0
Christian Meier
@mkristian
Apr 11 2016 17:30
yes, the same on this aws project under jrubyJar
this means we downgrading jar-dependencies to 0.1.15 on jruby-9.0.5.0 :P
R. Tyler Croy
@rtyler
Apr 11 2016 17:32
eeeep
that's no good
Schalk W. Cronjé
@ysb33r
Apr 11 2016 17:32
but it is not listed as a transitive
jrubyJarEmbeds-997770883
+--- org.jruby:jruby-complete:9.0.5.0
\--- org.jruby.mains:jruby-mains:0.5.0
Christian Meier
@mkristian
Apr 11 2016 17:34
jruby-complete has the complete gem inside its stdlib ruby files. but I wonder how this gem gets under jrubyJar
Schalk W. Cronjé
@ysb33r
Apr 11 2016 17:36
JRubyExecUtils
or to be precise JRubyExecUtils.JAR_DEPENDENCIES_VERSION
Christian Meier
@mkristian
Apr 11 2016 17:37
but this one is guarded with this version check
Schalk W. Cronjé
@ysb33r
Apr 11 2016 17:37
not necessarily
Christian Meier
@mkristian
Apr 11 2016 17:37
./jruby-gradle-jar-plugin/src/main/groovy/com/github/jrubygradle/jar/JRubyJar.groovy: project.dependencies.add(config.name, 'rubygems:jar-dependencies:0.1.15')
that is the culprit I think
not even using our JAR_DEPENDENCIES_VERSION
Schalk W. Cronjé
@ysb33r
Apr 11 2016 17:39

we have

static final String JAR_DEPENDENCIES_VERSION = ‘0.1.15’

into JRubyExecUtils and then we have in JRubyExec

    static String jarDependenciesGemLibPath(File gemDir) {
        new File(gemDir, "gems/jar-dependencies-${JRubyExecUtils.JAR_DEPENDENCIES_VERSION}/lib").absolutePath
    }

OK plus that one you’ve just shown - multiple failings really.

Schalk W. Cronjé
@ysb33r
Apr 11 2016 18:03
I’ll raise an issue for this
@mkristian do you have a copy of my Idiomatic Gradle book?
Schalk W. Cronjé
@ysb33r
Apr 11 2016 18:10
#270 has been raised
Christian Meier
@mkristian
Apr 11 2016 18:39
thanks