You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
BenchmarkMode annotation allows specifying multiple modes simultaneously [1], but only JVM benchmarks support it. For all other targets SuiteSourceGenerator fails as it expect at most one mode value [2]:
Execution failed for task ':benchmark:macosArm64BenchmarkGenerate'.
> There was a failure while executing work items
> A failure occurred while executing kotlinx.benchmark.gradle.NativeSourceGeneratorWorker
> List has more than one element.
...
Caused by: java.lang.IllegalArgumentException: List has more than one element.
at kotlin.collections.CollectionsKt___CollectionsKt.single(_Collections.kt:610)
at kotlinx.benchmark.gradle.SuiteSourceGenerator.generateBenchmark(SuiteSourceGenerator.kt:142)
at kotlinx.benchmark.gradle.SuiteSourceGenerator.processPackage(SuiteSourceGenerator.kt:107)
at kotlinx.benchmark.gradle.SuiteSourceGenerator.processPackage(SuiteSourceGenerator.kt:112)
at kotlinx.benchmark.gradle.SuiteSourceGenerator.processPackage(SuiteSourceGenerator.kt:112)
at kotlinx.benchmark.gradle.SuiteSourceGenerator.processPackage(SuiteSourceGenerator.kt:112)
at kotlinx.benchmark.gradle.SuiteSourceGenerator.processPackage(SuiteSourceGenerator.kt:112)
at kotlinx.benchmark.gradle.SuiteSourceGenerator.processPackage(SuiteSourceGenerator.kt:112)
at kotlinx.benchmark.gradle.SuiteSourceGenerator.generate(SuiteSourceGenerator.kt:80)
at kotlinx.benchmark.gradle.NativeSourceGeneratorWorker.execute(NativeSourceGeneratorTask.kt:78)
...
Multiple modes should be either supported across all targets, or the BenchmarkMode annotation should only accept a single argument in non-JVM source sets.
BenchmarkMode
annotation allows specifying multiple modes simultaneously [1], but only JVM benchmarks support it. For all other targetsSuiteSourceGenerator
fails as it expect at most one mode value [2]:Multiple modes should be either supported across all targets, or the
BenchmarkMode
annotation should only accept a single argument in non-JVM source sets.[1]
kotlinx-benchmark/runtime/commonMain/src/kotlinx/benchmark/CommonBenchmarkAnnotations.kt
Line 20 in 3f32f2d
[2] https://github.com/Kotlin/kotlinx-benchmark/blob/3f32f2d9d9732a2a01d231134c52e6554428b519/plugin/main/src/kotlinx/benchmark/gradle/SuiteSourceGenerator.kt#L142C19-L142C19
The text was updated successfully, but these errors were encountered: