Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does Dagger2 annotation processor supports the Eclipse incremental compiler?

Does Dagger2 annotation processor supports the Eclipse incremental compiler? I setup Dagger2 with the sample app and after a full compile (after cleaning the project) everything works fine, but after small changes (module or component) and only an incremental compiler run nothing is updated (and errors are shown in the Eclipse log). Is this normal and if not how could I fix this, because full compiler runs are expensive.

Thanks

like image 480
Lars Avatar asked Jan 26 '26 16:01

Lars


1 Answers

Yes and no.

Dagger has been written to use only the standard annotation processing API provided as part of the JDK. There is nothing compiler-specific in its implementation. So, theoretically, Dagger should work under any compiler.

Unfortunately, in trying to run Dagger with Eclipse's implementation of that API we have bumped up against a significant number of bugs. Anything based on ECJ (Eclipse's incremental compilation, Android's Jack toolchain, etc.) tends to crash in unexpected ways.

While projects like AutoValue exercise annotation processing in limited enough ways as to build in workarounds for their required functionality, that would be a significantly larger undertaking for Dagger.

So, if/when Eclipse can reliably support annotation processing, Dagger should work.

like image 58
gk5885 Avatar answered Jan 29 '26 14:01

gk5885



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!