stag-java icon indicating copy to clipboard operation
stag-java copied to clipboard

Incremental Annotation Processor not supported

Open doniwinata0309 opened this issue 6 years ago • 1 comments

Hi, any plan to support incremental annotation processor ? I am checking from warning and stag does not support incremental annotation processor. Thanks

doniwinata0309 avatar Nov 28 '19 07:11 doniwinata0309

I think in theory, stag should be able to be made into an "aggregating" processor, as it generates type adapters for annotated types and then aggregates them into a single factory. However, I think some refactoring may need to be done first, as currently we are reading from resources during the code generation, which is prohibited by the incremental AP spec (https://github.com/vimeo/stag-java/blob/v2.6.0/stag-library-compiler/src/main/java/com/vimeo/stag/processor/utils/KnownTypeAdapterFactoriesUtils.java#L106). It's been a while since I've worked on this so I'm not sure if there's another way to do what we are doing with resources.

anthonycr avatar Dec 02 '19 15:12 anthonycr