ah ok, I was thinking there might be major reworki...
# coroutines
d
ah ok, I was thinking there might be major reworking of code needed..
g
Nope, there is almost no work (only fix new warnings if you want), but in general it should be backward compatible But migration of old coroutines may be not so straight forward
d
what is old coroutines? what version is old?
g
I'm talking about Kotlinx.coroutines library
Versions after 0.26 introduced a lot of changes, such as Structured concurrency
But in general it's more about library update, not language itself. But it requires If you use some old version of kotlinx.coroutines and want to migrate to 1.3
g
Nope, there is almost no work (only fix new warnings if you want),
this is not accurate if you're on a version of kotlinx.coroutines prior to 0.26. As you mentioned, the structured coroutines change is not small. Cancellation semantics are different, and I got a bunch
implementation should be intrinsic
errors from
suspendCoroutineOrReturn
, as that function seems effectively depricated and scheduled for removal sooner rather than later.
g
@groostav yes, and I mentioned this on my next message, that it's not so easy with very old kotlinx.coroutines
d
ok I'm a little confused, my import packages start with kotlinx.coroutines.experimental, so that is not what you guys are talking about, right? my coroutine usage code is only from 2017.. for me it should be little effort to upgrade to the latest, correct?
g
this is kotlinx.coroutines with experimental package, correct. Which version do you use?
d
how can I check the version?
g
Check version of dependency
org.jetbrains.kotlinx:kotlinx-coroutines-*
d
org.jetbrains.kotlinx:kotlinx-coroutines-core:jar:0.22.5
so if it seems to work, better for me to leave it alone for now?
g
I would recommend migrate
d
yes I would do that eventually, I was just trying to determine if i needed to do this soon
g
but it will be not so straight forward
Biggest difference is strucutred concurrency https://github.com/Kotlin/kotlinx.coroutines/releases/tag/0.26.0
d
I'm not entirely sure what that is, I'll have to read up on it
I use coroutines mostly with
future { }
in my kotlin code
I also have some javascript code with coroutines but I don't know when I will need that again, are there much changes in regards to them with javascript?
g
Even to use with future you need CoroutineScope now