Groovy generated classes causing compilation issues

My project consists of a core module written in Java and a dependent module that contains groovy code. I wanted to run a unit test in the core module but I get compilation errors in the generated Groovy java files that JetGroovy creates under
~/.IntelliJIdea70/system/compiler/MyProj.MyProj9f614fa0/.generated/Groovy_to_java_source_code_generator/dependentModule/production/

Two issues here. The Groovy files themselves are fine. I've tried "touching" the Groovy files and see if they get regenerated, but no dice.
Number two, even if there were a problem, these files shouldn't prevent me from running my test case since they are in the dependent module and my test case is in the core module.

What causes this issue and how can I prevent it from happening again? It would be nice not to scare the average developer to have this nasty implementation detail sneak out from time to time!

Thanks,
Adam

2 comments
Comment actions Permalink

As for number one, java stubs must be regenerated when you edit groovy files. If they are not, this is a definite bug, and you should post it to JIRA.
Number two is not a bug(this is a design issue, though it could probably be improved) - you have compile before run in your test configuration enabled, and this means compiling the whole project.

0
Comment actions Permalink

I'm still getting these issues from time to time. The Groovy generated code seems to be very sensitive to rebuilds, etc. When this occurs, I need to manually delete the generated java files. Has any progress been made on this issue?

0

Please sign in to leave a comment.