Skip to content

Commit b31aea6

Browse files
committed
Downgrade Bazel version
Signed-off-by: Bili Dong <[email protected]>
1 parent 31b9848 commit b31aea6

File tree

6 files changed

+50
-23
lines changed

6 files changed

+50
-23
lines changed

.bazelrc

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,3 @@ build --host_cxxopt=-std=c++17
88
# Use Clang.
99
build --action_env=CC=clang
1010
build --action_env=CXX=clang++
11-
12-
# Use `WORKSPACE.bazel` instead of Bzlmod (`MODULE.bazel`).
13-
# TODO - migrate to Bzlmod.
14-
common --noenable_bzlmod
15-
common --enable_workspace

.bazelversion

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
7.4.1
1+
6.4.0

.github/workflows/ci-native.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
os: [ubuntu-22.04, ubuntu-latest]
2222
# See Bazelisk README for legal values.
2323
# TODO - Add `latest` once it is supported. Requires using Bzlmod.
24-
bazel_version: [7.x]
24+
bazel_version: [6.x]
2525
# Don't abort other runs when one of them fails, to ease debugging.
2626
fail-fast: false
2727

WORKSPACE.bazel

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,11 @@ load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")
1212

1313
protobuf_deps()
1414

15-
load("@rules_proto//proto:repositories.bzl", "rules_proto_dependencies")
15+
load("@rules_proto//proto:repositories.bzl", "rules_proto_dependencies", "rules_proto_toolchains")
1616

1717
rules_proto_dependencies()
1818

19-
load("@rules_proto//proto:setup.bzl", "rules_proto_setup")
20-
21-
rules_proto_setup()
19+
rules_proto_toolchains()
2220

2321
# -- Load GUtil -----------------------------------------------------------------
2422

@@ -40,11 +38,14 @@ load("@com_github_nelhage_rules_boost//:boost/boost.bzl", "boost_deps")
4038

4139
boost_deps()
4240

41+
# -- Load GRPC -----------------------------------------------------------------
42+
4343
load("@com_google_googleapis//:repository_rules.bzl", "switched_rules_by_language")
4444

4545
switched_rules_by_language(
4646
name = "com_google_googleapis_imports",
4747
cc = True,
48+
go = True,
4849
grpc = True,
4950
)
5051

p4_constraints/BUILD.bazel

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
load("@com_google_protobuf//bazel:cc_proto_library.bzl", "cc_proto_library")
2-
# GOOGLE ONLY (DO NOT REMOVE): load("//third_party/protobuf/bazel:proto_library.bzl", "proto_library")
3-
1+
load("@com_google_googleapis_imports//:imports.bzl", "cc_proto_library")
42
load("@rules_proto//proto:defs.bzl", "proto_library")
53

