https://kotlinlang.org logo
#ksp
Title
# ksp
j

jw

03/18/2024, 9:23 PM
I haven't actually used KSP, but why does the
process
function only allow returning annotated symbols rather than any symbol?
t

Ting-Yuan Huang

03/18/2024, 9:30 PM
Is there anything you'd like to defer and not a
KSAnnotated
?
j

jw

03/18/2024, 9:47 PM
I don't have a use case. It just seems potentially limiting. What if I'm generating code based on subtyping rather than annotating.
Or are you saying all symbols that are entry points are KSAnnotated instances anyway?
t

Ting-Yuan Huang

03/18/2024, 9:57 PM
Mostly. The only thing*1 that is not a KSAnnotated is KSAnnotation (the annotation instance, not the class definition). *1 KSReferenceElement, KSModifierListOwner and KSDeclarationContainer are not KSAnnotated but their concrete types are.
Oh and KSType, Yes, it cannot be deferred. It is not an entry point though.
j

jw

03/18/2024, 10:03 PM
Okay got it. So non issue. Was just my misunderstanding of the hierarchy
Thanks!
t

Ting-Yuan Huang

03/18/2024, 10:36 PM
My pleasure!
2 Views