Kotlin / kotlin-jupyter

Kotlin kernel for Jupyter/IPython
Apache License 2.0
1.09k stars 106 forks source link

Using `jupyter.api` Gradle plugin breaks when I use Kotest 5.8.0 in my project #452

Closed Jolanrensen closed 3 months ago

Jolanrensen commented 4 months ago

We use the jupyter.api Gradle plugin in our build as well as JupyterReplTestCase() in our tests to test Jupyter integration.

But somehow, the Jupyter testkit API attempts to take my project's version of kotest-assertions-core (which I set to 5.8.0), breaking calls to shouldBe with NoSuchMethodErrors:

Caused by: java.lang.NoSuchMethodError: 'void io.kotest.matchers.ShouldKt.shouldBe(java.lang.Object, java.lang.Object)'
    at org.jetbrains.kotlinx.jupyter.testkit.JupyterReplTestCase.execSuccess(JupyterReplTestCase.kt:68)
    at org.jetbrains.kotlinx.jupyter.testkit.JupyterReplTestCase.execRendered(JupyterReplTestCase.kt:30)
    at org.jetbrains.kotlinx.dataframe.jupyter.RenderingTests.executeScriptAndParseDataframeResult(RenderingTests.kt:245)

If I set my project's version of kotest to 5.5.4, there's no issue. This should probably be separated somehow.