https://kotlinlang.org logo
Title
s

spierce7

02/23/2022, 9:06 PM
if I use KSP to generate an extension function or a class in a module, do I have the ability to see that function and use it in code in the same module?
j

Jiaxiang

02/23/2022, 9:39 PM
you should be able to do so after running ksp at least once
s

spierce7

02/23/2022, 9:51 PM
that’s what I thought. I was going through the documentation and it implies the ide can never see it. Thanks for the clarifications
j

Jiaxiang

02/23/2022, 10:04 PM
that’s kinda of right, you will need to add generated folder to the source set in order for IDE to see it.
s

spierce7

02/23/2022, 11:02 PM
ahh
So I saw that you guys are working on resolving it so the IDE can see these changes?
t

Ting-Yuan Huang

02/25/2022, 7:11 AM
To be clear, you don't need to run ksp once before using it in the code. It's just that the IDE can only know the extension function after it is generated. Better IDE support is planned later in the year.
s

spierce7

02/25/2022, 3:03 PM
yes - I understand