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

Edoardo Luppi

03/02/2024, 12:46 PM
Can
KS*
instances be used as map keys? An example could be a map of `KSFile`s to `KSFunctionDeclaration`s.
j

Jiaxiang

03/05/2024, 6:43 PM
KS objects can’t be reused across rounds, especially in the case of being used as a key of a map
e

Edoardo Luppi

03/05/2024, 6:45 PM
Thanks! Btw, I'm not reusing them, I'm simply discovering annotated functions and I want to map them based on their class for further processing. All done in a single processor call.
j

Jiaxiang

03/05/2024, 6:45 PM
Oh, if it is in the same round, then you should be able to use it as key
e

Edoardo Luppi

03/05/2024, 6:45 PM
Perfect, thank you!