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

22nd
Sep 2015
R. Tyler Croy
@rtyler
Sep 22 2015 00:48
@mkristian it looks like trying to incorporate jem with its shrinkwrap dependency causes all sorts of fun classloader issues
Christian Meier
@mkristian
Sep 22 2015 06:05
yeh, gradle does also some classloader magic under the hood, magic + magic = chaos
Christian Meier
@mkristian
Sep 22 2015 08:51
@rtyler I thought the ShrinkWrapClassloader is not used anymore since you really just need to untar nested tar files, i.e. there is no need for classloaders.
R. Tyler Croy
@rtyler
Sep 22 2015 11:29
i'll have to take a looksee
testing this is kind of a PITA
I feel your pain around jetty now :)
R. Tyler Croy
@rtyler
Sep 22 2015 11:50
@mkristian there's nothing classloader happening as far as jem is concerned other than the creation of the GenericArchive class
so this must be the default classloader setup for ShrinkWrap, will have to find a way around it
R. Tyler Croy
@rtyler
Sep 22 2015 12:55
@aslakknutsen ping!
rtyler @rtyler wonders if this will work
Christian Meier
@mkristian
Sep 22 2015 12:56
@rtyler for your info the nexus-ruby-tools needs to run inside an OSGi container. probably a bad idea to fiddle with classloaders also thinking about j2ee context.
R. Tyler Croy
@rtyler
Sep 22 2015 12:57
well, I'm not explicitly fiddling with classloaders :P
it's just doing it on its own!
shrinkwrapped ghosts!
Christian Meier
@mkristian
Sep 22 2015 12:58
I know - just needed to say it :)
R. Tyler Croy
@rtyler
Sep 22 2015 12:59
@mkristian do you know of a good pmd ruleset to use?
Christian Meier
@mkristian
Sep 22 2015 12:59
pdm = ?
pmd = ?
R. Tyler Croy
@rtyler
Sep 22 2015 12:59
lmgtfy.com :P
Christian Meier
@mkristian
Sep 22 2015 13:01
R. Tyler Croy
@rtyler
Sep 22 2015 13:01
hah
Christian Meier
@mkristian
Sep 22 2015 13:02
you have already some "find bugs" kind of thing in jruby-gradle-plugin build
R. Tyler Croy
@rtyler
Sep 22 2015 13:02
codenarc yes
I'm looking at pmd for java code, in jem
Christian Meier
@mkristian
Sep 22 2015 13:03
findbugs has ant, maven plugins and can run standalone
R. Tyler Croy
@rtyler
Sep 22 2015 13:03
gradle also has a findbugs plugin that could be applied
they don't ship a good default ruleset for either tool though
which sucks
Christian Meier
@mkristian
Sep 22 2015 13:04
hmm https://pmd.github.io/ misses the gradle plugin I would say
Christian Meier
@mkristian
Sep 22 2015 13:05
so you are just looking for a "good" ruleset ?
no idea then
R. Tyler Croy
@rtyler
Sep 22 2015 13:09
gargh, chrome keeps fucking up my mouse behavior
that was a foolish update
rtyler @rtyler sighs
R. Tyler Croy
@rtyler
Sep 22 2015 13:50
@mkristian from your experience, is using ClassLoader.getSystemClassLoader() the right thing to use inside of Gradle?
Christian Meier
@mkristian
Sep 22 2015 13:52
it gets you the system classloader - depends on what you want to do with this.
I think it has the bootstrap classloader as parent
Christian Meier
@mkristian
Sep 22 2015 13:59
actually that is better then what I did for jetty where I used an instance of classlaoder to get the SystemClassLoader
R. Tyler Croy
@rtyler
Sep 22 2015 14:16
@mkristian take a look at this function
I'm trying to figure out how this would end up using "the wrong classloader" when under Gradle
I'm also trying to figure out if there's an easy way to just skip the extension loading shit
Christian Meier
@mkristian
Sep 22 2015 14:21
I really do not know what gradle does with classloaders - all I know it does a lot with its classloaders. my idea with jetty was to just keep gradle alone as much as possible - it did not work for testing without extra code.
not doing all this classloader magic is probably the best choice if possible
rtyler @rtyler nods
R. Tyler Croy
@rtyler
Sep 22 2015 14:24
asking around, we'll see if I can avoid this :/
Christian Meier
@mkristian
Sep 22 2015 14:28
it is just about tar files, etc then there are alternatives: http://commons.apache.org/proper/commons-compress/
R. Tyler Croy
@rtyler
Sep 22 2015 14:29
I went down that road already, that's missing functionality that I need to do everything in memory
Christian Meier
@mkristian
Sep 22 2015 14:29
ok
R. Tyler Croy
@rtyler
Sep 22 2015 14:30
shrinkwrap is a good library IMO, just a weird classloader anachronism with gradle :(
R. Tyler Croy
@rtyler
Sep 22 2015 16:13
j/win2
derp
Christian Meier
@mkristian
Sep 22 2015 16:17
?
R. Tyler Croy
@rtyler
Sep 22 2015 16:21
accidentally typed in the wrong window
@mkristian have you looked at doing .jrubydir generation natively in Groovy? perhaps I'll do that while I wait on developers to answer my stupid shrinkwrap questions
Christian Meier
@mkristian
Sep 22 2015 16:23
no I did not look into this
but there is one place in the base plugin and one in jar plugin
the latter does it already in groovy but can be faulty
R. Tyler Croy
@rtyler
Sep 22 2015 16:27
well, we only need it in the jar plugin I believe
and what do you mean faulty? the changing of the staging directory we discussed before?
Christian Meier
@mkristian
Sep 22 2015 16:29
jruby-gradle/jruby-gradle-plugin#225
R. Tyler Croy
@rtyler
Sep 22 2015 16:31
right
Christian Meier
@mkristian
Sep 22 2015 16:31
needed to fix the title ;)
R. Tyler Croy
@rtyler
Sep 22 2015 16:31
basically I'm considering lifting some transforming code to generate those .jrubydirs when the jar is packed
Christian Meier
@mkristian
Sep 22 2015 16:32
yes, get rid of this visitor
R. Tyler Croy
@rtyler
Sep 22 2015 17:05
man is continuous build with ruby projects fun
R. Tyler Croy
@rtyler
Sep 22 2015 20:57
@mkristian can you look at this build failure when you get a chance?
the embedded jetty is throwing a 500 but I cannot reproduce it at all locally :/
R. Tyler Croy
@rtyler
Sep 22 2015 21:02
man, two full test runs in a row with success locally
seeing if perhaps something invalid is cached
R. Tyler Croy
@rtyler
Sep 22 2015 21:36
welp, clearing the cache didn't fix it
i'll be damned
Christian Meier
@mkristian
Sep 22 2015 21:38
parallel could be the one. do you have it locally as well ?
the missing servlet method looks like something is closing the jetty classloader or so. but I am just guessing . . .
R. Tyler Croy
@rtyler
Sep 22 2015 21:40
yeah, those are checked in
AFAICT travis should be using the same settings
Christian Meier
@mkristian
Sep 22 2015 21:41
did you try to delete this local rubygems-servlet cache ?
R. Tyler Croy
@rtyler
Sep 22 2015 21:41
on my local machine?
no, will try
Christian Meier
@mkristian
Sep 22 2015 21:42
~/.gradle/rubygems/
R. Tyler Croy
@rtyler
Sep 22 2015 21:45
trying again, have to wait 15 minutes >_<
Christian Meier
@mkristian
Sep 22 2015 21:46
well, I am about to go to bed . . . can have look tomorrow morning if it is still failing on travis
R. Tyler Croy
@rtyler
Sep 22 2015 21:47
lnighty night
R. Tyler Croy
@rtyler
Sep 22 2015 22:05
welp, clearing the local cache on my machine things are still passing >_<
on JDK8 at least