I recently upgraded to Kotlin 1.7.0 & Kotest 5...
# kotest
r
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
do you use kotlin/js?
r
Nope, JVM only.
e
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
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
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
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
@Emil Kantis , did you check out the kotest branch? Main works as it is a plain spring app generated w/ spring initializr
r
🤦‍♂️ 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
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