bazelbuild / rules_android

Android rules for Bazel
Apache License 2.0
180 stars 44 forks source link

Error no such target '@@remote_java_tools_darwin_x86_64//:turbine_direct_graal': target 'turbine_direct_graal' not declared in package . #187

Open sgowroji opened 11 months ago

sgowroji commented 11 months ago

https://buildkite.com/bazel/bazel-at-head-plus-downstream/builds/3475#018befa0-897f-4305-ba79-e7db65fe80ac

Platform : MacOS, Windows, Ubuntu

Logs:

ERROR: /private/var/tmp/_bazel_buildkite/86e19d84a76f56599b2e5581bfd6abc4/external/remote_java_tools_darwin_x86_64/BUILD: no such target '@@remote_java_tools_darwin_x86_64//:turbine_direct_graal': target 'turbine_direct_graal' not declared in package '' defined by /private/var/tmp/_bazel_buildkite/86e19d84a76f56599b2e5581bfd6abc4/external/remote_java_tools_darwin_x86_64/BUILD (Tip: use `query "@remote_java_tools_darwin_x86_64//:*"` to see all the targets in that package)
(03:09:40) ERROR: /private/var/tmp/_bazel_buildkite/86e19d84a76f56599b2e5581bfd6abc4/external/rules_java_builtin/toolchains/BUILD:162:14: no such target '@@remote_java_tools_darwin_x86_64//:turbine_direct_graal': target 'turbine_direct_graal' not declared in package '' defined by /private/var/tmp/_bazel_buildkite/86e19d84a76f56599b2e5581bfd6abc4/external/remote_java_tools_darwin_x86_64/BUILD (Tip: use `query "@remote_java_tools_darwin_x86_64//:*"` to see all the targets in that package) and referenced by '@@rules_java_builtin//toolchains:turbine_direct_graal_darwin_x86_64'
(03:09:40) ERROR: Analysis of target '//tools/jdk:toolchain_android_only' failed; build aborted: Analysis failed

Steps:

git clone https://github.com/bazelbuild/rules_android.git
git reset d23c54ad7e1bb5880096e002bc7ea3baa06f1664 --hard
export USE_BAZEL_VERSION=88cfacc4ff68d616fee981be55daaeaa760f5b3e
bazel build  //android/... //src/... -//src/java/com/example/sampleapp/... //test/... -//test/rules/... //toolchains/... //tools/... -//tools/android/... -//src/tools/ak/rjar:rjar_test -//src/tools/ak/rjar/testdata/... -//src/tools/ak/shellapk:shellapk_test -//src/tools/ak/shellapk/testdata/...

CC Greenteam @mai93

ted-xie commented 11 months ago

There appear to be multiple concurrent problems. Without bzlmod disabled: no such target '@@remote_java_tools_linux//:turbine_direct_graal': target 'turbine_direct_graal' not declared in package ''

With bzlmod enabled:Unable to find package for @@rules_java~7.1.0//java:defs.bzl: The repository '@@rules_java~7.1.0' could not be resolved: Repository '@@rules_java~7.1.0' is not defined.

This is from sgowroji's repro command in the first comment in the thread. It looks like something is deeply wrong with how rules_java, rules_java_tools, and rules_android are interacting.

sgowroji commented 9 months ago

Hi @ted-xie, Any update on the above issue. Thanks!

sgowroji commented 9 months ago

Hi Team, The above CI is still failing in downstream, We will be moving it to disabled CI pipelines until this issue gets fixed. Thanks!