Installation with bazel 6.0.0
- Dominant language
- Java
- Stars
- 3.8k
- Forks
- 345
- PR merge metrics
- No merged PRs in 30d
Description
I was using copybara by building binary with bazel and have used bazelisk for a version management.
However, from yesterday, as releasing of bazel 6.0.0, the bazelisk on my local starts to use 6.0.0 and fails when building copybara binary.
```
bazel build //java/com/google/copybara:copybara_deploy.jar
2022/12/20 16:35:49 Downloading https://releases.bazel.build/6.0.0/release/bazel-6.0.0-darwin-x86_64...
Extracting Bazel installation...
Starting local Bazel server and connecting to it...
ERROR: /Users/user/copybara/third_party/BUILD:159:13: in java_library rule //third_party:starlark: target '@io_bazel//src/main/java/net/starlark/java/annot:annot' is not visible from target '//third_party:starlark'. Check the visibility declaration of the former target if you think the dependency is legitimate
ERROR: /Users/user/copybara/third_party/BUILD:159:13: in java_library rule //third_party:starlark: target '@io_bazel//src/main/java/net/starlark/java/eval:eval' is not visible from target '//third_party:starlark'. Check the visibility declaration of the former target if you think the dependency is legitimate
ERROR: /Users/user/copybara/third_party/BUILD:159:13: in java_library rule //third_party:starlark: target '@io_bazel//src/main/java/net/starlark/java/syntax:syntax' is not visible from target '//third_party:starlark'. Check the visibility declaration of the former target if you think the dependency is legitimate
ERROR: /Users/user/copybara/third_party/BUILD:159:13: Analysis of target '//third_party:starlark' failed
ERROR: Analysis of target '//java/com/google/copybara:copybara_deploy.jar' failed; build aborted:
INFO: Elapsed time: 50.543s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (92 packages loaded, 1625 targets configured)
Fetching repository @maven; Resolving and fetching the transitive closure of 26 artifact(s).. 19s
```
It seems one of the thirdparty is not working well with new release of bazel.
Current workaround would be using `USE_BAZEL_VERSION=5.x.x bazel build //java/com/google/copybara:copybara_deploy.jar`
How about adding `.bazelversion` in this repo and specify the recommended version in the file for bazel users?
https://github.com/bazelbuild/bazelisk#how-does-bazelisk-know-which-bazel-version-to-run
Contributor guide
Assessment
This issue has not been assessed yet.