kotest / kotest-gradle-plugin

A gradle plugin for Kotest
https://kotest.io
Apache License 2.0
31 stars 5 forks source link

Compilation error when applying the plugin #55

Open CLOVIS-AI opened 3 months ago

CLOVIS-AI commented 3 months ago

Sorry in advance, I don't know anything about compiler plugin, so I don't know how to interpret this message at all. Maybe it's obvious.

Reproduction:

This creates the following compilation error:

e: Compilation failed: IrPropertyPublicSymbolImpl for opensavvy.prepared.runner.kotest/launcher|{}launcher[0] is already bound: PROPERTY name:launcher visibility:public modality:FINAL [val]

 * Source files: 
 * Compiler version: 2.0.0
 * Output kind: PROGRAM

e: java.lang.IllegalStateException: IrPropertyPublicSymbolImpl for opensavvy.prepared.runner.kotest/launcher|{}launcher[0] is already bound: PROPERTY name:launcher visibility:public modality:FINAL [val]
        at org.jetbrains.kotlin.ir.symbols.impl.IrBindablePublicSymbolBase.bind(IrPublicSymbolBase.kt:69)
        at org.jetbrains.kotlin.ir.declarations.impl.IrPropertyImpl.<init>(IrPropertyImpl.kt:65)
        at org.jetbrains.kotlin.ir.declarations.impl.AbstractIrFactoryImpl.createProperty(IrFactoryImpl.kt:297)

By using the good ol' method of commenting out code until it works, I believe this class is the one that causes the crash:

abstract class PreparedSpec(body: SuiteDsl.() -> Unit) : StringSpec({
    preparedSuite { body() }
})

I guess the plugin is trying to register it as an actual test because it implements StringSpec, but since it's abstract it can't?

sksamuel commented 2 months ago

Which version ?

CLOVIS-AI commented 2 months ago

Version of what? The Kotest plugin version is 5.9.1, as written in the issue.

sksamuel commented 2 months ago

Ok the compiler plugin not the kotest gradle plugin. Got it.