Hi everyone, I have a custom incremental annotatio...
# kapt
g
Hi everyone, I have a custom incremental annotation processor which generates 4 top level Kotlin functions for each element annotated with
@Serializable
. If I run
kaptKotlin
on branch A and then I checkout branch B in which there aren’t all the originating elements of branch A, running
kaptKotlin
on branch B result in the following error:
Copy code
/Users/path-to-project/dummy-module/build/tmp/kapt3/stubs/debug/com/example/OriginatingElement_OriginatedKt.java:24: error: cannot find symbol
    public static final OriginatingElement_OriginatedKt deserialize(@org.jetbrains.annotations.NotNull()
This error can be fixed everytime running
kaptKotlin --rerun-tasks
after the error is thrown. There’s a way to avoid this error? I tried also to switch from an isolating processor to an aggregating one, but it doesn’t solve the problem. To generate the files, I’m using
KotlinPoet
writing to
Filer
.