You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@groovy.apache.org by "Winnebeck, Jason" <Ja...@windstream.com> on 2016/11/21 22:08:32 UTC
GMavenPlus compiles stubs
I recently encountered an error from javac compiling a stub that was otherwise valid from Groovy itself when I enabled generate-stubs task. I resolved the error properly, but I wonder, should javac be compiling stubs when using gmavenplus? I thought it just referred to them but did not compile them. If it's compiling the stubs, am I at risk of having the stub replace the Groovy-generated code in the final jar?
Jason Winnebeck
This email message and any attachments are for the sole use of the intended recipient(s). Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message and any attachments.
Re: GMavenPlus compiles stubs
Posted by Jochen Theodorou <bl...@gmx.org>.
On 22.11.2016 04:08, Keegan Witt wrote:
> Jochen is right, Groovy compilation happens after stubgen and javac,
> hence it'll replace those previously generated classes.
>
> Why shouldn't javac compile the stubs? Wouldn't javac need the classes
> so that it has something to compile against (since Java is statically
> compiled) so that circular compilation works? GMaven worked this way also.
I don�t know about maven in that, but in case of javac you can have
something like an additional source lookup folder, which will let javac
search for additional sources without actually compiling them,but use
their information. groovyc and the groovy ant task are supporting this.
bye Jochen
Re: GMavenPlus compiles stubs
Posted by Keegan Witt <ke...@gmail.com>.
Jochen is right, Groovy compilation happens after stubgen and javac, hence
it'll replace those previously generated classes.
Why shouldn't javac compile the stubs? Wouldn't javac need the classes so
that it has something to compile against (since Java is statically
compiled) so that circular compilation works? GMaven worked this way also.
-Keegan
On Nov 21, 2016 4:36 PM, "Jochen Theodorou" <bl...@gmx.org> wrote:
> On 21.11.2016 23:08, Winnebeck, Jason wrote:
>
>> I recently encountered an error from javac compiling a stub that was
>> otherwise valid from Groovy itself when I enabled generate-stubs task. I
>> resolved the error properly, but I wonder, should javac be compiling
>> stubs when using gmavenplus?
>>
>
> afaik no
>
> I thought it just referred to them but did
>> not compile them. If it’s compiling the stubs, am I at risk of having
>> the stub replace the Groovy-generated code in the final jar?
>>
>
> since groovy compilation happens after the groovy compiler will overwrite
> those classes. So no danger from that front
>
> bye Jochen
>
Re: GMavenPlus compiles stubs
Posted by Jochen Theodorou <bl...@gmx.org>.
On 21.11.2016 23:08, Winnebeck, Jason wrote:
> I recently encountered an error from javac compiling a stub that was
> otherwise valid from Groovy itself when I enabled generate-stubs task. I
> resolved the error properly, but I wonder, should javac be compiling
> stubs when using gmavenplus?
afaik no
> I thought it just referred to them but did
> not compile them. If its compiling the stubs, am I at risk of having
> the stub replace the Groovy-generated code in the final jar?
since groovy compilation happens after the groovy compiler will
overwrite those classes. So no danger from that front
bye Jochen