-
Notifications
You must be signed in to change notification settings - Fork 731
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for incremental annotation processing in Gradle #423
Comments
Thanks for bringing this up! It has been on my radar and I would love to support it. Some notes: In the common cases Epoxy is an isolated processor
At other times Epoxy is aggregating
Other places Epoxy breaks the rules for incremental:
In summary, it looks like this could almost work, but there are some gotchas to sort out and those will slow down the work. It may take a large refactor to make this possible (possibly splitting into separate processors). It's possible we could support just the basic case to start with. I'll add notes to this as I investigate more, but this probably won't happen too soon. |
Our team builds with Buck so we have little incentive to prioritize this at the moment. If somebody would like to contribute the change that would be great |
Kapt will support incremental annotation processing in the next release. Unfortunately, any annotation processor that is not incremental will disable incremental across all processors. Definitely need this for Epoxy! |
Incremental processing has this limitation
Epoxy uses However, the upcoming Android change to namespace resources will also make placing resources in annotations impossible, so my understanding is Epoxy will have to be changed to not allow resources in annotations. At the point we make a breaking change to the library to do that we can get rid of |
In the meantime, it may be possible to use the "dynamic" mode, where the Epoxy annotation processor can at runtime declare itself as aggregating if none of the annotations it processes need to use If anybody knows more about this I'd love some opinions on whether that would work. |
Anything new? :-) |
a lot of people will need this to improve build speed |
That's right - we still can't use incremental because we are on buck, but if anybody out there wants to contribute a PR to do this please do. |
Your company has another library https://github.com/airbnb/DeepLinkDispatch that is in the same boat but seems a lot less active. I am just wondering if that library is a lot easier to convert than epoxy? |
Deeplink dispatch should be very easy in comparison. Its been a while since I looked at the code, but it should be a standard aggregating processor - it might just need to be marked as |
that would be awesome if you could take a look, very much appreciated |
Something like this was recently done in Butterknife: JakeWharton/butterknife#1546, would it be possible to include a similar solution in Epoxy? I guess that would fix the issue. |
@plnice thank you for sharing, that does seem like it would help a lot. That should get us most of the way there, and seems like it would be fairly simple. However, I am not sure about how the reflection cases I mentioned in my first comment play out with incremental processing. If those aren't a concern then great! this should be easy. |
Epoxy is awesome!, but the problem is this. @elihart any plans on this? most people use gradle, although you guys use buck, having this fixed would be a great help! As @athornz mentioned the problem is this thing disabling other incremental annotation processing. |
We will probably get to it in the next few months - if anybody else would like to do it, keeping in mind all the points above, I'd be happy to review. |
I took a shot at this - PR #902 |
@ZacSweers Thanks a lot! @elihart Please look at the mentioned PR. |
@elihart Is there any update on when this will be released? |
Just found that Zac deleted his PR with implementation. So release is postponed a bit more. |
This has been in beta for a while, and is now fully release in the new 4.0.0 |
With the release of Gradle 4.7, it now supports incremental annotation processing.
I'm really not sure if Epoxy falls into the two categories supported but assuming it is, it would likely help improve build times.
The text was updated successfully, but these errors were encountered: