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

Test against bazel 8.0.0 #19948

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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
4 changes: 2 additions & 2 deletions .github/workflows/test_bazel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
fail-fast: false
matrix:
runner: [ ubuntu, windows, macos ]
bazelversion: [ '7.1.2' ]
bazelversion: [ '7.1.2', '8.0.0' ]
bzlmod: [ true, false ]
toolchain_resolution: [ "", "--incompatible_enable_proto_toolchain_resolution=true" ]
runs-on: ${{ matrix.runner }}-latest
Expand Down Expand Up @@ -58,4 +58,4 @@ jobs:
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }}
bazel-cache: examples
version: ${{ matrix.bazelversion }}
bash: cd examples && bazel build //... $BAZEL_FLAGS --enable_bzlmod=${{ matrix.bzlmod }} ${{ matrix.toolchain_resolution }}
bash: cd examples && bazel build //... $BAZEL_FLAGS --subcommands --verbose_failures --enable_bzlmod=${{ matrix.bzlmod }} --enable_workspace=${{ !matrix.bzlmod }} ${{ matrix.toolchain_resolution }}
8 changes: 4 additions & 4 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ module(
# https://bazel.build/versions/6.0.0/build/bzlmod#version-resolution
# Thus the highest version in their module graph is resolved.
bazel_dep(name = "abseil-cpp", version = "20240722.0", repo_name = "com_google_absl")
bazel_dep(name = "bazel_skylib", version = "1.7.0")
bazel_dep(name = "bazel_skylib", version = "1.7.1")
bazel_dep(name = "jsoncpp", version = "1.9.6")
bazel_dep(name = "apple_support", version = "1.15.1", repo_name = "build_bazel_apple_support")
bazel_dep(name = "rules_cc", version = "0.0.16")
bazel_dep(name = "rules_cc", version = "0.0.17")
bazel_dep(name = "rules_fuzzing", version = "0.5.2")
bazel_dep(name = "rules_java", version = "8.3.2")
bazel_dep(name = "rules_java", version = "8.6.1")
bazel_dep(name = "rules_jvm_external", version = "6.3")
bazel_dep(name = "rules_kotlin", version = "1.9.6")
bazel_dep(name = "rules_license", version = "1.0.0")
bazel_dep(name = "rules_pkg", version = "1.0.1")
bazel_dep(name = "rules_python", version = "0.28.0")
bazel_dep(name = "rules_python", version = "0.40.0")
bazel_dep(name = "rules_rust", version = "0.51.0")
bazel_dep(name = "platforms", version = "0.0.8")
bazel_dep(name = "zlib", version = "1.3.1")
Expand Down
14 changes: 6 additions & 8 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,13 @@ load("//:protobuf_deps.bzl", "PROTOBUF_MAVEN_ARTIFACTS", "protobuf_deps")

protobuf_deps()

load("//:protobuf_extra_deps.bzl", "protobuf_extra_deps")
load("@rules_java//java:rules_java_deps.bzl", "rules_java_dependencies")

protobuf_extra_deps()
rules_java_dependencies()

load("@rules_java//java:repositories.bzl", "rules_java_toolchains")

rules_java_toolchains()

load("@bazel_features//:deps.bzl", "bazel_features_deps")

Expand Down Expand Up @@ -102,12 +106,6 @@ load("@build_bazel_apple_support//lib:repositories.bzl", "apple_support_dependen

apple_support_dependencies()

load("@rules_java//java:repositories.bzl", "rules_java_dependencies", "rules_java_toolchains")

rules_java_dependencies()

rules_java_toolchains()

load("@rules_cc//cc:repositories.bzl", "rules_cc_dependencies")

rules_cc_dependencies()
Expand Down
10 changes: 5 additions & 5 deletions examples/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ local_path_override(
path = "..",
)

bazel_dep(name = "bazel_skylib", version = "1.0.3")
bazel_dep(name = "rules_cc", version = "0.0.16")
bazel_dep(name = "rules_java", version = "8.3.2")
bazel_dep(name = "rules_pkg", version = "0.7.0")
bazel_dep(name = "rules_python", version = "0.25.0")
bazel_dep(name = "bazel_skylib", version = "1.7.1")
bazel_dep(name = "rules_cc", version = "0.0.17")
bazel_dep(name = "rules_java", version = "8.6.1")
bazel_dep(name = "rules_pkg", version = "1.0.1")
bazel_dep(name = "rules_python", version = "0.40.0")
8 changes: 6 additions & 2 deletions examples/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")

protobuf_deps()

load("@com_google_protobuf//:protobuf_extra_deps.bzl", "protobuf_extra_deps")
load("@rules_java//java:rules_java_deps.bzl", "rules_java_dependencies")

protobuf_extra_deps()
rules_java_dependencies()

load("@rules_java//java:repositories.bzl", "rules_java_toolchains")

rules_java_toolchains()
6 changes: 4 additions & 2 deletions protobuf_deps.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,10 @@ def protobuf_deps():
if not native.existing_rule("rules_java"):
http_archive(
name = "rules_java",
url = "https://github.com/bazelbuild/rules_java/releases/download/8.3.2/rules_java-8.3.2.tar.gz",
sha256 = "9b9614f8a7f7b7ed93cb7975d227ece30fe7daed2c0a76f03a5ee37f69e437de",
urls = [
"https://github.com/bazelbuild/rules_java/releases/download/8.6.1/rules_java-8.6.1.tar.gz",
],
sha256 = "c5bc17e17bb62290b1fd8fdd847a2396d3459f337a7e07da7769b869b488ec26",
)

if not native.existing_rule("rules_shell"):
Expand Down
3 changes: 2 additions & 1 deletion protobuf_extra_deps.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ protobuf_extra_deps();
```
"""

load("@rules_java//java:repositories.bzl", "rules_java_dependencies", "rules_java_toolchains")
load("@rules_java//java:repositories.bzl", "rules_java_toolchains")
load("@rules_java//java:rules_java_deps.bzl", "rules_java_dependencies")

def protobuf_extra_deps():
"""Loads extra dependencies needed for the external repositories defined in protobuf_deps.bzl."""
Expand Down
Loading