kotlinx-benchmark
kotlinx-benchmark copied to clipboard
Multiple issues when running on K/JS
Attached is a sample project to reproduce two issues. benchmark-js-repro.zip
-
Re-declaration of dependencies.
In thebenchmarks
module you're forced to re-declare allcore
dependencies and transitive dependencies. -
Having files under
commonMain/resources
inbenchmarks
will block the entire build, with an error like:Cause: e: Could not find "...\benchmark-js-repro\benchmarks\build\processedResources\js\main" in [...\benchmark-js-repro]`
Same issues for the wasmJs
target.
Hi @lppedd Thanks for the feedback!
We will try to fix the issues ASAP.
Thanks @qurbonzoda! FYI, same issues for native targets.
e: Could not find "C:\Users\edoardo.luppi\IdeaProjects\antlr-kotlin\antlr-kotlin-benchmarks\build\processedResources\mingwX64\main" in [C:\Users\edoardo.luppi\IdeaProjects\antlr-kotlin, C:\Users\edoardo.luppi\.konan\klib, C:\Users\edoardo.luppi\.konan\kotlin-native-prebuilt-windows-x86_64-1.9.22\klib\common, C:\Users\edoardo.luppi\.konan\kotlin-native-prebuilt-windows-x86_64-1.9.22\klib\platform\mingw_x64]
Hey @qurbonzoda, any news on this? Right now I'm only running stuff on JVM, but I'd like to standardize the benchmarking for all supported platforms.
Hi, I am also facing this issue - have to duplicate dependencies for the JS target.
kotlinx-benchmark: 0.4.11
The error:
Execution failed for task ':snake-kmp-benchmarks:jsBenchmarkGenerate'.
> e: KLIB resolver: Could not find "net.thauvin.erik.urlencoder:urlencoder-lib" in [.../snakeyaml-engine-kmp]
Stacktrace
* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':snake-kmp-benchmarks:jsBenchmarkGenerate'.
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.lambda$executeIfValid$1(ExecuteActionsTaskExecuter.java:130)
....
at org.gradle.internal.concurrent.AbstractManagedExecutor$1.run(AbstractManagedExecutor.java:47)
Caused by: java.lang.IllegalStateException: e: KLIB resolver: Could not find "net.thauvin.erik.urlencoder:urlencoder-lib" in [/home/oleg.smirnov/Projects/private/snakeyaml-engine-kmp]
at kotlinx.benchmark.gradle.KlibResolverKt$libraryResolver$logger$1.fatal(KlibResolver.kt:76)
at org.jetbrains.kotlin.library.KotlinLibrarySearchPathResolver.resolve(SearchPathResolver.kt:281)
at org.jetbrains.kotlin.library.SearchPathResolver.resolve$default(SearchPathResolver.kt:111)
at org.jetbrains.kotlin.library.SearchPathResolverKt.resolve(SearchPathResolver.kt:120)
at org.jetbrains.kotlin.library.metadata.resolver.impl.KotlinLibraryResolverImpl.resolveDependencies$lambda$15$lambda$13(KotlinLibraryResolverImpl.kt:119)
at kotlin.sequences.TransformingSequence$iterator$1.next(Sequences.kt:210)
at kotlin.sequences.FilteringSequence$iterator$1.calcNext(Sequences.kt:170)
at kotlin.sequences.FilteringSequence$iterator$1.hasNext(Sequences.kt:194)
at kotlin.sequences.TransformingSequence$iterator$1.hasNext(Sequences.kt:214)
at kotlin.sequences.FilteringSequence$iterator$1.calcNext(Sequences.kt:169)
at kotlin.sequences.FilteringSequence$iterator$1.hasNext(Sequences.kt:194)
at kotlin.sequences.SequencesKt___SequencesKt.toList(_Sequences.kt:809)
at org.jetbrains.kotlin.library.metadata.resolver.impl.KotlinLibraryResolverImpl.resolveDependencies(KotlinLibraryResolverImpl.kt:132)
at org.jetbrains.kotlin.library.metadata.resolver.KotlinLibraryResolver.resolveWithDependencies(KotlinLibraryResolver.kt:27)
at kotlinx.benchmark.gradle.KlibResolverKt.createModuleDescriptor(KlibResolver.kt:38)
at kotlinx.benchmark.gradle.JsSourceGeneratorTask.loadIr(JsSourceGeneratorTask.kt:67)
at kotlinx.benchmark.gradle.JsSourceGeneratorTask.generateSources(JsSourceGeneratorTask.kt:51)
at kotlinx.benchmark.gradle.JsSourceGeneratorTask.generate(JsSourceGeneratorTask.kt:46)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
...
at org.gradle.internal.concurrent.AbstractManagedExecutor$1.run(AbstractManagedExecutor.java:47)
I believe this is the issue. I think you need to use runtime dependencies