From 4a7c88ec9c3e9cae3ec9c095ca2b189db0742fe8 Mon Sep 17 00:00:00 2001 From: Fabian Meumertzheim Date: Wed, 9 Oct 2024 14:53:47 +0200 Subject: [PATCH] Test `--incompatible_auto_exec_groups` and update protobuf --- .bazelrc | 3 ++- MODULE.bazel | 2 +- WORKSPACE | 21 ++++++++++++++++----- 3 files changed, 19 insertions(+), 7 deletions(-) diff --git a/.bazelrc b/.bazelrc index 2c3b408a8..d0d8863b3 100644 --- a/.bazelrc +++ b/.bazelrc @@ -36,7 +36,8 @@ build:incompatible --incompatible_disallow_empty_glob build:incompatible --incompatible_disable_starlark_host_transitions build:incompatible --nolegacy_external_runfiles build:incompatible --incompatible_enable_proto_toolchain_resolution +build:incompatible --incompatible_auto_exec_groups # Also enable all incompatible flags in go_bazel_test by default. # TODO: Add --incompatible_disallow_empty_glob once # https://github.com/bazelbuild/bazel-gazelle/pull/1405 has been released. -test:incompatible --test_env=GO_BAZEL_TEST_BAZELFLAGS='--incompatible_load_proto_rules_from_bzl --incompatible_enable_cc_toolchain_resolution --incompatible_config_setting_private_default_visibility --incompatible_enforce_config_setting_visibility --incompatible_disable_starlark_host_transitions --nolegacy_external_runfiles --incompatible_enable_proto_toolchain_resolution' +test:incompatible --test_env=GO_BAZEL_TEST_BAZELFLAGS='--incompatible_load_proto_rules_from_bzl --incompatible_enable_cc_toolchain_resolution --incompatible_config_setting_private_default_visibility --incompatible_enforce_config_setting_visibility --incompatible_disable_starlark_host_transitions --nolegacy_external_runfiles --incompatible_enable_proto_toolchain_resolution --incompatible_auto_exec_groups' diff --git a/MODULE.bazel b/MODULE.bazel index 8c8e380a8..bf93e2ce6 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -12,7 +12,7 @@ bazel_dep(name = "bazel_features", version = "1.9.1", repo_name = "io_bazel_rule bazel_dep(name = "bazel_skylib", version = "1.2.0") bazel_dep(name = "platforms", version = "0.0.10") bazel_dep(name = "rules_proto", version = "6.0.0") -bazel_dep(name = "protobuf", version = "3.19.2", repo_name = "com_google_protobuf") +bazel_dep(name = "protobuf", version = "27.0", repo_name = "com_google_protobuf") go_sdk = use_extension("//go:extensions.bzl", "go_sdk") go_sdk.download( diff --git a/WORKSPACE b/WORKSPACE index e44ca0c3e..2a4b7e044 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -58,14 +58,25 @@ protoc_toolchains( version = "v25.3", ) +# An up-to-date version is required by com_google_protobuf 27.0 below. +http_archive( + name = "rules_python", + sha256 = "ca77768989a7f311186a29747e3e95c936a41dffac779aff6b443db22290d913", + strip_prefix = "rules_python-0.36.0", + url = "https://github.com/bazelbuild/rules_python/releases/download/0.36.0/rules_python-0.36.0.tar.gz", +) + +load("@rules_python//python:repositories.bzl", "py_repositories") + +py_repositories() + http_archive( name = "com_google_protobuf", - sha256 = "75be42bd736f4df6d702a0e4e4d30de9ee40eac024c4b845d17ae4cc831fe4ae", - strip_prefix = "protobuf-21.7", - # latest available in BCR, as of 2022-09-30 + integrity = "sha256-2iiL8dqmwE0DqQUXgcqlKs65FjWGv/mqbPsS9puTlao=", + strip_prefix = "protobuf-27.0", urls = [ - "https://github.com/protocolbuffers/protobuf/archive/v21.7.tar.gz", - "https://mirror.bazel.build/github.com/protocolbuffers/protobuf/archive/v21.7.tar.gz", + "https://github.com/protocolbuffers/protobuf/archive/v27.0.tar.gz", + "https://mirror.bazel.build/github.com/protocolbuffers/protobuf/archive/v27.0.tar.gz", ], )