What's the compatibility story for KSP now that it...
# ksp
r
What's the compatibility story for KSP now that it's 1.0? Since there's still a Kotlin version in the version number, does that mean consumers are still tied to using that same version for the foreseeable future while we wait for compiler plugins to stabilize?
e
I recently tried using KSP with a different kotlin version and it crashed with an internal method not found exception, so yes it seems quite tied to the kotlin version due to using internal compiler functions that are changing often right now.
💯 1
e
https://kotlinlang.org/docs/roadmap.html "⏸️ Stable Compiler Plugin API" probably not for Kotlin 1.6, maybe later
t
KSP is comprised of two parts: API and implementation. The API is stable / backward compatible. The implementation is tied to compiler. Processors only depend on API and therefore are not tied to compiler versions. On the other hand, users of processors need to bump KSP version when bumping compiler versions. Note that they don't need to bump processors' versions because processors only depend on API.
🙏 1
For example, Some-Processor-2.0 is released and tested with KSP 1.5.30-1.0.0. Users will be able to use same version (2.0) with Kotlin 1.6.0 + KSP 1.6.0-1.0.0.
r
That makes a lot of sense, thanks. Is there documentation around that anywhere? It’d be helpful to have something to point people to if they have compatibility concerns.
t
Thanks for pointing that out. I'll update the docs / faq.