https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
j

John O'Reilly

06/04/2020, 9:05 PM
Should there be a version of Kotlinx Coroutines (and in particular one that supports native multithreading) available yet that works with Kotlin 1.4-M2? (I guess most KMP projects are probably blocked from using it right now anyway until various other libraries are released that work with that version)
k

Kris Wong

06/04/2020, 9:07 PM
coroutines-native-mt is a separate preview effort
it gets updated to the latest kotlin versions as time allows
s

streetsofboston

06/04/2020, 9:08 PM
For 1.4-M1, there is this version of kotlin coroutnes
1.3.5-native-mt-1.4-M1
. Not sure if that works with M2 or has been upgraded to work with M2
j

John O'Reilly

06/04/2020, 9:11 PM
I don't see an M2 version of that in maven at least right now
s

streetsofboston

06/04/2020, 9:12 PM
Maybe M1 works as well….
j

John O'Reilly

06/04/2020, 9:14 PM
Thanks, I'll give it a go tomorrow (also be nice btw if it was possible to have version that was >= 1.3.6 to allow for example use of StateFlow)
1
It also looked like there was some blockers atm preventing release of version of ktor that works with 1.4-M2 ....the plan I believe was that this release of ktor would also play nicely with native-mt version of coroutines
k

Kris Wong

06/04/2020, 9:24 PM
yes, it's all kind of a mess ATM
it's the biggest hindrance to being fully productive with multiplatform for android/iOS
j

John O'Reilly

06/04/2020, 9:28 PM
actually, re-reading following update from #ktor channel it looks like issue is specifically with building native-mt version of coroutines (I had misread that earlier as indicating that issue was on ktor side) "We have problems to build 
kotlinx.coroutines
 
native-mt
 with 
1.4-M2
 kotlin right now. So the ktor 
native-mt
 will be delayed"
k

kpgalligan

06/05/2020, 12:44 AM
ktor and everything else can take a bit to deploy after major releases, so the mt branch delay on a preview isn’t a huge surprise.
We’re pushing out our libs for M2, but I doubt we’ll be able to do everything till next week, due to deps.
u

Ugi

06/05/2020, 11:24 AM
If you need it just for playing around, and don't care about reliability or quality, or that it only has JS IR support you can try my snapshot build
com.ionspin.kotlin.coroutines:kotlinx-coroutines-core:1.3.5-native-mt-arm-1.4-M2-SNAPSHOT
. It's on sonatype snapshot repo.
Be warned though, because the M2 release and new bugs that broke some other parts of my project, I haven't actually tried using them yet