Eclipse Compiler including annotation processing

Answered

Hey,

I'm using IntelliJ 2021.2.3 CE. I want to use eclipse compiler on my multiproject build. In addition I'm using annotation processing to generate java code e.g. with the google-auto-value library.

But the compiler process fails with 

Warning:java: Could not write generated class XYZ: javax.annotation.processing.FilerException: Source file already exists : XYZ

the java code isn't generated when this message appears.

I added comments already to

https://youtrack.jetbrains.com/issue/IDEA-211545

https://bugs.eclipse.org/bugs/show_bug.cgi?id=547010

without getting an answer.

There is also a project you can checkout to verify the issue in intellij

https://github.com/mbauhardt/ecj-filer-exception

 

My question here is, has someone of you experience with annotation processing in combination with the eclipse compiler?

 

thx

marko

0
3 comments

I cannot reproduce it with 2021.3.2 version:

Executing pre-compile tasks…
Loading Ant configuration...
Running Ant tasks...
Running 'before' tasks
Checking sources
Searching for compilable files... [ecj-filer-exception.main]
Parsing java… [ecj-filer-exception.main]
Writing classes… [ecj-filer-exception.main]
Checking dependencies… [ecj-filer-exception.main]
Dependency analysis found 0 affected files
Updating dependency information… [ecj-filer-exception.main]
Adding @NotNull assertions… [ecj-filer-exception.main]
Adding pattern assertions… [ecj-filer-exception.main]
Running 'after' tasks
Eclipse compiler 4.22 was used to compile java sources
Finished, saving caches…
Executing post-compile tasks…
Loading Ant configuration...
Running Ant tasks...
Synchronizing output directories…
04.02.2022, 15:59 - Build completed successfully in 4 sec, 12 ms

Please try using latest version.

0

hi Andrey Dernov

thanks for looking into it. did you changed the the class coffee after the first compiling? e.g. adding a line or change the signature of one of the methods? and trigger a recompiling then?

this is the actual issue....

0

hi Andrey Dernov,

i just upgraded my system and got intellij 2021.3.2. The recompilation is working now. Thanks for looking into.

thx jetbrains for fixing.

 

marko

 

0

Please sign in to leave a comment.