Skip to content

Commit 0786033

Browse files
authored
revert: update Bazel to v7 (#13319)
This reverts commit bb6dc52.
1 parent ee8a55b commit 0786033

13 files changed

Lines changed: 5 additions & 136 deletions

File tree

.bazelrc

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,6 @@ build --experimental_convenience_symlinks=ignore
3939
# frustrating when they fail and don't give any output. So, remove the limit.
4040
build --experimental_ui_max_stdouterr_bytes=-1
4141

42-
# TODO(#11485) - enable bzlmod once it works
43-
common --noenable_bzlmod
44-
45-
# TODO(#13311) - remove once gRPC works with Bazel v7 or when gRPC stops using
46-
# `apple_rules`.
47-
common:macos --repo_env=BAZEL_NO_APPLE_CPP_TOOLCHAIN=1
48-
4942
# Inject ${GTEST_SHUFFLE} and ${GTEST_RANDOM_SEED} into the test environment
5043
# if they are set in the enclosing environment. This allows for running tests
5144
# in a random order to help expose undesirable interdependencies.

WORKSPACE.bazel

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -20,27 +20,6 @@ google_cloud_cpp_development_deps()
2020

2121
google_cloud_cpp_deps()
2222

23-
load(
24-
"@build_bazel_rules_apple//apple:repositories.bzl",
25-
"apple_rules_dependencies",
26-
)
27-
28-
apple_rules_dependencies()
29-
30-
load(
31-
"@build_bazel_apple_support//lib:repositories.bzl",
32-
"apple_support_dependencies",
33-
)
34-
35-
apple_support_dependencies()
36-
37-
load(
38-
"@rules_cc//cc:repositories.bzl",
39-
"rules_cc_dependencies",
40-
)
41-
42-
rules_cc_dependencies()
43-
4423
# Configure @com_google_googleapis to only compile C++ and gRPC libraries.
4524
load("@com_google_googleapis//:repository_rules.bzl", "switched_rules_by_language")
4625

bazel/google_cloud_cpp_deps.bzl

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -127,17 +127,6 @@ def google_cloud_cpp_deps(name = None):
127127
strip_prefix = "rules_cc-0.0.9",
128128
)
129129

130-
# The version of `rules_apple` loaded by gRPC is too old for Bazel 6 or 7.
131-
maybe(
132-
http_archive,
133-
name = "build_bazel_rules_apple",
134-
urls = [
135-
"https://storage.googleapis.com/cloud-cpp-community-archive/build_bazel_rules_apple/rules_apple.3.1.1.tar.gz",
136-
"https://github.com/bazelbuild/rules_apple/releases/download/3.1.1/rules_apple.3.1.1.tar.gz",
137-
],
138-
sha256 = "34c41bfb59cdaea29ac2df5a2fa79e5add609c71bb303b2ebb10985f93fa20e7",
139-
)
140-
141130
# Load Abseil
142131
maybe(
143132
http_archive,

ci/cloudbuild/builds/lib/bazel.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ fi # include guard
2626
source module ci/lib/io.sh
2727

2828
# Selects a default bazel version, though individual builds can override this.
29-
: "${USE_BAZEL_VERSION:="7.0.0"}"
29+
: "${USE_BAZEL_VERSION:="6.4.0"}"
3030
export USE_BAZEL_VERSION
3131
io::log "Using bazelisk version"
3232
bazelisk version

ci/cloudbuild/builds/quickstart-bazel.sh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@
1616

1717
set -euo pipefail
1818

19-
# TODO(#13313) - upgrade to Bazel v7.
20-
: "${USE_BAZEL_VERSION:="6.4.0"}"
21-
export USE_BAZEL_VERSION
22-
2319
source "$(dirname "$0")/../../lib/init.sh"
2420
source module ci/cloudbuild/builds/lib/bazel.sh
2521
source module ci/etc/quickstart-config.sh

ci/gha/builds/lib/bazel.sh

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,10 @@ fi # include guard
2323
source module ci/lib/io.sh
2424

2525
# Selects a default bazel version, though individual builds can override this.
26-
: "${USE_BAZEL_VERSION:="7.0.0"}"
26+
: "${USE_BAZEL_VERSION:="6.4.0"}"
2727
export USE_BAZEL_VERSION
28+
io::log "Using bazelisk version"
29+
bazelisk version
2830

2931
# Outputs a list of args that should be given to all bazel invocations. To read
3032
# this into an array use `mapfile -t my_array < <(bazel::common_args)`
@@ -94,26 +96,9 @@ function bazel::prefetch() {
9496
)
9597
local os_rules
9698
mapfile -t os_rules < <(os::prefetch)
97-
if [[ -n "${VCINSTALLDIR:-}" ]]; then
98-
# This is needed by `bazel fetch`
99-
export BAZEL_VC="${VCINSTALLDIR}"
100-
fi
10199
"ci/retry-command.sh" 3 120 bazelisk "${args[@]}" fetch "${common_rules[@]}" "${os_rules[@]}"
102100
}
103101

104-
function bazel::info() {
105-
local args
106-
mapfile -t args < <(bazel::common_args)
107-
108-
io::log_h1 "Using bazelisk version"
109-
bazelisk "${args[@]}" version
110-
111-
io::log_h1 "Bazel Info"
112-
bazelisk "${args[@]}" info
113-
}
114-
115-
bazel::info
116-
117102
io::log "Prefetching bazel deps..."
118103
TIMEFORMAT="==> 🕑 prefetching done in %R seconds"
119104
time {

ci/gha/builds/macos-bazel.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
set -euo pipefail
1818

1919
source "$(dirname "$0")/../../lib/init.sh"
20-
source module ci/gha/builds/lib/macos.sh
2120
source module ci/gha/builds/lib/bazel.sh
21+
source module ci/gha/builds/lib/macos.sh
2222
source module ci/lib/io.sh
2323

2424
# Usage: macos-bazel.sh [bazel query expression]

ci/verify_current_targets/.bazelrc

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,3 @@ build:macos --host_cxxopt=-std=c++14
2828
# runs inside a docker image or if one builds a quickstart and then builds
2929
# the project separately.
3030
build --experimental_convenience_symlinks=ignore
31-
32-
# TODO(#11485) - enable bzlmod once it works
33-
common --noenable_bzlmod

ci/verify_current_targets/WORKSPACE.bazel

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -28,27 +28,6 @@ load("@google_cloud_cpp//bazel:google_cloud_cpp_deps.bzl", "google_cloud_cpp_dep
2828

2929
google_cloud_cpp_deps()
3030

31-
load(
32-
"@build_bazel_rules_apple//apple:repositories.bzl",
33-
"apple_rules_dependencies",
34-
)
35-
36-
apple_rules_dependencies()
37-
38-
load(
39-
"@build_bazel_apple_support//lib:repositories.bzl",
40-
"apple_support_dependencies",
41-
)
42-
43-
apple_support_dependencies()
44-
45-
load(
46-
"@rules_cc//cc:repositories.bzl",
47-
"rules_cc_dependencies",
48-
)
49-
50-
rules_cc_dependencies()
51-
5231
load("@com_google_googleapis//:repository_rules.bzl", "switched_rules_by_language")
5332

5433
switched_rules_by_language(

ci/verify_deprecated_targets/.bazelrc

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,3 @@ build:macos --host_cxxopt=-std=c++14
2828
# runs inside a docker image or if one builds a quickstart and then builds
2929
# the project separately.
3030
build --experimental_convenience_symlinks=ignore
31-
32-
# TODO(#11485) - enable bzlmod once it works
33-
common --noenable_bzlmod

0 commit comments

Comments
 (0)