-
Notifications
You must be signed in to change notification settings - Fork 16
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
Enable incremental annotation processing #1231
Conversation
Generate changelog in
|
annotationProcessor 'org.immutables:value' | ||
compileOnly 'org.immutables:value::annotations' | ||
annotationProcessor 'org.derive4j:derive4j' | ||
compileOnly 'org.derive4j:derive4j-annotation' | ||
|
||
testAnnotationProcessor 'org.immutables:value' | ||
testCompileOnly 'org.immutables:value::annotations' | ||
testCompileOnly 'net.ltgt.gradle.incap:incap' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Necessary because the IncrementalAnnotationProcessor
annotation has class retention. This is acceptable because downstream consumers do not compile against the annotation processor, see https://github.com/tbroyer/gradle-incap-helper#usage.
Released 1.124.0 |
Thanks! How does this actually work, and where was this causing issues? |
Based loosely on palantir/dialogue#1231 I opted against using annotation processors for simplicity. I had minor issues with intellij, and generally find META-INF files easier to reason about that annotation processors which write one-line files. Documentation for incremental processing can be found here: https://docs.gradle.org/current/userguide/java_plugin.html#sec:incremental_annotation_processing It's possible that this feature may cause issues if we attempt to instrument types that are genereated from other annotation processors, however that is somewhat unlikely, and the docs describe that as a valid case for `isolating` configuration.
Based on palantir/dialogue#1231 I opted against using annotation processors for simplicity. I had minor issues with intellij, and generally find META-INF files easier to reason about that annotation processors which write one-line files. Documentation for incremental processing can be found here: https://docs.gradle.org/current/userguide/java_plugin.html#sec:incremental_annotation_processing It's possible that this feature may cause issues if we attempt to instrument types that are genereated from other annotation processors, however that is somewhat unlikely, and the docs describe that as a valid case for `isolating` configuration.
Before this PR
The Dialogue annotation processor does not support incremental compilation.
After this PR
The Dialogue annotation processor does support incremental compilation.