I have a project which I want to update from Kotlin 1.6.20 to 1.9.24. Can I assume kotlin to be backwards compatible and it won't break the libraries? If library is compiled with older version of Kotlin will it still continue to work?
c
Carsten
09/19/2024, 5:12 AM
No, you shouldn't assume that. You should test it.
s
Sohel
09/19/2024, 5:24 AM
Got it, testing makes sense but are they supposed to work together?
a
Anselmo Alexandre
09/19/2024, 7:25 AM
It should be backwards compatible YES. Also, unless you have very specific requirement to update to 1.9.24, I would recommend updating to at least Kotlin 2.0.0 (which bundles lots of great updates including K2 compiler).
s
Sohel
09/19/2024, 8:18 AM
I remember reading it somewhere that 2.0 is not completely backwards compatible. Can update to 2.0 with same requirements - being able to use libraries compiled with older version of kotlin.