Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bazel 8 + rules_java 8 compatibility updates #1710

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 12 additions & 11 deletions .bazelci/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,17 @@ tasks:
# Install xmllint
- sudo apt update && sudo apt install --reinstall libxml2-utils -y
- "./test_rules_scala.sh"
test_rules_scala_linux_latest:
name: "./test_rules_scala (latest Bazel)"
# Switch `last_rc` to `last_green` once Bzlmod lands.
# https://github.com/bazelbuild/rules_scala/issues/1482
test_rules_scala_linux_last_rc:
name: "./test_rules_scala (last_rc Bazel)"
platform: ubuntu2004
# Restore `bazel: latest` once Bazel 8 compatibility lands (#1625, #1652).
bazel: 7.x
bazel: last_rc
shell_commands:
# Install xmllint
- sudo apt update && sudo apt install --reinstall libxml2-utils -y
- echo "build --enable_workspace" >> .bazelrc
- "./test_rules_scala.sh || buildkite-agent annotate --style 'warning' \"Optional build with latest Bazel version failed, [see here](${BUILDKITE_BUILD_URL}#${BUILDKITE_JOB_ID}) (It is not mandatory but worth checking)\""
- "./test_rules_scala.sh || buildkite-agent annotate --style 'warning' \"Optional build with last_rc Bazel version failed, [see here](${BUILDKITE_BUILD_URL}#${BUILDKITE_JOB_ID}) (It is not mandatory but worth checking)\""
test_rules_scala_macos:
name: "./test_rules_scala"
platform: macos
Expand All @@ -53,16 +54,16 @@ tasks:
- "set PATH=/usr/bin;%PATH%" #Make sure bash uses msys commands over windows commands. (i.e. find).
- "bash -lc \"pacman --noconfirm --needed -S libxml2\"" #tests require xmllint
- "bash test_rules_scala.sh"
test_coverage_linux_6_5_0:
test_coverage_linux_7_5_0:
name: "./test_coverage"
platform: ubuntu2004
bazel: 6.5.0
bazel: 7.5.0
shell_commands:
- "./test_coverage.sh"
test_coverage_macos_6.5.0:
test_coverage_macos_7.5.0:
name: "./test_coverage"
platform: macos
bazel: 6.5.0
bazel: 7.5.0
shell_commands:
- "./test_coverage.sh"
test_reproducibility_linux:
Expand Down Expand Up @@ -93,13 +94,13 @@ tasks:
examples_linux:
name: "./test_examples"
platform: ubuntu2004
bazel: 6.5.0
bazel: 7.5.0
shell_commands:
- "./test_examples.sh"
cross_build_linux:
name: "./test_cross_build"
platform: ubuntu2004
bazel: 6.5.0
bazel: 7.5.0
shell_commands:
- "./test_cross_build.sh"
lint_linux:
Expand Down
13 changes: 9 additions & 4 deletions .bazelrc
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
# Switch to --noenable_workspace when Bzlmod lands.
# https://github.com/bazelbuild/rules_scala/issues/1482
common --enable_workspace --noenable_bzlmod

# Remove once proto toolchainization becomes the default
# - https://bazel.build/reference/command-line-reference#flag--incompatible_enable_proto_toolchain_resolution
# - https://docs.google.com/document/d/1CE6wJHNfKbUPBr7-mmk_0Yo3a4TaqcTPE0OWNuQkhPs/edit
common --incompatible_enable_proto_toolchain_resolution

build --enable_platform_specific_config

#Windows needs --worker_quit_after_build due to workers not being shut down when the compiler tools need to be rebuilt (resulting in 'file in use' errors). See Bazel Issue#10498.

build:windows --worker_quit_after_build --enable_runfiles

# Remove upon completing Bzlmod compatibility work.
# - https://github.com/bazelbuild/rules_scala/issues/1482
build --noenable_bzlmod
2 changes: 1 addition & 1 deletion .bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.5.0
7.5.0
Loading