Skip to content

Commit

Permalink
Bump to rules_java 7.12.2
Browse files Browse the repository at this point in the history
Bazel 6.5.0 builds.

Bazel 7.4.1 fails with the same error mentioned in bazelbuild#1619. See the notes
under "Bump to rules_java 7.9.0 for Bazel 7 compatibility" from commit
cd22d88:

```txt
$ USE_BAZEL_VERSION=7.4.1 bazel build \
    //{src,jmh,test,third_party,scala_proto}/...

ERROR: .../external/rules_java_builtin/toolchains/BUILD:254:14:
  While resolving toolchains for target
  @@rules_java_builtin//toolchains:platformclasspath (096dcc8):
  No matching toolchains found for types
  @@bazel_tools//tools/jdk:bootstrap_runtime_toolchain_type.

ERROR: Analysis of target '//test/toolchains:java21_toolchain' failed;
  build aborted: Analysis failed
```

Bazel 8.0.0rc6 and 8.0.0rc7 fail as described in the previous commit.

---

Without the `WORKSPACE` updates from earlier, Bazel 6.5.0 fails with a
similar error to 7.4.1 with the `WORKSPACE` update:

```txt
$ bazel build //{src,jmh,test,third_party,scala_proto}/...

[ ...snip... ]
ERROR: .../rules_java/toolchains/BUILD:285:14:
  While resolving toolchains for target
  @rules_java//toolchains:platformclasspath:
  No matching toolchains found for types
  @rules_java//toolchains:bootstrap_runtime_toolchain_type.

ERROR: Analysis of target '//test:CheckBytecodeMajorVersion' failed;
  build aborted:
```

Bazel 7.4.1 fails with a different error:

```txt
$ bazel build //{src,jmh,test,third_party,scala_proto}/...

ERROR: .../external/remote_java_tools_darwin_arm64/BUILD: no such target
  '@@remote_java_tools_darwin_arm64//:prebuilt_one_version':
  target 'prebuilt_one_version' not declared in package ''
  defined by .../external/remote_java_tools_darwin_arm64/BUILD

ERROR: .../external/rules_java/toolchains/BUILD:163:14: no such target
  '@@remote_java_tools_darwin_arm64//:prebuilt_one_version':
  target 'prebuilt_one_version' not declared in package ''
  defined by .../external/remote_java_tools_darwin_arm64/BUILD
  and referenced by
  '@@rules_java//toolchains:prebuilt_one_version_darwin_arm64'

ERROR: Analysis of target
  '//test/src/main/resources/java_sources:CompiledWithJava8' failed;
  build aborted: Analysis failed
```
  • Loading branch information
mbland committed Dec 5, 2024
1 parent cf5ec75 commit 4dbcc7b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scala/private/macros/scala_repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,9 @@ def load_rules_dependencies():
http_archive(
name = "rules_java",
urls = [
"https://github.com/bazelbuild/rules_java/releases/download/7.9.0/rules_java-7.9.0.tar.gz",
"https://github.com/bazelbuild/rules_java/releases/download/7.12.2/rules_java-7.12.2.tar.gz",
],
sha256 = "41131de4417de70b9597e6ebd515168ed0ba843a325dc54a81b92d7af9a7b3ea",
sha256 = "a9690bc00c538246880d5c83c233e4deb83fe885f54c21bb445eb8116a180b83",
)

if not native.existing_rule("rules_proto"):
Expand Down

0 comments on commit 4dbcc7b

Please sign in to comment.