Community
Participate
Working Groups
When an annotation processor generates a class file which is itself annotated, the generated class is not being processed in a subsequent annotation processing round. If a .java file is generated instead of directly generating the class file, the issue does not arise. I have attempted to put together a relatively minimal working example to demonstrate the bug: https://github.com/charkins/ecj-apt-issue There are effectively 4 source files in this project, the annotation (X.java), the processor (XProcessor.java) and two example classes that are annotated with X (Foo.java and Bar.java). The X annotation in this example takes an array of booleans to control generating source/classes recursively. Hopefully this approach isn't too confusing as an example, but it allowed keeping code to a minimum. The README.md provides some detail, but the TLDR is that javac runs XProcessor for each java or class file generated, while ecj only runs XProcessor for java files that are generated.
This could be a duplicate of bug #527420 and comment 4 seems to suggest that generating class files directly (without generating java) is less well defined/tested.
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.