Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
5 changes: 0 additions & 5 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,3 @@ build --host_cxxopt=-std=c++17
# Use Clang.
build --action_env=CC=clang
build --action_env=CXX=clang++

# Use `WORKSPACE.bazel` instead of Bzlmod (`MODULE.bazel`).
# TODO - migrate to Bzlmod.
common --noenable_bzlmod
common --enable_workspace
2 changes: 1 addition & 1 deletion .bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.4.1
6.4.0
2 changes: 1 addition & 1 deletion .github/workflows/ci-native.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
os: [ubuntu-22.04, ubuntu-latest]
# See Bazelisk README for legal values.
# TODO - Add `latest` once it is supported. Requires using Bzlmod.
bazel_version: [7.x]
bazel_version: [6.x]
# Don't abort other runs when one of them fails, to ease debugging.
fail-fast: false

Expand Down
15 changes: 6 additions & 9 deletions WORKSPACE.bazel → WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,14 @@ load("@com_github_nelhage_rules_boost//:boost/boost.bzl", "boost_deps")

boost_deps()

# -- Load GRPC -----------------------------------------------------------------

load("@com_google_googleapis//:repository_rules.bzl", "switched_rules_by_language")

switched_rules_by_language(
name = "com_google_googleapis_imports",
cc = True,
go = True,
grpc = True,
)

Expand All @@ -56,12 +59,6 @@ load("@com_github_grpc_grpc//bazel:grpc_extra_deps.bzl", "grpc_extra_deps")

grpc_extra_deps()

# -- Load Rules CC -------------------------------------------------------------
# See https://github.com/bazelbuild/rules_cc.
load("@rules_cc//cc:repositories.bzl", "rules_cc_dependencies")

rules_cc_dependencies()

# -- Load Rules Foreign CC (for building Z3) -----------------------------------
# Used for Z3.

Expand All @@ -75,10 +72,10 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
name = "buildifier_prebuilt",
sha256 = "5dbf72e4f93917edfb91f53958d6289736adb845b2b89dbfb9bfc199a492030c",
strip_prefix = "buildifier-prebuilt-8.0.1",
sha256 = "7f85b688a4b558e2d9099340cfb510ba7179f829454fba842370bccffb67d6cc",
strip_prefix = "buildifier-prebuilt-7.3.1",
urls = [
"https://github.com/keith/buildifier-prebuilt/archive/8.0.1.tar.gz",
"https://github.com/keith/buildifier-prebuilt/archive/7.3.1.tar.gz",
],
)

Expand Down
6 changes: 1 addition & 5 deletions p4_constraints/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
load("@com_google_protobuf//bazel:cc_proto_library.bzl", "cc_proto_library")
load("@rules_cc//cc:cc_library.bzl", "cc_library")
load("@rules_cc//cc:cc_test.bzl", "cc_test")
# GOOGLE ONLY (DO NOT REMOVE): load("//third_party/protobuf/bazel:proto_library.bzl", "proto_library")

load("@com_google_googleapis_imports//:imports.bzl", "cc_proto_library")
load("@rules_proto//proto:defs.bzl", "proto_library")

package(
Expand Down
2 changes: 0 additions & 2 deletions p4_constraints/backend/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
load("@rules_cc//cc:cc_library.bzl", "cc_library")
load("@rules_cc//cc:cc_test.bzl", "cc_test")
load("//e2e_tests:p4check.bzl", "cmd_diff_test")

package(
Expand Down
2 changes: 0 additions & 2 deletions p4_constraints/cli/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
load("@rules_cc//cc:cc_binary.bzl", "cc_binary")

package(
default_visibility = ["//visibility:public"],
licenses = ["notice"], # Apache 2.0
Expand Down
3 changes: 0 additions & 3 deletions p4_constraints/frontend/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
load("@rules_cc//cc:cc_library.bzl", "cc_library")
load("@rules_cc//cc:cc_test.bzl", "cc_test")

package(
licenses = ["notice"], # Apache 2.0
)
Expand Down
27 changes: 15 additions & 12 deletions p4_constraints_deps.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ def p4_constraints_deps():
urls = ["https://github.com/abseil/abseil-cpp/releases/download/20240722.0/abseil-cpp-20240722.0.tar.gz"],
strip_prefix = "abseil-cpp-20240722.0",
)
if not native.existing_rule("com_google_googleapis"):
http_archive(
name = "com_google_googleapis",
url = "https://github.com/googleapis/googleapis/archive/f405c718d60484124808adb7fb5963974d654bb4.zip",
strip_prefix = "googleapis-f405c718d60484124808adb7fb5963974d654bb4",
sha256 = "406b64643eede84ce3e0821a1d01f66eaf6254e79cb9c4f53be9054551935e79",
)
if not native.existing_rule("com_google_gutil"):
http_archive(
name = "com_google_gutil",
Expand Down Expand Up @@ -46,15 +53,18 @@ def p4_constraints_deps():
if not native.existing_rule("com_github_p4lang_p4runtime"):
http_archive(
name = "com_github_p4lang_p4runtime",
urls = ["https://github.com/p4lang/p4runtime/archive/970cbdc1d8663356214d33e3ba213cb91676b491.tar.gz"],
strip_prefix = "p4runtime-970cbdc1d8663356214d33e3ba213cb91676b491/proto",
# Newest commit on main as of 2025-08-27.
urls = ["https://github.com/p4lang/p4runtime/archive/baaf39325ceabd89b04b0d03226b6f13fc9eca29.zip"],
strip_prefix = "p4runtime-baaf39325ceabd89b04b0d03226b6f13fc9eca29/proto",
sha256 = "8b71b8a9e59c3ee7d99653e394afc44a0bfc6437dec14df619d5e1f766f129c6",
)
if not native.existing_rule("com_github_p4lang_p4c"):
http_archive(
name = "com_github_p4lang_p4c",
# Newest commit on main on 2021-12-07.
url = "https://github.com/p4lang/p4c/archive/80629201abb61d9172639fefc7bb5b9d6007db08.zip",
strip_prefix = "p4c-80629201abb61d9172639fefc7bb5b9d6007db08",
# Newest commit on main on 2024-08-01.
url = "https://github.com/p4lang/p4c/archive/44dbcda9c7e3d26d24baadb884b31b32d215edef.zip",
strip_prefix = "p4c-44dbcda9c7e3d26d24baadb884b31b32d215edef",
sha256 = "ae4d53d0fd41572c38b03e881a8e2d2e472df246f75d6a64555f9ff1b656b574",
)
if not native.existing_rule("com_github_z3prover_z3"):
http_archive(
Expand All @@ -64,13 +74,6 @@ def p4_constraints_deps():
sha256 = "e3aaefde68b839299cbc988178529535e66048398f7d083b40c69fe0da55f8b7",
build_file = "@//:bazel/BUILD.z3.bazel",
)
if not native.existing_rule("rules_cc"):
http_archive(
name = "rules_cc",
urls = ["https://github.com/bazelbuild/rules_cc/releases/download/0.0.16/rules_cc-0.0.16.tar.gz"],
sha256 = "bbf1ae2f83305b7053b11e4467d317a7ba3517a12cef608543c1b1c5bf48a4df",
strip_prefix = "rules_cc-0.0.16",
)
if not native.existing_rule("rules_foreign_cc"): # Required for Z3.
http_archive(
name = "rules_foreign_cc",
Expand Down