Are there docs on which kotlin versions each versi...
# ktlint
w
Are there docs on which kotlin versions each version of ktlint is compatible with?
p
No, I have never documented that.
Based on the changelogs of ktlint:
Copy code
Ktlint -> Kotlin
1.5 -> 2.1
1.4 -> 2.0
1.3 -> 1.9
1.2 -> 1.9
1.1 -> 1.9
1.0 -> 1.9
0.50 -> 1.8
0.46 -> 1.7
0.44 -> 1.6
0.42 -> 1.5
0.38 -> 1.4
0.30 -> 1.3
0.13 -> 1.2
0.6 -> 1.1
0.1 -> 1.0
w
Thanks thats a start. Im trying to look at it from a backwards compatibility perspective. Like: what's the oldest version of kotlin i can use ktlint 1.0 on?
p
I don't know. It will work with kotlin
1.9
for sure as that version of the embedded compiler which is included in ktlint
1.0
. But if the project on which ktlint is run does not use any new language elements which have been introduced in
1.9
, nor have been removed from that version, than it is very likely that it (e.g. the ktlint CLI) will run with
1.8
or older as well. For an API consumer the same hold probably true as long the embedded kotlin compiler in ktlint does not conflict with the kotlin compiler used by the API consumer. I really cannot predict that. Are you facing issues? I know that kotlinter has some issues (see https://github.com/pinterest/ktlint/issues/2882).
w
No not that. We are considering dropping support for ktkint 0.x in ktlint-gradle but just trying to figure out if we would lose support for any kotlin versions
p
Ok, I see. Without any statistics its is much hard to make such decisions. But sometimes you just have to move on.