groovy and intelliJ 12 : why generate stubs?

I have part of a big project with parts that use groovy .... worked perfectly fine under version 11.1
switched to version 12 and then generation of stubs that do not compile afterwards!
what to do to avoid this pesky stub generation that does not work?
well there appears an "exclude from stub generation" form : am I to do that for hundreds of groovy classes?
thanks

0
12 comments
Avatar
Permanently deleted user

ps: I tried to exclude the whole directory from stub generation
(in project menu)
... does not work!

0
Avatar
Permanently deleted user

Is the project public, I mean is it possible to try to compile it at local environment in order to check the processing?

Can you create a sample project which illustrates the problem if the original project is private?

Denis

0
Avatar
Permanently deleted user

funnily if you "make" the groovy module first
then everything is ok
then if I use maven and "clean" + "compile" this works ok

apparently this happened only the first time the module was compiled under iDea12
not the subsequent tries
strange!
(I suspect something fishy with the previous history of builds)

0
Avatar
Permanently deleted user

So, can you provide a sample project which illustrates the problem?

Denis

0
Avatar
Permanently deleted user

well I initially sent you through mail a sample project
but now I can't reproduce it locally
it looks like traces from previous builds (groovy stubs) pertubed the process
now that everything was cleaned down I can't reproduce it
thanks anyway for everything (IDEA is great: specially for groovy users)

0
Avatar
Permanently deleted user

Ok, thanks.

P.S. I haven't received your email with a sample project.

Denis

0
Avatar
Permanently deleted user

happens again
maven generation is ok and succeeds  but "internal" groovy compilation fails (see screen shot)
it looks like some stub generation happens in the background and generates wrong codes!

denis I have sent to you this module and the screenshot

????



Attachment(s):
Capture d’écran 2012-12-17 à 09.55.10.png
0
Avatar
Permanently deleted user

Please provide a minimal but complete sample project which illustrates the problem

Denis

0
Avatar
Permanently deleted user

well I just sent you twice by mail the faulty module
how comme you didn't receive it?
so here it is through the web

this module is called by other parts ot the project (but is a "leaf" that is does not depends on other parts of the proejct)
now what happens is this:
in apparently haphazard way the project "makefile" may (or may not) fail
because wrong stubs are generated
  these stubs are faulty in the way they extend a generic class without being themselves generic -> the generated java code is wrong
and does not compile!
by going back to intelliJ 11 this never happens



Attachment(s):
gruth.zip
0
Avatar
Permanently deleted user

Reproduced the problem. Checking the processing.

Denis

0
Avatar
Permanently deleted user

Great! thanks!

0
Avatar
Permanently deleted user

So, the answer is that IJ 12 uses groovyc for groovy stubs construction. IJ 11 used custom stub generation.

The problem is that groovyc generates incorrect stubs for groovy classes which extend generic classes.

I've created a ticket for our groovy guy - IDEA-97668. It should be fixed at groovy side eventually though.

Denis

0

Please sign in to leave a comment.