I'm trying to run a test in `commonTest` sourceset...
# multiplatform
v
I'm trying to run a test in
commonTest
sourceset, and the run icon in the gutter is not asking to select android/jvm/ios etc, it just runs and then shows > Test events were not received This is the command its running
Copy code
[:shared:data:cleanIosSimulatorArm64Test, :shared:data:iosSimulatorArm64Test, --tests, <my-package>.MyTest]
Its also logging this error in the logs
Copy code
e: Compilation failed: 'org.jetbrains.kotlin.ir.expressions.IrConstructorCall org.jetbrains.kotlin.ir.builders.ExpressionHelpersKt.irCall(org.jetbrains.kotlin.ir.builders.IrBuilderWithScope, org.jetbrains.kotlin.ir.symbols.IrConstructorSymbol)'
 * Source files: ApplicationMapperTest.kt, ArticleMapperTest.kt, CommentsMapperTest.kt, CompetitionMapperTest.kt, ConversationMapperTest.kt, IdeaMapperTest.kt, JobMapperTest.kt, MessageMapperTest.kt, NewsMediaMapperTest.kt, PostMapperTest.kt, ReplyMapperTest.kt
 * Compiler version: 2.2.0
 * Output kind: LIBRARY
e: java.lang.NoSuchMethodError: 'org.jetbrains.kotlin.ir.expressions.IrConstructorCall org.jetbrains.kotlin.ir.builders.ExpressionHelpersKt.irCall(org.jetbrains.kotlin.ir.builders.IrBuilderWithScope, org.jetbrains.kotlin.ir.symbols.IrConstructorSymbol)'
	at io.kotest.framework.multiplatform.embeddablecompiler.NativeTransformer.generateLauncher(NativeTransformer.kt:36)
	at io.kotest.framework.multiplatform.embeddablecompiler.Transformer.visitModuleFragment(Transformer.kt:65)
	at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitModuleFragment(IrElementTransformerVoid.kt:107)
	at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitModuleFragment(IrElementTransformerVoid.kt:19)
	at org.jetbrains.kotlin.ir.declarations.IrModuleFragment.accept(IrModuleFragment.kt:36)
	at org.jetbrains.kotlin.ir.declarations.IrModuleFragment.transform(IrModuleFragment.kt:39)
	at org.jetbrains.kotlin.ir.declarations.IrModuleFragment.transform(IrModuleFragment.kt:33)
	at io.kotest.framework.multiplatform.embeddablecompiler.SpecIrGenerationExtension.generate(SpecIrGenerationExtension.kt:23)
i have both kotest and kotlin-tests in my project but the one i am running is a kotlin test
t
according to stacktrace your kotest version in the project is not compatible with Kotlin version in the project
j
Hi @Vaibhav Jaiswal did you find a fix for this? I have the same issue since Kotlin 2.2.0 but I am not using kotest
v
Not fixed yet, although I found that I have to upgrade Kotest, as the version I am using is not compatible with 2.2.0.
probably some library which you are using, is not compatible with 2.2.0
j
I also did find out if you setup a new KMP project with the provided KMP wizard, its the same behavior there on a fresh project. Downgrade to 2.1.21 and its allowing a selection of the runtime again. But downgrading Kotlin is currently only causing more issues in our project...