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
❯❯❯ bazel build //js:js
DEBUG: /usr/home/sudopk/IdeaProjects/BazelWorkspace/WORKSPACE.bazel:18:6: Kotlinc version: 1.9.10
DEBUG: /home/sudopk/.cache/bazel/_bazel_sudopk/2eb1a85c08b2594eebc03baccb1b8f6f/external/rules_jvm_external~5.3/private/extensions/maven.bzl:141:14: The maven repository 'maven' is used in two different bazel modules, originally in '' and now in 'protobuf'
DEBUG: /home/sudopk/.cache/bazel/_bazel_sudopk/2eb1a85c08b2594eebc03baccb1b8f6f/external/rules_jvm_external~5.3/coursier.bzl:593:18: Found duplicate artifact versions
com.google.code.gson:gson has multiple versions 2.8.6, 2.8.9
com.google.guava:guava has multiple versions 30.0-jre, 31.1-jre
Please remove duplicate artifacts from the artifact list so you do not get unexpected artifact versions
INFO: Analyzed target //js:js (94 packages loaded, 4053 targets configured).
INFO: From Building external/rules_jvm_external~5.3/private/tools/java/com/github/bazelbuild/rules_jvm_external/librules_jvm_external.jar (4 source files) [for tool]:
warning: [options] source value 8 is obsolete and will be removed in a future release
warning: [options] target value 8 is obsolete and will be removed in a future release
warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
INFO: From Building external/rules_jvm_external~5.3/private/tools/java/com/github/bazelbuild/rules_jvm_external/zip/libzip.jar (1 source file) [for tool]:
warning: [options] source value 8 is obsolete and will be removed in a future release
warning: [options] target value 8 is obsolete and will be removed in a future release
warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
INFO: From Building external/rules_jvm_external~5.3/private/tools/java/com/github/bazelbuild/rules_jvm_external/jar/AddJarManifestEntry.jar (1 source file) [for tool]:
warning: [options] source value 8 is obsolete and will be removed in a future release
warning: [options] target value 8 is obsolete and will be removed in a future release
warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
ERROR: /usr/home/sudopk/IdeaProjects/BazelWorkspace/js/BUILD.bazel:6:14: Compiling Kotlin to JS //js:js { kt: 1 } failed: (Exit 1): build failed: error executing KotlinCompile command (from target //js:js) bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/rules_kotlin/src/main/kotlin/build '--flagfile=bazel-out/k8-fastbuild/bin/js/js.js-0.params'
error: could not find "/home/sudopk/.cache/bazel/_bazel_sudopk/2eb1a85c08b2594eebc03baccb1b8f6f/execroot/_main/./bazel-out/k8-fastbuild/bin/external/rules_jvm_external~5.3~maven~maven/v1/https/jcenter.bintray.com/org/jetbrains/kotlinx/kotlinx-html-js/0.6.12/processed_kotlinx-html-js-0.6.12.jar" in [/home/sudopk/.cache/bazel/_bazel_sudopk/2eb1a85c08b2594eebc03baccb1b8f6f/execroot/_main]
exception: java.lang.IllegalStateException: FATAL ERROR: Could not find "/home/sudopk/.cache/bazel/_bazel_sudopk/2eb1a85c08b2594eebc03baccb1b8f6f/execroot/_main/./bazel-out/k8-fastbuild/bin/external/rules_jvm_external~5.3~maven~maven/v1/https/jcenter.bintray.com/org/jetbrains/kotlinx/kotlinx-html-js/0.6.12/processed_kotlinx-html-js-0.6.12.jar" in [/home/sudopk/.cache/bazel/_bazel_sudopk/2eb1a85c08b2594eebc03baccb1b8f6f/execroot/_main]
at org.jetbrains.kotlin.ir.backend.js.KlibKt$resolverLogger$1.fatal(klib.kt:114)
at org.jetbrains.kotlin.library.KotlinLibrarySearchPathResolver.resolve(SearchPathResolver.kt:170)
at org.jetbrains.kotlin.library.SearchPathResolver.resolve$default(SearchPathResolver.kt:19)
at org.jetbrains.kotlin.library.SearchPathResolverKt.resolve(SearchPathResolver.kt:28)
at org.jetbrains.kotlin.library.metadata.resolver.impl.KotlinLibraryResolverImpl$findLibraries$userProvidedLibraries$1.invoke(KotlinLibraryResolverImpl.kt:58)
at org.jetbrains.kotlin.library.metadata.resolver.impl.KotlinLibraryResolverImpl$findLibraries$userProvidedLibraries$1.invoke(KotlinLibraryResolverImpl.kt:58)
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.SequencesKt___SequencesKt.toList(_Sequences.kt:809)
at org.jetbrains.kotlin.library.metadata.resolver.impl.KotlinLibraryResolverImpl.findLibraries(KotlinLibraryResolverImpl.kt:59)
at org.jetbrains.kotlin.library.metadata.resolver.impl.KotlinLibraryResolverImpl.resolveWithoutDependencies(KotlinLibraryResolverImpl.kt:40)
at org.jetbrains.kotlin.backend.common.CommonJsKLibResolver.resolveWithoutDependencies(CommonJsKLibResolver.kt:51)
at org.jetbrains.kotlin.ir.backend.js.ModulesStructure.<init>(klib.kt:486)
at org.jetbrains.kotlin.ir.backend.js.PrepareAnalyzedSourceModuleKt.prepareAnalyzedSourceModule(prepareAnalyzedSourceModule.kt:28)
at org.jetbrains.kotlin.ir.backend.js.PrepareAnalyzedSourceModuleKt.prepareAnalyzedSourceModule$default(prepareAnalyzedSourceModule.kt:17)
at org.jetbrains.kotlin.cli.js.K2JsIrCompiler.processSourceModule(K2JsIrCompiler.kt:425)
at org.jetbrains.kotlin.cli.js.K2JsIrCompiler.doExecute(K2JsIrCompiler.kt:276)
at org.jetbrains.kotlin.cli.js.K2JSCompiler.doExecute(K2JSCompiler.java:181)
at org.jetbrains.kotlin.cli.js.K2JSCompiler.doExecute(K2JSCompiler.java:72)
at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:100)
at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:46)
at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:101)
at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:79)
at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:40)
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 java.base/java.lang.reflect.Method.invoke(Method.java:566)
at io.bazel.kotlin.builder.toolchain.KotlinToolchain$KotlinCliToolInvoker.compile(KotlinToolchain.kt:213)
at io.bazel.kotlin.builder.tasks.js.Kotlin2JsTaskExecutor$compile$2.invoke(Kotlin2JsTaskExecutor.kt:63)
at io.bazel.kotlin.builder.tasks.js.Kotlin2JsTaskExecutor$compile$2.invoke(Kotlin2JsTaskExecutor.kt:63)
at io.bazel.kotlin.builder.toolchain.CompilationTaskContext.executeCompilerTask(CompilationTaskContext.kt:126)
at io.bazel.kotlin.builder.toolchain.CompilationTaskContext.executeCompilerTask$default(CompilationTaskContext.kt:118)
at io.bazel.kotlin.builder.tasks.js.Kotlin2JsTaskExecutor.compile(Kotlin2JsTaskExecutor.kt:63)
at io.bazel.kotlin.builder.tasks.js.Kotlin2JsTaskExecutor.execute(Kotlin2JsTaskExecutor.kt:32)
at io.bazel.kotlin.builder.tasks.KotlinBuilder.executeJsTask(KotlinBuilder.kt:173)
at io.bazel.kotlin.builder.tasks.KotlinBuilder.build(KotlinBuilder.kt:104)
at io.bazel.kotlin.builder.tasks.CompileKotlin.invoke(CompileKotlin.kt:27)
at io.bazel.worker.PersistentWorker$workTo$1.invoke(PersistentWorker.kt:97)
at io.bazel.worker.PersistentWorker$workTo$1.invoke(PersistentWorker.kt:97)
at io.bazel.worker.WorkerContext$TaskContext.resultOf(WorkerContext.kt:128)
at io.bazel.worker.WorkerContext.doTask(WorkerContext.kt:156)
at io.bazel.worker.PersistentWorker$start$1$1$producer$1$1.invoke$lambda$0(PersistentWorker.kt:70)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
Dec 21, 2023 5:14:42 PM worker request 0
SEVERE: Compilation failure: compile phase failed:Target //js:js failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 20.494s, Critical Path: 0.68s
INFO: 9 processes: 3 internal, 3 linux-sandbox, 3 worker.
ERROR: Build did NOT complete successfully
The file actually exists:
❯❯❯ ls -la /home/sudopk/.cache/bazel/_bazel_sudopk/2eb1a85c08b2594eebc03baccb1b8f6f/execroot/_main/./bazel-out/k8-fastbuild/bin/external/rules_jvm_external~5.3~maven~maven/v1/https/jcenter.bintray.com/org/jetbrains/kotlinx/kotlinx-html-js/0.6.12/processed_kotlinx-html-js-0.6.12.jar
-r-xr-xr-x 1 sudopk primarygroup 232107 Dec 21 17:14 /home/sudopk/.cache/bazel/_bazel_sudopk/2eb1a85c08b2594eebc03baccb1b8f6f/execroot/_main/./bazel-out/k8-fastbuild/bin/external/rules_jvm_external~5.3~maven~maven/v1/https/jcenter.bintray.com/org/jetbrains/kotlinx/kotlinx-html-js/0.6.12/processed_kotlinx-html-js-0.6.12.jar
Not sure if it is Kotlin IR backend issue or we are not setting some search path appropriately. But it works with kotlin_rules version v1.8.1 i.e. just replace the above http_archive with:
❯❯❯ bazel build //js:js
DEBUG: /usr/home/sudopk/IdeaProjects/BazelWorkspace/WORKSPACE.bazel:17:6: Kotlinc version: 1.8.21
INFO: Analyzed target //js:js (93 packages loaded, 4051 targets configured).
INFO: From Compiling Kotlin to JS //js:js { kt: 1 }:
warning: ==========
This project currently uses the Kotlin/JS Legacy compiler backend, which has been deprecated and will be removed in a future release.
Please migrate your project to the new IR-based compiler (https://kotl.in/jsir).
Because your build tool will not support the new Kotlin/JS compiler, you will also need to migrate to Gradle.
You can continue to use the deprecated legacy compiler in the current version of the toolchain by providing the compiler option -Xuse-deprecated-legacy-compiler.
==========
INFO: Found 1 target...
Target //js:js up-to-date:
bazel-bin/js/js.js
bazel-bin/js/js.js.map
INFO: Elapsed time: 6.354s, Critical Path: 3.93s
INFO: 5 processes: 4 internal, 1 worker.
INFO: Build completed successfully, 5 total actions
With 1.9.0:
I am using a dependency (any deps will do) via rules_jvm_external (version is immaterial, but i am using 5.3):
Then with rules:
Then following fails:
The file actually exists:
Not sure if it is Kotlin IR backend issue or we are not setting some search path appropriately. But it works with kotlin_rules version v1.8.1 i.e. just replace the above http_archive with:
Then:
This search result is somewhat related: https://youtrack.jetbrains.com/issue/KT-49894
The text was updated successfully, but these errors were encountered: