Repository navigation
Commit 20f92cf
committed
bazel: Upgrade rules_java to 9.1.0 in WORKSPACE to support JDK 25
The WORKSPACE build pinned rules_java 8.15.2, whose newest bundled JDK is
21. Bazel's default --java_runtime_version is local_jdk, so on a host whose
default JDK is newer than 21 the javac toolchain cannot target it and the
build fails:
error: [BazelJavaConfiguration] The Java 21 runtime used to run javac is
not recent enough to compile for the Java 25 runtime in external/local_jdk.
This started failing in CI when GitHub's ubuntu-latest runner image moved
from Ubuntu 24.04 (default JDK 17) to 26.04 (default JDK 25). The bzlmod
build was unaffected because MODULE.bazel already uses rules_java 9.1.0.
Upgrade the WORKSPACE build to the same rules_java 9.1.0. Since 8.16,
rules_java_deps.bzl loads @bazel_features, so bazel_features_deps() must
now run before rules_java_dependencies(). examples/ has its own WORKSPACE,
so apply the same change there.1 parent 15d64a4 commit 20f92cf
2 files changed
Lines changed: 12 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | 20 | | |
25 | 21 | | |
26 | 22 | | |
27 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | 35 | | |
40 | 36 | | |
41 | 37 | | |
42 | 38 | | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| |||
0 commit comments