-
Notifications
You must be signed in to change notification settings - Fork 10
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 gradle incremental annotation processing for tritium-processor #1085
Conversation
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.
Generate changelog in
|
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.
The generated file needs to have a single originating element for incremental compilation to work. See palantir/dialogue#1240.
It looks like we don't specify an originating element when building the TypeSpec
.
Given that we're relying on the implementation of JavaPoet for this, might be a good idea to just add an assertion that the TypeSpec
in the JavaFile
has exactly 1 originating element.
Agreed, we should just change Dialogue. |
Good catch, updated with an originating element. |
Released 0.18.11 |
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
==COMMIT_MSG==
Enable gradle incremental annotation processing for tritium-processor
==COMMIT_MSG==
Possible downsides?
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.