I'm frustrated with KAPT because it doesn't do multi-pass, and I have annotations that use types generated by other annotations. Will KSP help me? does it do multi-pass? Or do I need to create more "child" gradle projects to ensure order?
We plan to support multiple round, mainly for the use cases mentioned by Jonross: support chaining of processors. In fact, we are also seeking for other approaches in the mean time. If you have any idea of how chaining of processors can be achieved, please do share.
z
Zac Sweers
08/11/2020, 3:51 PM
To correct my comment above, kapt only supports multiple rounds for generated java code, not kotlin 😬
t
TwoClocks
08/11/2020, 8:14 PM
yeah. java's annotation processing supports multiple rounds, but if your emitting kotlin (which I am) your SOL.
turns out my dependency tree is isn't that deep. So I just created another gradle composite build/project and deal with it by ordering project dependencies.
@Ting-Yuan Huang I don't know KSP so not sure of the terms, but for annotations if I could provide a processing order for my annotations I'd be set.
Obviously the compiler would need to be ware of the new code made by the last annotation. before running the next one.
I'm sure that insufficient for some things. Maybe separate annotation chains depend on each other in some weird way. Can't help you there. Sound like multi=inheritance all over again. Crazy dependency graph stuff. Maybe someone needs it... if so maybe make it so they can write it 🙂