Skip to content

Can't run j2cl on Bazel 6 #200

Description

@sgammon

Describe the bug
I'm trying to run some J2CL builds on a Bazel 6 project, but I encounter the following error:

INFO: Invocation ID: a1fff5c4-4b69-439d-a75f-e730e8c490f7
ERROR: /private/var/tmp/_bazel_sam/89d3dd8c1880937e8b55a8dc2c815fe0/external/bazel_tools/tools/jdk/BUILD:124:6: no such target '@rules_java~6.2.2~toolchains~local_jdk//:jar': target 'jar' not declared in package '' defined by /private/var/tmp/_bazel_sam/89d3dd8c1880937e8b55a8dc2c815fe0/external/rules_java~6.2.2~toolchains~local_jdk/BUILD.bazel (Tip: use `query "@@rules_java~6.2.2~toolchains~local_jdk//:*"` to see all the targets in that package) and referenced by '@bazel_tools//tools/jdk:jar'

I'm using bzlmod with rules_java, which seems to be doing something creative with local_jdk. Is there any way I can fix this?

To Reproduce
It's a brand new Bazel 6 project with J2CL added via the standard directions. I can provide a reproducer if needed.

Bazel version
Please include version of Bazel that you are running J2CL with:

Aspect CLI version: 5.5.4
Build label: 6.2.1
Build target: bazel-out/darwin_arm64-opt/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Fri Jun 2 17:00:10 2023 (1685725210)
Build timestamp: 1685725210
Build timestamp as int: 1685725210

Expected behavior
It should be able to run the build under Bazel 6, ideally.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions