Eclipse's support for annotation processors is not in great shape. The compiler crashes a lot... and this sort of bug tends to be both devastatingly bad and also really hard to reproduce outside the code you found it in. Also, many (most?) Eclipse committers don't use annotation processors in their own code and aren't familiar enough with them to help with bugfixes, which puts a bigger burden on the others.
...so we end up with some really serious APT bugs that have gone unfixed for a long time.
I'd like to suggest a solution: we could start using annotation processors within the implementation of JDT. I'd suggest we start by adopting some open-source processors that do something simple and useful (like
https://github.com/google/auto or Dagger ).
I'm basically suggesting dogfooding APT.
What will this accomplish?
- JDT developers will be more likely to notice serious APT bugs early.
- When we do encounter bugs, we'll see them in Eclipse code that all committers have access to (rather than in proprietary customer code).
- More widespread knowledge about using and developing annotation processors will mean more committers who are able to help fixing these bugs.
So what do you think? Could we make use of a few annotation processors within JDT? Would auto-value be a good first adoptee?
- Stefan