Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
local_java_runtime should create a public native#java_runtime
`local_java_repository` should expose the underlying `java_runtime` as public so that it can be used when creating custom java toolchains. I'm able to reproduce this using `5.0.0-pre.20210708.4` WORKSPACE ``` load("@bazel_tools//tools/jdk:local_java_repository.bzl", "local_java_repository") local_java_repository( name = "jdk11", java_home = "/tmp/jdk11/11.0.11_9/jdk-unarchived/", ) ``` BUILD.bazel ``` load("@bazel_tools//tools/jdk:default_java_toolchain.bzl", "default_java_toolchain") default_java_toolchain( name = "java11", java_runtime = "@jdk11//:jdk11", # ... visibility = ["//visibility:public"], ) ``` Error message ``` (00:44:56) ERROR: .../BUILD.bazel:64:23: in java_toolchain rule //:jdk11_java_toolchain: target '@jdk11//:jdk11' is not visible from target '//:jdk11_java_toolchain'. Check the visibility declaration of the former target if you think the dependency is legitimate ``` Closes #13739. PiperOrigin-RevId: 391237206
- Loading branch information