Repository navigation
Fix and update Bazel build/test configuration: - #483
Merged
Merged
Conversation
copybara-service
Bot
force-pushed
the
test_996790401
branch
from
October 12, 2026 21:03
7325442 to
af9cfb8
Compare
.bazelrc's default JDK 21 runtime.
copybara-service
Bot
force-pushed
the
test_996790401
branch
2 times, most recently
from
October 13, 2026 20:23
61cc4e4 to
95b8100
Compare
- Run Bazel CI tests under the configured matrix JDK runtimes rather than always using `.bazelrc`'s default runtime (which prior to this CL was JDK 21). - Standardize the version matrix on [8, 11, 25]. - I will have to bypass the Copybara presubmit for this CL because it will still be looking for a JDK 22 Flogger job instead of the new JDK 25 job (b/360096677). Maybe I should rename all our projects' "25" jobs to "latest LTS".... - I will "have to" update [the Flogger branch-protection rules](https://github.com/google/flogger/settings/branch_protection_rules/42636378) to require the new JDK 25 job instead of the JDK 22 job that I'm removing. (IIRC, nothing actually blocks on that, but it's nice for it to match our "real" rules.) - Huh, apparently GitHub is nudging me from branch-protection rules to ["rulesets."](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-rulesets/about-rulesets) I'm not going to worry about that now. - For Bazel toolchain/`exec` operations, use a JDK 25 (including allowing Java 25 language features), and for the `bazel`/`mvn` VM itself, have CI request JDK 27. - 25 (as the most recent LTS) is the newest version that Bazel has available for automatic download across all platforms. (It has 27 for Linux only.) - For selecting the language version, use `--java_language_version=8` instead of `--release` or `-source -target`. It's shorter and more standard, and Bazel even silences the deprecation warning that we'd otherwise see when targeting 8. - Remove redundant debug-info javac options (`-g`) in Flogger: `rules_java` enables it (along with `-parameters`) by default nowadays. - Enable `--experimental_one_version_enforcement=error` as widely as we can. - Upgrade Flogger's `bazel_common` dep. - Set `test --test_env=TZ=UTC`. - Configure `ci.yml` to cache the right(?) Bazel information (`~/.cache/bazel/*/cache`, including `cache/repos/v1`, instead of `~/.cache/bazel/*/*/external`). Prep work: - Skip Flogger tests that use Mockito under Java 8. Mockito 5+ requires Java 11+. (It would make sense to skip under Java 9 and Java 10, too, but meh.) - Set `--jvmopt=-Dnet.bytebuddy.experimental=true` for Flogger to enable support for Java-25 class files. Compare cl/996591293. RELNOTES=n/a PiperOrigin-RevId: 998856377
copybara-service
Bot
force-pushed
the
test_996790401
branch
from
October 13, 2026 20:32
95b8100 to
519e32b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix and update Bazel build/test configuration:
.bazelrc's default runtime (which prior to this CL was JDK 21).execoperations, use a JDK 25 (including allowing Java 25 language features), and for thebazel/mvnVM itself, have CI request JDK 27.--java_language_version=8instead of--releaseor-source -target. It's shorter and more standard, and Bazel even silences the deprecation warning that we'd otherwise see when targeting 8.-g) in Flogger:rules_javaenables it (along with-parameters) by default nowadays.--experimental_one_version_enforcement=erroras widely as we can.bazel_commondep.test --test_env=TZ=UTC.ci.ymlto cache the right(?) Bazel information (~/.cache/bazel/*/cache, includingcache/repos/v1, instead of~/.cache/bazel/*/*/external).Prep work:
--jvmopt=-Dnet.bytebuddy.experimental=truefor Flogger to enable support for Java-25 class files.Compare cl/996591293.
RELNOTES=n/a