Dealing with 3rd-party library upgrading Kotlin version

Now that there are so many useful libraries for Kotlin, it is tempting to start using them in production projects. Each Kotlin library depends on the specific version of Kotlin. What happens when the library upgrades its Kotlin dependency and does not provides any backporting?

Imagine, there is a library that depends on Kotlin


. The author of this open-source library does not have a lot of free time, so they do the best they can. In the next release, they fix several issues that bother users so much. Meanwhile, there is a new version of Kotlin available, so the author decides to also upgrade the Kotlin dependency to



Does it mean the (production) projects that depend on this library must migrate to Kotlin 1.5.20 to benefit from the fixes? If so, doesn’t it mean we are in the vicious cycle of ever-upgrading? What if we can’t upgrade the Kotlin version in the production project that easily or that fast?

What are the ways of handling this better as a Kotlin community? As library authors?

P.S. I am aware that there are




compiler options, but they do not seem to solve the general problem of migrating between major versions of Kotlin.

submitted by /u/wadbzy
[link] [comments]