-
Notifications
You must be signed in to change notification settings - Fork 41.5k
Declare configuration annotation processors as incremental for Gradle #16603
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
Declare configuration annotation processors as incremental for Gradle #16603
Conversation
@thyming If we make this change do you know what the impact will be for earlier versions of Gradle? I'm not sure we're quite ready to make 5.4 the minimum supported version. |
Per @oehme (gradle/gradle#4702 (comment)) the fallback behavior is just as it is now. |
Thanks for the PR. I am not sure that we can safely mark
The Have you tried your proposed changes with Gradle 5.4 and verified that the annotation processor works correctly? |
@thyming gentle ping. Can you please get back to us? See #16603 (comment) |
Apologies - this slipped through the cracks. |
Thanks, @thyming. |
A few processors (e.g. Lombok) unwrap the Gradle decorator and we keep the name of the Accessing default values of a field would only be okay if you do that for the fields of the currently processed class. If the generated code depends on field initializers of other classes (e.g. superclasses), it won't work since field initializers are considered implementation details and don't trigger recompilation of dependent classes. |
Is this possible now that Gradle 6.0 offers more options? Would a plugin for Gradle aid in solving this problem? |
Wouldn't investigating @oehme idea (doing the same technique as lombok) be a great improvement idea for Spring boot 2.4? Micronaut 2 has released with incremental annotation processing support! The competition is increasingly eating the deceloppers mindshare because they achieve two pain points objectively better than current spring boot:
Resolving this issue would be a great progress towards being competitive regarding 2) |
We can take another look at this but it won’t make any difference to startup time. Incremental annotation processing only has the potential to reduce compilation time. Once compilation is complete, there’s no difference to startup time as the end result of the compilation is identical, irrespective of whether or not it was done incrementally. |
We're going to take another look at this, but there's slightly more work to do than the changes in this PR. Please follow #22150 for updates. |
Gradle 5.4 removes the limitation that incremental annotation processors cannot create resources, so these can now be marked as incremental annotation processors.