groovy-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexey Belostotskiy <lexek...@ya.ru>
Subject Re: GroovyDoc classloader issue
Date Tue, 07 May 2019 11:06:57 GMT
<div>I've created https://issues.apache.org/jira/browse/GROOVY-9110</div><div>&nbsp;</div><div>07.05.2019,
12:23, &quot;Paul King&quot; &lt;paulk@asert.com.au&gt;:</div><blockquote><div><div>Hi
Alexey, I managed to replicate using your code - thanks. But I didn't have time yet to see
if I could come up with a way to implement your suggestion in a backward compatible way. Is
there a Jira for the issue yet? Please create one if not.</div><div>&nbsp;</div><div>Cheers,
Paul.</div>&nbsp;<div><div>On Tue, May 7, 2019 at 7:16 PM Alexey Belostotskiy
&lt;<a href="mailto:lexek-92@ya.ru">lexek-92@ya.ru</a>&gt; wrote:</div><blockquote
style="border-left-color:rgb( 204 , 204 , 204 );border-left-style:solid;border-left-width:1px;margin-bottom:0px;margin-left:0.8ex;margin-right:0px;margin-top:0px;padding-left:1ex"><div>Hi,</div><div>Did
you get a chance to test it?</div><div>&nbsp;</div><div>26.02.2019,
00:24, &quot;Paul King&quot; &lt;<a href="mailto:paulk@asert.com.au">paulk@asert.com.au</a>&gt;:</div><blockquote><div>Hi
Alexey, the attachment came through. I just haven't had time to test&nbsp;it yet. Thanks!<div>&nbsp;</div><div>Cheers,
Paul.</div></div>&nbsp;<div><div>On Tue, Feb 26, 2019 at 1:20
AM Alexey Belostotskiy &lt;<a href="mailto:lexek-92@ya.ru">lexek-92@ya.ru</a>&gt;
wrote:</div><blockquote style="border-left-color:rgb( 204 , 204 , 204 );border-left-style:solid;border-left-width:1px;margin-bottom:0px;margin-left:0.8ex;margin-right:0px;margin-top:0px;padding-left:1ex"><div>Hi,
did you receive the last email (with test in attachment)? I'm not sure if it was sent properly.</div><div>&nbsp;</div><div>20.02.2019,
17:34, &quot;Alexey Belostotskiy&quot; &lt;<a href="mailto:lexek-92@ya.ru">lexek-92@ya.ru</a>&gt;:</div><blockquote><div>Hi,
it's kind of messy, but I hope you'll get the idea.</div><div>&nbsp;</div><div>19.02.2019,
23:48, &quot;Paul King&quot; &lt;<a href="mailto:paulk@asert.com.au">paulk@asert.com.au</a>&gt;:</div><blockquote><div>Our
preference would be to have a standalone testcase that triggers your problem. Are you in a
position to create such a test?</div>&nbsp;<div>On Wed, Feb 20, 2019 at 1:24
AM Alexey Belostotskiy &lt;<a href="mailto:lexek-92@ya.ru">lexek-92@ya.ru</a>&gt;
wrote:</div><blockquote style="border-left-color:rgb( 204 , 204 , 204 );border-left-style:solid;border-left-width:1px;margin-bottom:0px;margin-left:0.8ex;margin-right:0px;margin-top:0px;padding-left:1ex"><div>Hello,</div><div>&nbsp;</div><div>We're
generating groovydocs in runtime in our app. We use groovydoc as a library, not standalone
tool.</div><div>&nbsp;</div><div>It mostly works, but we're experiencing
issues with some classes ending up unresolved. I found out that this happens because <span
style="font-family:'courier new' , monospace">SimpleGroovyClassDoc</span> is calling
its <span style="font-family:'courier new' , monospace">getClass().getClassLoader()</span>
to get classloader for class resolution. But in our case, most of classes that we want to
link should be loaded via different classloader.</div><div>&nbsp;</div><div>Basically,
solution that would work for us, is to replace <span style="font-family:'courier new' ,
monospace">getClass().getClassLoader()</span> calls in <span style="font-family:'courier
new' , monospace">SimpleGroovyClassDoc</span> with <span style="font-family:'courier
new' , monospace">Thread.currentThread().getContextClassLoader()</span>, but that
might be a breaking change.</div><div>&nbsp;</div><div>I'm not
sure what the process is for requesting such changes and whether it's something that Groovy
team is willing to implement.</div></blockquote></blockquote></blockquote></blockquote></div></blockquote></blockquote></div></div></blockquote>
Mime
View raw message