https://kotlinlang.org logo
#coroutines
Title
# coroutines
k

Kirill Gribov

05/20/2021, 12:33 PM
hey guys! We have updated kotlin, kotlinx and ktor in our project up to versions 1.5.0 and 1.5.4. Also we decided to try new value classes in requests and responses. We deployed our changes and have faced next errors:
Sounds like it is similar to this problem - https://kotlinlang.slack.com/archives/C1CFAFJSK/p1621019550451100
But I m not sure is it ktor issue or coroutines
if we use data class instead of value class - everything works perfectly.
The worst part of it, that we can't reproduce it on a sample project, so we face it only in our big project 🤦 But may be someone has already faced this issue and can give us any insights 🙏 In a meantime we will try to find a way how to reproduce it on a small project. Thanks!
l

louiscad

05/20/2021, 1:01 PM
Do you have JVM IR disabled in one of the modules?
k

Kirill Gribov

05/20/2021, 1:09 PM
if you are talking about
Copy code
compileKotlin {
    kotlinOptions.useIR = true
}
we didn't enable it. our config is:
Copy code
compileKotlin {
    sourceCompatibility = "$java_version"
    targetCompatibility = "$java_version"

    kotlinOptions {
        jvmTarget = "$java_version"
        allWarningsAsErrors = true
        freeCompilerArgs += "-Xopt-in=kotlin.RequiresOptIn"
    }
}
l

louiscad

05/20/2021, 1:15 PM
In 1.5, it's enabled by default. My question was only if you explicitly disabled it somewhere, which it seems you didn't.
1
j

Joffrey

05/21/2021, 7:45 AM
AFAIK Ktor has not been released yet with a Kotlin 1.5-based version
k

Kirill Gribov

05/21/2021, 7:49 AM
https://kotlinlang.org/docs/releases.html#release-details
Copy code
Build info	Build highlights	Recommended kotlinx library versions
1.5.0                           ktor version: 1.5.3
🤷
j

Joffrey

05/21/2021, 7:52 AM
I know it seems strange but that's what I was told (I was also bitten by it). If it's any indication, Ktor 1.5.3 depends on coroutines 1.4.3: https://ktor.io/changelog/1.5/ (and probably still Kotlin 1.4.21, but I haven't checked that)
3 Views