Skip to content

Commit c2e1ed0

Browse files
committed
chore: additional updates to prepare for v3.0.0 (#14999)
chore: update to protobuf v30 and remove cxx14 build (#15013) * chore: update to protobuf v30 and remove cxx14 build * update grpc to v1.71.0 * use new abseil repo name * add repo_mapping for absl * disable bzlmod for bazel-targets build * combine zypper commands chore: update abseil to 20250127.1 (#15039) chore(ci): update api and abi for v3 (#15041) chore(bazel): get bazel 8 working (#15042) * chore(bazel): get bazel 8 working * enable workspace where we disable bzlmod * patch googleapis BUILD.bazel when using workspace * check for null json * determine generation proto paths dynamically * bazel quickstart version has to be changed in two phases * update quickstart bazelrc to use c++17
1 parent 1b4eebe commit c2e1ed0

File tree

917 files changed

+14956
-7717
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

917 files changed

+14956
-7717
lines changed

.bazelrc

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,13 @@
1818
# Use host-OS-specific config lines from bazelrc files.
1919
build --enable_platform_specific_config=true
2020

21-
# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which
22-
# disables C++14 features, even if the compilers defaults to C++ >= 14
23-
build:linux --cxxopt=-std=c++14
24-
build:macos --cxxopt=-std=c++14
25-
# Protobuf and gRPC require (or soon will require) C++14 to compile the "host"
21+
# The project requires C++ >= 17.
22+
build:linux --cxxopt=-std=c++17
23+
build:macos --cxxopt=-std=c++17
24+
# Protobuf and gRPC require C++17 to compile the "host"
2625
# targets, such as protoc and the grpc plugin.
27-
build:linux --host_cxxopt=-std=c++14
28-
build:macos --host_cxxopt=-std=c++14
26+
build:linux --host_cxxopt=-std=c++17
27+
build:macos --host_cxxopt=-std=c++17
2928

3029
# Do not create the convenience links. They are inconvenient when the build
3130
# runs inside a docker image or if one builds a quickstart and then builds

.bazelversion

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
7.5.0
1+
8.1.1

.clang-tidy

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ Checks: >
8585
performance-*,
8686
portability-*,
8787
readability-*,
88+
-bugprone-exception-escape,
8889
-google-readability-braces-around-statements,
8990
-google-readability-namespace-comments,
9091
-google-runtime-references,

.github/workflows/macos-cmake.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,6 @@ jobs:
175175
rapidmigrationassessment
176176
recaptchaenterprise
177177
recommender
178-
resourcesettings
179178
scheduler
180179
secretmanager
181180
securesourcemanager

MODULE.bazel

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,10 @@ module(
2222

2323
bazel_dep(name = "platforms", version = "0.0.11")
2424
bazel_dep(name = "bazel_skylib", version = "1.7.1")
25-
bazel_dep(name = "rules_cc", version = "0.0.17")
26-
bazel_dep(name = "abseil-cpp", version = "20240722.1", repo_name = "com_google_absl")
27-
bazel_dep(name = "protobuf", version = "30.0-rc1", repo_name = "com_google_protobuf")
25+
bazel_dep(name = "rules_cc", version = "0.1.1")
26+
bazel_dep(name = "abseil-cpp", version = "20250127.1", repo_name = "abseil-cpp")
27+
bazel_dep(name = "protobuf", version = "30.2", repo_name = "com_google_protobuf")
2828
bazel_dep(name = "boringssl", version = "0.0.0-20230215-5c22014")
29-
bazel_dep(name = "grpc", version = "1.70.1", repo_name = "com_github_grpc_grpc")
3029
bazel_dep(name = "nlohmann_json", version = "3.11.3", repo_name = "com_github_nlohmann_json")
3130
bazel_dep(name = "curl", version = "8.8.0.bcr.2", repo_name = "com_github_curl_curl")
3231
bazel_dep(name = "crc32c", version = "1.1.0", repo_name = "com_github_google_crc32c")
@@ -44,23 +43,24 @@ bazel_dep(name = "zlib", version = "1.3.1.bcr.4")
4443
bazel_dep(name = "c-ares", version = "1.19.1", repo_name = "com_github_cares_cares")
4544

4645
# Pin this to fix a break in bazel/deps-cache.py
47-
bazel_dep(name = "protoc-gen-validate", version = "1.0.4.bcr.2", dev_dependency = True, repo_name = "com_envoyproxy_protoc_gen_validate")
46+
bazel_dep(name = "protoc-gen-validate", version = "1.2.1", dev_dependency = True, repo_name = "com_envoyproxy_protoc_gen_validate")
4847

4948
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
5049
python.toolchain(
5150
ignore_root_user_error = True,
5251
python_version = "3.11",
5352
)
5453

54+
bazel_dep(name = "grpc", version = "1.71.0", repo_name = "com_github_grpc_grpc")
5555
bazel_dep(name = "googleapis", version = "0.0.0", repo_name = "com_google_googleapis")
5656
archive_override(
5757
module_name = "googleapis",
58-
integrity = "sha256-WpRQzxrRGHyCorXN/1Pk1YS21FKStfcbUECDrLA619A=",
58+
integrity = "sha256-KnunCHPK1T8u8SUxAAU122G6qmfxADIfA4ZU+fNWXjY=",
5959
patch_strip = 1,
6060
patches = ["//bazel:googleapis.modules.patch"],
61-
strip_prefix = "googleapis-280725e991516d4a0f136268faf5aa6d32d21b54",
61+
strip_prefix = "googleapis-53ca65d540dd1a7cb4746687daa87208dc9ea437",
6262
urls = [
63-
"https://github.com/googleapis/googleapis/archive/280725e991516d4a0f136268faf5aa6d32d21b54.tar.gz",
63+
"https://github.com/googleapis/googleapis/archive/53ca65d540dd1a7cb4746687daa87208dc9ea437.tar.gz",
6464
],
6565
)
6666

README.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -383,9 +383,6 @@ See each library's `README.md` file for more information about:
383383
- [Cloud Resource Manager API](google/cloud/resourcemanager/README.md)
384384
[[quickstart]](google/cloud/resourcemanager/quickstart/README.md)
385385
[[reference]](https://cloud.google.com/cpp/docs/reference/resourcemanager/latest)
386-
- [Resource Settings API](google/cloud/resourcesettings/README.md)
387-
[[quickstart]](google/cloud/resourcesettings/quickstart/README.md)
388-
[[reference]](https://cloud.google.com/cpp/docs/reference/resourcesettings/latest)
389386
- [Retail API](google/cloud/retail/README.md)
390387
[[quickstart]](google/cloud/retail/quickstart/README.md)
391388
[[reference]](https://cloud.google.com/cpp/docs/reference/retail/latest)

bazel/gapic.bzl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,23 +38,23 @@ def cc_gapic_library(name, service_dirs = [], googleapis_deps = [], additional_d
3838

3939
native.filegroup(
4040
name = "srcs",
41-
srcs = native.glob(sources_glob),
41+
srcs = native.glob(sources_glob, allow_empty = True),
4242
)
4343

4444
native.filegroup(
4545
name = "hdrs",
46-
srcs = native.glob(include = code_glob, exclude = sources_glob),
46+
srcs = native.glob(include = code_glob, exclude = sources_glob, allow_empty = True),
4747
)
4848

4949
native.filegroup(
5050
name = "public_hdrs",
51-
srcs = native.glob([d + "*.h" for d in service_dirs]),
51+
srcs = native.glob([d + "*.h" for d in service_dirs], allow_empty = True),
5252
visibility = ["//:__pkg__"],
5353
)
5454

5555
native.filegroup(
5656
name = "mocks",
57-
srcs = native.glob([d + "mocks/*.h" for d in service_dirs]),
57+
srcs = native.glob([d + "mocks/*.h" for d in service_dirs], allow_empty = True),
5858
visibility = ["//:__pkg__"],
5959
)
6060

@@ -84,4 +84,4 @@ def cc_gapic_library(name, service_dirs = [], googleapis_deps = [], additional_d
8484
"//:" + name,
8585
"//google/cloud/testing_util:google_cloud_cpp_testing_private",
8686
],
87-
) for sample in native.glob([d + "samples/*_samples.cc" for d in service_dirs])]
87+
) for sample in native.glob([d + "samples/*_samples.cc" for d in service_dirs], allow_empty = True)]

bazel/googleapis.modules.patch

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,33 @@
11
diff --git a/BUILD.bazel b/BUILD.bazel
2-
index 95e4c12e5..a901fd573 100644
2+
index 026553f5c7..f3c6b6925c 100644
33
--- a/BUILD.bazel
44
+++ b/BUILD.bazel
5-
@@ -1,3 +1,7 @@
5+
@@ -1,11 +1,13 @@
66
+package(default_visibility = ["//visibility:public"])
77
+
88
+licenses(["notice"]) # Apache 2.0
99
+
1010
genrule(
11-
name = "build_gen",
12-
outs = ["build_gen.sh"],
13-
@@ -16,3 +20,15 @@ EOD
11+
- name = "build_gen",
12+
- srcs = glob(
13+
- ["run_build_gen.sh"],
14+
- allow_empty = True,
15+
- ),
16+
- outs = ["build_gen.sh"],
17+
- cmd = """
18+
+ name = "build_gen",
19+
+ outs = ["build_gen.sh"],
20+
+ executable = True,
21+
+ srcs = glob(["run_build_gen.sh"], allow_empty=True),
22+
+ cmd = """
23+
if test -z \"$(SRCS)\"; then
24+
cat <<EOD > $@
25+
#!/bin/sh
26+
@@ -17,5 +19,17 @@ EOD
27+
cp $(SRCS) $@
1428
fi
1529
""",
30+
- executable = True,
1631
)
1732
+
1833
+# This build file overlays on top of the BUILD files for the googleapis repo,
@@ -26,6 +41,7 @@ index 95e4c12e5..a901fd573 100644
2641
+ ".",
2742
+ ],
2843
+)
44+
+
2945
diff --git a/MODULE.bazel b/MODULE.bazel
3046
new file mode 100644
3147
index 000000000..169133e43

bazel/googleapis.workspace.patch

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/BUILD.bazel b/BUILD.bazel
2+
index 95e4c12e5..83838d3f0 100644
3+
--- a/BUILD.bazel
4+
+++ b/BUILD.bazel
5+
@@ -2,7 +2,7 @@ genrule(
6+
name = "build_gen",
7+
outs = ["build_gen.sh"],
8+
executable = True,
9+
- srcs = glob(["run_build_gen.sh"]),
10+
+ srcs = glob(["run_build_gen.sh"], allow_empty=True),
11+
cmd = """
12+
if test -z \"$(SRCS)\"; then
13+
cat <<EOD > $@

bazel/workspace0.bzl

Lines changed: 29 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,19 @@ def gl_cpp_workspace0(name = None):
7171
http_archive,
7272
name = "rules_cc",
7373
urls = [
74-
"https://github.com/bazelbuild/rules_cc/releases/download/0.0.17/rules_cc-0.0.17.tar.gz",
74+
"https://github.com/bazelbuild/rules_cc/releases/download/0.1.1/rules_cc-0.1.1.tar.gz",
7575
],
76-
sha256 = "abc605dd850f813bb37004b77db20106a19311a96b2da1c92b789da529d28fe1",
77-
strip_prefix = "rules_cc-0.0.17",
76+
sha256 = "712d77868b3152dd618c4d64faaddefcc5965f90f5de6e6dd1d5ddcd0be82d42",
77+
strip_prefix = "rules_cc-0.1.1",
78+
)
79+
80+
maybe(
81+
http_archive,
82+
name = "com_envoyproxy_protoc_gen_validate",
83+
urls = [
84+
"https://github.com/bufbuild/protoc-gen-validate/archive/v1.2.1.tar.gz",
85+
],
86+
strip_prefix = "protoc-gen-validate-1.2.1",
7887
)
7988

8089
# protobuf requires this
@@ -101,12 +110,12 @@ def gl_cpp_workspace0(name = None):
101110
# Load Abseil
102111
maybe(
103112
http_archive,
104-
name = "com_google_absl",
113+
name = "abseil-cpp",
105114
urls = [
106-
"https://github.com/abseil/abseil-cpp/archive/20250127.0.tar.gz",
115+
"https://github.com/abseil/abseil-cpp/archive/20250127.1.tar.gz",
107116
],
108-
sha256 = "16242f394245627e508ec6bb296b433c90f8d914f73b9c026fddb905e27276e8",
109-
strip_prefix = "abseil-cpp-20250127.0",
117+
sha256 = "b396401fd29e2e679cace77867481d388c807671dc2acc602a0259eeb79b7811",
118+
strip_prefix = "abseil-cpp-20250127.1",
110119
)
111120

112121
# Load a version of googletest that we know works. This is needed to create
@@ -126,18 +135,18 @@ def gl_cpp_workspace0(name = None):
126135
http_archive,
127136
name = "com_google_googleapis",
128137
urls = [
129-
"https://github.com/googleapis/googleapis/archive/280725e991516d4a0f136268faf5aa6d32d21b54.tar.gz",
138+
"https://github.com/googleapis/googleapis/archive/53ca65d540dd1a7cb4746687daa87208dc9ea437.tar.gz",
130139
],
131-
sha256 = "5a9450cf1ad1187c82a2b5cdff53e4d584b6d45292b5f71b504083acb03ad7d0",
132-
strip_prefix = "googleapis-280725e991516d4a0f136268faf5aa6d32d21b54",
140+
sha256 = "2a7ba70873cad53f2ef12531000535db61baaa67f100321f038654f9f3565e36",
141+
strip_prefix = "googleapis-53ca65d540dd1a7cb4746687daa87208dc9ea437",
133142
build_file = Label("//bazel:googleapis.BUILD"),
134143
# Scaffolding for patching googleapis after download. For example:
135144
# patches = ["googleapis.patch"]
136145
# NOTE: This should only be used while developing with a new
137146
# protobuf message. No changes to `patches` should ever be
138147
# committed to the main branch.
139148
patch_tool = "patch",
140-
patch_args = ["-p1"],
149+
patch_args = ["-p1", "-l", "-n"],
141150
patches = [],
142151
)
143152

@@ -146,10 +155,10 @@ def gl_cpp_workspace0(name = None):
146155
http_archive,
147156
name = "com_google_protobuf",
148157
urls = [
149-
"https://github.com/protocolbuffers/protobuf/archive/v30.0-rc1.tar.gz",
158+
"https://github.com/protocolbuffers/protobuf/archive/v30.2.tar.gz",
150159
],
151-
sha256 = "e787459d3d5be3bced7b2e1b17e6e83f8a66cb827ca1654e071f3bacb16f8605",
152-
strip_prefix = "protobuf-30.0-rc1",
160+
sha256 = "07a43d88fe5a38e434c7f94129cad56a4c43a51f99336074d0799c2f7d4e44c5",
161+
strip_prefix = "protobuf-30.2",
153162
)
154163

155164
# Load BoringSSL. This could be automatically loaded by gRPC. But as of
@@ -172,10 +181,13 @@ def gl_cpp_workspace0(name = None):
172181
http_archive,
173182
name = "com_github_grpc_grpc",
174183
urls = [
175-
"https://github.com/grpc/grpc/archive/v1.70.1.tar.gz",
184+
"https://github.com/grpc/grpc/archive/v1.71.0.tar.gz",
176185
],
177-
sha256 = "c4e85806a3a23fd2a78a9f8505771ff60b2beef38305167d50f5e8151728e426",
178-
strip_prefix = "grpc-1.70.1",
186+
repo_mapping = {
187+
"@com_google_absl": "@abseil-cpp",
188+
},
189+
sha256 = "0d631419e54ec5b29def798623ee3bf5520dac77abeab3284ef7027ec2363f91",
190+
strip_prefix = "grpc-1.71.0",
179191
)
180192

181193
# We use the cc_proto_library() rule from @com_google_protobuf, which

0 commit comments

Comments
 (0)