Hello! I hope this is the right place to submit this issue.
I am attempting to use j2cl@20250630 with jsinterop_base@1.1.1, but I get the following error:
❯ bazel build src/main/java/com/google/j2cl/samples/helloworld:helloworld
DEBUG: /home/reece/.cache/bazel/_bazel_reece/41a9ab5b7375ca59d673203c7a70444b/external/rules_jvm_external+/private/extensions/maven.bzl:351:18: The maven repository 'maven' has contributions from multiple bzlmod modules, and will be resolved together: ["j2cl", "jsinterop_base", "rules_closure", "rules_web_testing_java"]
DEBUG: /home/reece/.cache/bazel/_bazel_reece/41a9ab5b7375ca59d673203c7a70444b/external/rules_jvm_external+/private/lib/coordinates.bzl:76:18: Assuming com.google.escapevelocity:escapevelocity:jar:1.1 should be interpreted as com.google.escapevelocity:escapevelocity:1.1@jar
DEBUG: /home/reece/.cache/bazel/_bazel_reece/41a9ab5b7375ca59d673203c7a70444b/external/rules_jvm_external+/private/lib/coordinates.bzl:76:18: Assuming org.eclipse.jdt:org.eclipse.jdt.core:jar:3.22.0 should be interpreted as org.eclipse.jdt:org.eclipse.jdt.core:3.22.0@jar
DEBUG: /home/reece/.cache/bazel/_bazel_reece/41a9ab5b7375ca59d673203c7a70444b/external/rules_jvm_external+/private/lib/coordinates.bzl:76:18: Assuming org.eclipse.platform:org.eclipse.equinox.common:jar:3.12.0 should be interpreted as org.eclipse.platform:org.eclipse.equinox.common:3.12.0@jar
WARNING: /home/reece/.cache/bazel/_bazel_reece/41a9ab5b7375ca59d673203c7a70444b/external/rules_closure+/java/com/google/javascript/jscomp/BUILD:19:13: in java_library rule @@rules_closure+//java/com/google/javascript/jscomp:jscomp: target '@@rules_closure+//java/com/google/javascript/jscomp:jscomp' depends on deprecated target '@@rules_closure+//java/io/bazel/rules/closure:build_info_java_proto': Use java_proto_library from @com_google_protobuf//bazel:java_proto_library.bzl
INFO: Analyzed target //src/main/java/com/google/j2cl/samples/helloworld:helloworld (240 packages loaded, 7906 targets configured).
INFO: Multiplexer process for J2cl has closed its output stream
ERROR: /home/reece/.cache/bazel/_bazel_reece/41a9ab5b7375ca59d673203c7a70444b/external/jsinterop_base+/java/jsinterop/base/BUILD:43:13: Checking 1 JS files in @@jsinterop_base+//java/jsinterop/base:base-j2cl failed: (Exit 1): ClosureWorker failed: error executing Closure command (from target @@jsinterop_base+//java/jsinterop/base:base-j2cl) bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/rules_closure+/java/io/bazel/rules/closure/ClosureWorker ... (remaining 1 argument skipped)
bazel-out/k8-fastbuild/bin/external/jsinterop_base+/java/jsinterop/base/base-j2cl.js/jsinterop/base/InternalJsUtil.impl.java.js:181:
Originally at:
bazel-out/k8-fastbuild/bin/external/jsinterop_base+/java/jsinterop/base/base-j2cl.js/jsinterop/base/InternalJsUtil.native_js:91: ERROR - Namespace not provided by any srcs or direct deps of @@jsinterop_base+//java/jsinterop/base:base-j2cl.
const $Long_ = goog.require('goog.math.Long');
^
ProTip: "CR_NOT_PROVIDED" or "strictDependencies" can be added to the `suppress` attribute of:
@@jsinterop_base+//java/jsinterop/base:base-j2cl
1 error(s), 0 warning(s)
Target //src/main/java/com/google/j2cl/samples/helloworld:helloworld failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 14.252s, Critical Path: 6.32s
INFO: 104 processes: 935 action cache hit, 2 internal, 98 local, 4 worker.
ERROR: Build did NOT complete successfully
minimum_example.zip
Here is a minimum reproducible example. I started with https://github.com/google/j2cl/tree/master/samples/helloworld and added the following to MODULE.bazel
bazel_dep(
name = "jsinterop_base",
version = "1.1.1",
)
and I added the following to BUILD.bazel:
j2cl_library(
name = "helloworldlib",
srcs = glob([
"*.java",
"*.js",
]),
deps = [
"@j2cl//:jsinterop-annotations-j2cl",
"@jsinterop_base//:jsinterop-base-j2cl",
],
)
Is jsinterop-base not up to date with J2CL? Is there a version of J2CL that is compatible with jsinterop-base? Or is this a bug?
Thanks for any help!
Hello! I hope this is the right place to submit this issue.
I am attempting to use
j2cl@20250630withjsinterop_base@1.1.1, but I get the following error:minimum_example.zip
Here is a minimum reproducible example. I started with https://github.com/google/j2cl/tree/master/samples/helloworld and added the following to MODULE.bazel
and I added the following to BUILD.bazel:
Is jsinterop-base not up to date with J2CL? Is there a version of J2CL that is compatible with jsinterop-base? Or is this a bug?
Thanks for any help!