commit | cfc2d1d98f827787b80d9c211fc17f97b03c558b | [log] [tgz] |
---|---|---|
author | Ben Lee <ben@ben.cm> | Tue Aug 17 01:43:04 2021 -0700 |
committer | Copybara-Service <copybara-worker@google.com> | Tue Aug 17 01:44:19 2021 -0700 |
tree | 2c52284f65872b7e627df09a972f427fbd1edaea | |
parent | 115da04065e09bf35dfd43a9a668c91366703584 [diff] |
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
{Fast, Correct} - Choose two
Build and test software of any size, quickly and reliably.
Speed up your builds and tests: Bazel rebuilds only what is necessary. With advanced local and distributed caching, optimized dependency analysis and parallel execution, you get fast and incremental builds.
One tool, multiple languages: Build and test Java, C++, Android, iOS, Go, and a wide variety of other language platforms. Bazel runs on Windows, macOS, and Linux.
Scalable: Bazel helps you scale your organization, codebase, and continuous integration solution. It handles codebases of any size, in multiple repositories or a huge monorepo.
Extensible to your needs: Easily add support for new languages and platforms with Bazel's familiar extension language. Share and re-use language rules written by the growing Bazel community.
Follow our tutorials:
See CONTRIBUTING.md