-
Notifications
You must be signed in to change notification settings - Fork 6.1k
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 #3508
Conversation
Thanks for your PR, Sergey! I agree with you for changing the retention policy and make it aggregating. But I am wondering why are you adding originating element for those generated classes while you already make glide an aggregating annotation processor. As far as I know, aggregating AP doesn't need that and we are not able to know all the originating elements which is why we make it aggregating. |
Thanks! I'm working on the build failure, it seems to be an issue with travis setup. I'm also curious about the originating elements. Isolating annotation processor documentation mentions originating elements: https://docs.gradle.org/current/userguide/java_plugin.html#example_an_isolated_annotation_processor. The aggregating documentation doesn't seem to. I've also found: gradle/gradle#4130 |
Build error should be fixed if you rebase: b56dbab |
I was not sure whether originating elements were required for aggregating AP so I added them anyway. Now, looking at the https://github.com/gradle/gradle/blob/7e2af8a93d4e8f21ff044cc971492717cc14ed7f/subprojects/language-java/src/main/java/org/gradle/api/internal/tasks/compile/processing/AggregatingProcessingStrategy.java#L67 I see that Gradle simply ignores them in case of an aggregating AP. I've reverted everything related to originating elements and tested again, it seems that it works exactly the same. We can add them later if Gradle ever starts requiring them. |
8c98079
to
af1a58e
Compare
Not sure what's the reason for this failure:
I don't see it when running |
I can't reproduce the error locally either. Could that be a flaky test? How about we run it again? |
I've restarted the job, I believe that is a flake. Otherwise this looks good to me, I'll merge when I confirm the test passes. Thanks! |
Great! Thanks! |
I've had to change the retention of
GlideModule
andGlideExtension
toCLASS
because aggregating annotation processors support onlyCLASS
andRUNTIME
retention.Resolves #2983
cc @stephanenicolas