https://kotlinlang.org logo
Title
m

Marc Knaup

04/14/2021, 8:32 PM
Does updating to Kotlin 1.5 cause a binary incompatibility with libraries that use
kotlinx-datetime
and are compiled with 1.4?
I guess
kotlinx-datetime
isn’t actually compatible with Kotlin 1.5? 😱 Must be the change of
Duration
from
Double
to
Long
.
java.lang.NoSuchMethodError: ‘kotlinx.datetime.Instant kotlinx.datetime.Instant.plus-LRDsOJo(long)’
i

ilya.gorbunov

04/14/2021, 9:02 PM
Yes, indeed, we'll have to rebuild it for 1.5
Must be the change of Duration from Double to Long.
First that, but also the change of mangling for methods with inline class parameters in 1.4.30-1.5
m

Marc Knaup

04/14/2021, 9:23 PM
Do you have any ETA on that?
p

Paul Woitaschek

04/15/2021, 7:08 AM
Ah ouch. We're stuck with 1.5.0-M2 because we can't use 1.4 as the commonizer runs on every single gradle module there which makes bitrise timeout at 90 minutes.
i

ilya.gorbunov

04/15/2021, 7:08 AM
We'll release a compatible version of kotlinx-datetime some time before Kotlin 1.5 release. We're working at the moment on building it, and you'll be able to fetch artifacts from our build server as soon as they are ready — I'll provide a link to it that could be used as a maven repository.
🙏 1
p

Paul Woitaschek

04/15/2021, 7:08 AM
Nice, thanks a lot 🙂
h

hfhbd

04/15/2021, 10:38 AM
Not only kotlinx-dateime. Coroutines as well
😱 1
m

Marc Knaup

04/15/2021, 10:39 AM
How are we supposed to properly test Kotlin 1.5 before release if most libraries update only very shortly before it? 😅
h

hfhbd

04/15/2021, 10:42 AM
And why it is marked as compatible? 😛 https://kotlinlang.org/docs/eap.html#build-details
m

Marc Knaup

04/15/2021, 10:43 AM
No idea what you mean 😅
h

hfhbd

04/15/2021, 10:44 AM
Kotlin 15.0.-RC: Recommended kotlinx library versions: - kotlinx.coroutines version: 1.4.3 :D
i

ilya.gorbunov

04/15/2021, 10:44 AM
Coroutines should be compatible as long as you are not using its experimental API.
m

Marc Knaup

04/15/2021, 10:44 AM
Ah, I have to scroll horizontally on the page 😂
h

hfhbd

04/15/2021, 10:45 AM
as long as you are not using its experimental API.
exactly 😄
☝️ 1
i

ilya.gorbunov

04/19/2021, 6:37 PM
The test build of kotlinx-datetime compatible with Kotlin 1.5 has the maven coordinates
org.jetbrains.kotlinx:kotlinx-datetime:0.2.0-dev-303
and can be obtained from the repository
<https://teamcity.jetbrains.com/guestAuth/app/rest/builds/buildType:(KotlinTools_KotlinxDatetime_Build_All),status:success,branch:kotlin-1-5,pinned:true/artifacts/content/maven/>
🙏 1