Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 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
2 changes: 1 addition & 1 deletion .bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.5.0
8.1.1
10 changes: 5 additions & 5 deletions bazel/gapic.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -38,23 +38,23 @@ def cc_gapic_library(name, service_dirs = [], googleapis_deps = [], additional_d

native.filegroup(
name = "srcs",
srcs = native.glob(sources_glob),
srcs = native.glob(sources_glob, allow_empty = True),
)

native.filegroup(
name = "hdrs",
srcs = native.glob(include = code_glob, exclude = sources_glob),
srcs = native.glob(include = code_glob, exclude = sources_glob, allow_empty = True),
)

native.filegroup(
name = "public_hdrs",
srcs = native.glob([d + "*.h" for d in service_dirs]),
srcs = native.glob([d + "*.h" for d in service_dirs], allow_empty = True),
visibility = ["//:__pkg__"],
)

native.filegroup(
name = "mocks",
srcs = native.glob([d + "mocks/*.h" for d in service_dirs]),
srcs = native.glob([d + "mocks/*.h" for d in service_dirs], allow_empty = True),
visibility = ["//:__pkg__"],
)

Expand Down Expand Up @@ -84,4 +84,4 @@ def cc_gapic_library(name, service_dirs = [], googleapis_deps = [], additional_d
"//:" + name,
"//google/cloud/testing_util:google_cloud_cpp_testing_private",
],
) for sample in native.glob([d + "samples/*_samples.cc" for d in service_dirs])]
) for sample in native.glob([d + "samples/*_samples.cc" for d in service_dirs], allow_empty = True)]
11 changes: 9 additions & 2 deletions bazel/googleapis.modules.patch
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,21 @@ diff --git a/BUILD.bazel b/BUILD.bazel
index 95e4c12e5..a901fd573 100644
--- a/BUILD.bazel
+++ b/BUILD.bazel
@@ -1,3 +1,7 @@
@@ -1,8 +1,12 @@
+package(default_visibility = ["//visibility:public"])
+
+licenses(["notice"]) # Apache 2.0
+
genrule(
name = "build_gen",
outs = ["build_gen.sh"],
@@ -16,3 +20,15 @@ EOD
executable = True,
- srcs = glob(["run_build_gen.sh"]),
+ srcs = glob(["run_build_gen.sh"], allow_empty=True),
cmd = """
if test -z \"$(SRCS)\"; then
cat <<EOD > $@
@@ -16,3 +20,16 @@ EOD
fi
""",
)
Expand All @@ -26,6 +32,7 @@ index 95e4c12e5..a901fd573 100644
+ ".",
+ ],
+)
+
diff --git a/MODULE.bazel b/MODULE.bazel
new file mode 100644
index 000000000..169133e43
Expand Down
13 changes: 13 additions & 0 deletions bazel/googleapis.workspace.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/BUILD.bazel b/BUILD.bazel
index 95e4c12e5..83838d3f0 100644
--- a/BUILD.bazel
+++ b/BUILD.bazel
@@ -2,7 +2,7 @@ genrule(
name = "build_gen",
outs = ["build_gen.sh"],
executable = True,
- srcs = glob(["run_build_gen.sh"]),
+ srcs = glob(["run_build_gen.sh"], allow_empty=True),
cmd = """
if test -z \"$(SRCS)\"; then
cat <<EOD > $@
4 changes: 2 additions & 2 deletions bazel/workspace0.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,8 @@ def gl_cpp_workspace0(name = None):
# protobuf message. No changes to `patches` should ever be
# committed to the main branch.
patch_tool = "patch",
patch_args = ["-p1"],
patches = [],
patch_args = ["-p1", "-l", "-n"],
patches = ["//bazel:googleapis.workspace.patch"],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"No changes to patches should ever be committed to the main branch."

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. This is just a draft to test the changes before I attempt to upstream them to the googleapis repo.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. Good tactic then. Sorry for jumping the gun.

)

# Load protobuf.
Expand Down
1 change: 1 addition & 0 deletions ci/cloudbuild/builds/bazel-oldest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ mapfile -t args < <(bazel::common_args)
args+=(
# Test without bzlmod as WORKSPACE is still supported in bazel 7 LTS.
--noenable_bzlmod
--enable_workspace
# Only run the unit tests, no need to waste time running everything.
--test_tag_filters=-integration-test
)
Expand Down
1 change: 1 addition & 0 deletions ci/gha/builds/lib/bazel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ function bazel::msvc_args() {
'--per_file_copt=.*\.upbdefs\.c@-wd4090'
# TODO(#14462) - gRPC is not compatible with (at least) MSVC 2019 + bzlmod.
'--noenable_bzlmod'
'--enable_workspace'
)
printf "%s\n" "${args[@]}"
}
Expand Down
1 change: 1 addition & 0 deletions ci/verify_current_targets/.bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ build --experimental_convenience_symlinks=ignore

# TODO(#11485) - enable bzlmod once it works
common --noenable_bzlmod
common --enable_workspace

# TODO(#13311) - remove once gRPC works with Bazel v7 or when gRPC stops using
# `apple_rules`.
Expand Down
2 changes: 1 addition & 1 deletion ci/verify_current_targets/.bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.5.0
8.1.1
1 change: 1 addition & 0 deletions ci/verify_deprecated_targets/.bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ build --experimental_convenience_symlinks=ignore

# TODO(#11485) - enable bzlmod once it works
common --noenable_bzlmod
common --enable_workspace

# TODO(#13311) - remove once gRPC works with Bazel v7 or when gRPC stops using
# `apple_rules`.
Expand Down
2 changes: 1 addition & 1 deletion ci/verify_deprecated_targets/.bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.5.0
8.1.1
11 changes: 7 additions & 4 deletions generator/integration_tests/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,13 @@ cc_grpc_library(

filegroup(
name = "golden_srcs",
srcs = glob([
"golden/v1/internal/*_sources.cc",
"golden/v1/internal/streaming.cc",
]),
srcs = glob(
[
"golden/v1/internal/*_sources.cc",
"golden/v1/internal/streaming.cc",
],
allow_empty = True,
),
)

filegroup(
Expand Down
1 change: 1 addition & 0 deletions google/cloud/accessapproval/quickstart/.bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore

#Our quickstarts do not yet support bzlmod
build --noenable_bzlmod
build --enable_workspace
2 changes: 1 addition & 1 deletion google/cloud/accessapproval/quickstart/.bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.5.0
8.1.1
1 change: 1 addition & 0 deletions google/cloud/accesscontextmanager/quickstart/.bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore

#Our quickstarts do not yet support bzlmod
build --noenable_bzlmod
build --enable_workspace
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.5.0
8.1.1
1 change: 1 addition & 0 deletions google/cloud/advisorynotifications/quickstart/.bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore

#Our quickstarts do not yet support bzlmod
build --noenable_bzlmod
build --enable_workspace
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.5.0
8.1.1
1 change: 1 addition & 0 deletions google/cloud/aiplatform/quickstart/.bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore

#Our quickstarts do not yet support bzlmod
build --noenable_bzlmod
build --enable_workspace
2 changes: 1 addition & 1 deletion google/cloud/aiplatform/quickstart/.bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.5.0
8.1.1
1 change: 1 addition & 0 deletions google/cloud/alloydb/quickstart/.bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore

#Our quickstarts do not yet support bzlmod
build --noenable_bzlmod
build --enable_workspace
2 changes: 1 addition & 1 deletion google/cloud/alloydb/quickstart/.bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.5.0
8.1.1
1 change: 1 addition & 0 deletions google/cloud/apigateway/quickstart/.bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore

#Our quickstarts do not yet support bzlmod
build --noenable_bzlmod
build --enable_workspace
2 changes: 1 addition & 1 deletion google/cloud/apigateway/quickstart/.bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.5.0
8.1.1
1 change: 1 addition & 0 deletions google/cloud/apigeeconnect/quickstart/.bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore

#Our quickstarts do not yet support bzlmod
build --noenable_bzlmod
build --enable_workspace
2 changes: 1 addition & 1 deletion google/cloud/apigeeconnect/quickstart/.bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.5.0
8.1.1
1 change: 1 addition & 0 deletions google/cloud/apikeys/quickstart/.bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore

#Our quickstarts do not yet support bzlmod
build --noenable_bzlmod
build --enable_workspace
2 changes: 1 addition & 1 deletion google/cloud/apikeys/quickstart/.bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.5.0
8.1.1
1 change: 1 addition & 0 deletions google/cloud/appengine/quickstart/.bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore

#Our quickstarts do not yet support bzlmod
build --noenable_bzlmod
build --enable_workspace
2 changes: 1 addition & 1 deletion google/cloud/appengine/quickstart/.bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.5.0
8.1.1
1 change: 1 addition & 0 deletions google/cloud/apphub/quickstart/.bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore

#Our quickstarts do not yet support bzlmod
build --noenable_bzlmod
build --enable_workspace
2 changes: 1 addition & 1 deletion google/cloud/apphub/quickstart/.bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.5.0
8.1.1
1 change: 1 addition & 0 deletions google/cloud/artifactregistry/quickstart/.bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore

#Our quickstarts do not yet support bzlmod
build --noenable_bzlmod
build --enable_workspace
2 changes: 1 addition & 1 deletion google/cloud/artifactregistry/quickstart/.bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.5.0
8.1.1
1 change: 1 addition & 0 deletions google/cloud/asset/quickstart/.bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore

#Our quickstarts do not yet support bzlmod
build --noenable_bzlmod
build --enable_workspace
2 changes: 1 addition & 1 deletion google/cloud/asset/quickstart/.bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.5.0
8.1.1
1 change: 1 addition & 0 deletions google/cloud/assuredworkloads/quickstart/.bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore

#Our quickstarts do not yet support bzlmod
build --noenable_bzlmod
build --enable_workspace
2 changes: 1 addition & 1 deletion google/cloud/assuredworkloads/quickstart/.bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.5.0
8.1.1
1 change: 1 addition & 0 deletions google/cloud/automl/quickstart/.bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore

#Our quickstarts do not yet support bzlmod
build --noenable_bzlmod
build --enable_workspace
2 changes: 1 addition & 1 deletion google/cloud/automl/quickstart/.bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.5.0
8.1.1
1 change: 1 addition & 0 deletions google/cloud/backupdr/quickstart/.bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore

#Our quickstarts do not yet support bzlmod
build --noenable_bzlmod
build --enable_workspace
2 changes: 1 addition & 1 deletion google/cloud/backupdr/quickstart/.bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.5.0
8.1.1
1 change: 1 addition & 0 deletions google/cloud/baremetalsolution/quickstart/.bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore

#Our quickstarts do not yet support bzlmod
build --noenable_bzlmod
build --enable_workspace
2 changes: 1 addition & 1 deletion google/cloud/baremetalsolution/quickstart/.bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.5.0
8.1.1
1 change: 1 addition & 0 deletions google/cloud/batch/quickstart/.bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore

#Our quickstarts do not yet support bzlmod
build --noenable_bzlmod
build --enable_workspace
2 changes: 1 addition & 1 deletion google/cloud/batch/quickstart/.bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.5.0
8.1.1
1 change: 1 addition & 0 deletions google/cloud/beyondcorp/quickstart/.bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore

#Our quickstarts do not yet support bzlmod
build --noenable_bzlmod
build --enable_workspace
2 changes: 1 addition & 1 deletion google/cloud/beyondcorp/quickstart/.bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.5.0
8.1.1
1 change: 1 addition & 0 deletions google/cloud/bigquery/quickstart/.bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore

#Our quickstarts do not yet support bzlmod
build --noenable_bzlmod
build --enable_workspace
2 changes: 1 addition & 1 deletion google/cloud/bigquery/quickstart/.bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.5.0
8.1.1
1 change: 1 addition & 0 deletions google/cloud/bigquerycontrol/quickstart/.bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore

#Our quickstarts do not yet support bzlmod
build --noenable_bzlmod
build --enable_workspace
2 changes: 1 addition & 1 deletion google/cloud/bigquerycontrol/quickstart/.bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.5.0
8.1.1
1 change: 1 addition & 0 deletions google/cloud/bigtable/quickstart/.bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore

#Our quickstarts do not yet support bzlmod
build --noenable_bzlmod
build --enable_workspace
2 changes: 1 addition & 1 deletion google/cloud/bigtable/quickstart/.bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.5.0
8.1.1
1 change: 1 addition & 0 deletions google/cloud/billing/quickstart/.bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore

#Our quickstarts do not yet support bzlmod
build --noenable_bzlmod
build --enable_workspace
2 changes: 1 addition & 1 deletion google/cloud/billing/quickstart/.bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.5.0
8.1.1
1 change: 1 addition & 0 deletions google/cloud/binaryauthorization/quickstart/.bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore

#Our quickstarts do not yet support bzlmod
build --noenable_bzlmod
build --enable_workspace
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.5.0
8.1.1
1 change: 1 addition & 0 deletions google/cloud/certificatemanager/quickstart/.bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore

#Our quickstarts do not yet support bzlmod
build --noenable_bzlmod
build --enable_workspace
2 changes: 1 addition & 1 deletion google/cloud/certificatemanager/quickstart/.bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.5.0
8.1.1
1 change: 1 addition & 0 deletions google/cloud/channel/quickstart/.bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore

#Our quickstarts do not yet support bzlmod
build --noenable_bzlmod
build --enable_workspace
2 changes: 1 addition & 1 deletion google/cloud/channel/quickstart/.bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.5.0
8.1.1
1 change: 1 addition & 0 deletions google/cloud/cloudbuild/quickstart/.bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore

#Our quickstarts do not yet support bzlmod
build --noenable_bzlmod
build --enable_workspace
2 changes: 1 addition & 1 deletion google/cloud/cloudbuild/quickstart/.bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.5.0
8.1.1
1 change: 1 addition & 0 deletions google/cloud/cloudcontrolspartner/quickstart/.bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore

#Our quickstarts do not yet support bzlmod
build --noenable_bzlmod
build --enable_workspace
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.5.0
8.1.1
1 change: 1 addition & 0 deletions google/cloud/cloudquotas/quickstart/.bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore

#Our quickstarts do not yet support bzlmod
build --noenable_bzlmod
build --enable_workspace
2 changes: 1 addition & 1 deletion google/cloud/cloudquotas/quickstart/.bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.5.0
8.1.1
1 change: 1 addition & 0 deletions google/cloud/commerce/quickstart/.bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore

#Our quickstarts do not yet support bzlmod
build --noenable_bzlmod
build --enable_workspace
2 changes: 1 addition & 1 deletion google/cloud/commerce/quickstart/.bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.5.0
8.1.1
1 change: 1 addition & 0 deletions google/cloud/composer/quickstart/.bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore

#Our quickstarts do not yet support bzlmod
build --noenable_bzlmod
build --enable_workspace
2 changes: 1 addition & 1 deletion google/cloud/composer/quickstart/.bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.5.0
8.1.1
1 change: 1 addition & 0 deletions google/cloud/compute/quickstart/.bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore

#Our quickstarts do not yet support bzlmod
build --noenable_bzlmod
build --enable_workspace
2 changes: 1 addition & 1 deletion google/cloud/compute/quickstart/.bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.5.0
8.1.1
Loading