https://kotlinlang.org logo
#kotest
Title
# kotest
r

Richard Gomez

06/29/2022, 5:46 PM
I recently upgraded to Kotlin 1.7.0 & Kotest 5.3.1, and I'm now getting a strange error. I don't understand why it's trying to pull in
kotlinx-coroutines-bom:jar
, which obviously wouldn't exist (pom only).
Copy code
Could not find artifact org.jetbrains.kotlinx:kotlinx-coroutines-bom:jar:1.6.3
This probably isn't an error with Kotest, but it's the closest lead I have right now.
There seems to be a conflict between Quarkus
2.10.0.Final
and Kotest. It doesn't happen with Quarkus
2.9.2.Final
. The only change I see is an upgrade from kotlinx-coroutines-bom 1.6.1 to 1.6.2: https://github.com/quarkusio/quarkus/pull/25871/files
It's fixed by excluding
kotlinx-coroutines-bom
from kotest. I am not sure why:
Copy code
<dependency>
            <groupId>io.kotest</groupId>
            <artifactId>kotest-runner-junit5-jvm</artifactId>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.jetbrains.kotlinx</groupId>
                    <artifactId>kotlinx-coroutines-bom</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
e

Emil Kantis

06/30/2022, 7:34 PM
do you use kotlin/js?
r

Richard Gomez

06/30/2022, 7:44 PM
Nope, JVM only.
e

Emil Kantis

06/30/2022, 7:46 PM
Odd.. I know there was something broken with coroutines 1.6.2 where JS-targets didn't get built properly.. I think that might be causing it somehow since Kotest has JS targets, but not sure why it would matter in a JVM build..
r

Richard Gomez

06/30/2022, 7:49 PM
Do you have a link to that? It could be related, but the issue seems to be the "jar" type/qualifier for
kotlinx-coroutines-bom
. It should be imported as a "pom".
m

Mor4thii

07/06/2022, 6:57 AM
I observed the same problem with Spring 2.7.1 and kotest 5.3.x/5.4.x: https://github.com/kotest/kotest/issues/3084 With spring 2.7.0 it works
e

Emil Kantis

07/06/2022, 7:04 AM
How does your example fail @Mor4thii?
Copy code
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  5.932 s
[INFO] Finished at: 2022-07-06T09:04:48+02:00
[INFO] ------------------------------------------------------------------------
m

Mor4thii

07/06/2022, 12:52 PM
@Emil Kantis , did you check out the kotest branch? Main works as it is a plain spring app generated w/ spring initializr
r

Richard Gomez

07/06/2022, 8:27 PM
🤦‍♂️ I looked at the build.gradle for the project. It didn't occur to me to check the published pom.xml file. https://github.com/Kotlin/kotlinx.coroutines/blob/master/kotlinx-coroutines-debug/build.gradle
m

Mor4thii

07/22/2022, 9:14 AM
For me, with Spring 2.7.2, this issue has been resolved. The coroutines artifact is now available in v1.6.4 which resolves the issue.
🎉 2
6 Views