Is there any roadmap about which will support ksp ...
# ksp
j
Is there any roadmap about which will support ksp with the k2 refactor? Anything relevant about FIR?
t
KSP 1.x (based on Kotlin 1.x) is usable with K2 and will be usable with Kotlin 2.0. Not sure about Kotlin 2.1. KSP 2.0 (based on K2) will be available shortly after Kotlin 2.0.
j
Will it include FIR APIs or it would be only adapted to k2 keeping only BE APIs
j
It will be based on the analysis API instead of build on top of FIR directly.
j
But that API allows to generate functions or classes in the frontend?
j
what do you mean by generate functions in frontend? Like modifying ASTs? I don’t think you can do that.
j
with FIR you can generate functions which you see in the IDE, with IR or Gradle, in order to be able to see what is generated, it is necessary to compile (for example running the
compileKotlin
task. Check
FirDeclarationGenerationExtension
Analysis API means all FIR checkers, or it is a totally different thing?
j
With current KSP’s plan for analysis API, you still need to execute ksp task in order to see what is generated, generated code is only visibile after ksp execution is finished, i.e. same behavior as current implementation. compile is not necessary if you only want to see what is generated.