I also have a question about KSP reporting an inco...
# ksp
r
I also have a question about KSP reporting an incorrect version in the logs, outputs the following:
Copy code
Kotlin Compiler Version: 2.3.20 (language: 2.1.0, api: 2.1.0), KSP Version: 2.0.0, Platforms: [JVM]
However, my project is using: • KSP:
2.3.5
• Kotlin:
2.2.0
apiVersion = 2.1
Additional info: •
kotlinc -version
kotlinc-jvm 2.3.0 (JRE 25.0.1+8-LTS)
• I have never intentionally used Kotlin 2.3.20 (beta). • Kotlin 2.3.10 may have been used previously, so I’m wondering if an active kotlinc daemon or cached compiler could be involved. Why would the KSP API report different Kotlin and KSP versions than those actually configured in the project? Is this expected behavior, a known issue, or possibly caused by the compiler daemon/caching? Thanks!
j
Hi Rey, I'm unable to answer your first question, but maybe I can help clarify what's going on with the version mismatch. The reason for the mismatch is that KSP depends on the Kotlin compiler separately from the project that uses KSP. Thus, in this case, you are using KSP 2.3.5 and Kotlin 2.2.0. However, KSP 2.3.5 uses Kotlin 2.3.20 internally to analyze your code. The language and api levels are what you configured. Lastly, the
KSP Version: 2.0.0
seems to be hardcoded, but I'm not entirely sure about that part. I understand that it's a little puzzling, and maybe it can be improved.
r
Okay, thanks @Jakob Villumsen, I didn't know that or how it worked. The ksp version would be good if it were accurate, anyway, thanks