64
package(

p4_constraints_deps.bzl

Lines changed: 42 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,49 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
44

55
def p4_constraints_deps():
66
"""Sets up 3rd party workspaces needed to compile p4_constraints."""
7+
if not native.existing_rule("com_github_nelhage_rules_boost"):
8+
# This version includes the fix for boost failures due to the xz library issue.
9+
http_archive(
10+
name = "com_github_nelhage_rules_boost",
11+
url = "https://github.com/nelhage/rules_boost/archive/5160325dbdc8c9e499f9d9917d913f35f1785d52.zip",
12+
strip_prefix = "rules_boost-5160325dbdc8c9e499f9d9917d913f35f1785d52",
13+
sha256 = "feb4b1294684c79df7c1e08f1aec5da0da52021e33db59c88edbe86b4d1a017a",
14+
patch_args = ["-p1"],
15+
patches = [
16+
"@com_google_gutil//:bazel/patches/boost-001-temp_fix_for_build_failure.patch",
17+
],
18+
)
19+
if not native.existing_rule("com_github_grpc_grpc"):
20+
http_archive(
21+
name = "com_github_grpc_grpc",
22+
url = "https://github.com/grpc/grpc/archive/v1.63.0.zip",
23+
strip_prefix = "grpc-1.63.0",
24+
sha256 = "daa1b06a19b5f7e4603e1f8980eeab43cf69b6e89bee3b2547f275fa5af7f480",
25+
patch_args = ["-p1"],
26+
patches = [
27+
"@com_google_gutil//:bazel/patches/grpc-003-fix_go_gazelle_register_toolchain.patch",
28+
],
29+
)
730
if not native.existing_rule("com_google_absl"):
831
http_archive(
932
name = "com_google_absl",
1033
urls = ["https://github.com/abseil/abseil-cpp/releases/download/20240722.0/abseil-cpp-20240722.0.tar.gz"],
1134
strip_prefix = "abseil-cpp-20240722.0",
1235
)
36+
if not native.existing_rule("com_google_googleapis"):
37+
http_archive(
38+
name = "com_google_googleapis",
39+
url = "https://github.com/googleapis/googleapis/archive/f405c718d60484124808adb7fb5963974d654bb4.zip",
40+
strip_prefix = "googleapis-f405c718d60484124808adb7fb5963974d654bb4",
41+
sha256 = "406b64643eede84ce3e0821a1d01f66eaf6254e79cb9c4f53be9054551935e79",
42+
)
1343
if not native.existing_rule("com_google_gutil"):
1444
http_archive(
1545
name = "com_google_gutil",
16-
# Newest commit on main as of 2025-05-14.
17-
url = "https://github.com/google/gutil/archive/d2f1bdd819287c3951adaba5ea6e5426d2eefff1.zip",
18-
strip_prefix = "gutil-d2f1bdd819287c3951adaba5ea6e5426d2eefff1",
19-
sha256 = "033bcab2835a0aea0427d38503f5ae2bd478af134ab8f3e75b65d2cd444ac8ca",
46+
# Newest commit on main as of 2025-07-01.
47+
url = "https://github.com/google/gutil/archive/4904fcbed388703c581ddcac529e574785386769.zip",
48+
strip_prefix = "gutil-4904fcbed388703c581ddcac529e574785386769",
49+
sha256 = "ead4303a3e155149bca23c6ad503a42f664ebce07ffec86f04685b27d4109879",
2050
)
2151
if not native.existing_rule("com_google_googletest"):
2252
http_archive(
@@ -47,15 +77,18 @@ def p4_constraints_deps():
4777
if not native.existing_rule("com_github_p4lang_p4runtime"):
4878
http_archive(
4979
name = "com_github_p4lang_p4runtime",
50-
urls = ["https://github.com/p4lang/p4runtime/archive/970cbdc1d8663356214d33e3ba213cb91676b491.tar.gz"],
51-
strip_prefix = "p4runtime-970cbdc1d8663356214d33e3ba213cb91676b491/proto",
80+
# Newest commit on main as of 2025-05-09.
81+
urls = ["https://github.com/p4lang/p4runtime/archive/baaf39325ceabd89b04b0d03226b6f13fc9eca29.zip"],
82+
strip_prefix = "p4runtime-baaf39325ceabd89b04b0d03226b6f13fc9eca29/proto",
83+
sha256 = "8b71b8a9e59c3ee7d99653e394afc44a0bfc6437dec14df619d5e1f766f129c6",
5284
)
5385
if not native.existing_rule("com_github_p4lang_p4c"):
5486
http_archive(
5587
name = "com_github_p4lang_p4c",
56-
# Newest commit on main on 2021-12-07.
57-
url = "https://github.com/p4lang/p4c/archive/80629201abb61d9172639fefc7bb5b9d6007db08.zip",
58-
strip_prefix = "p4c-80629201abb61d9172639fefc7bb5b9d6007db08",
88+
# Newest commit on main on 2024-08-01.
89+
url = "https://github.com/p4lang/p4c/archive/44dbcda9c7e3d26d24baadb884b31b32d215edef.zip",
90+
strip_prefix = "p4c-44dbcda9c7e3d26d24baadb884b31b32d215edef",
91+
sha256 = "ae4d53d0fd41572c38b03e881a8e2d2e472df246f75d6a64555f9ff1b656b574",
5992
)
6093
if not native.existing_rule("com_github_z3prover_z3"):
6194
http_archive(

0 commit comments

Comments
 (0)