From 6b9de96a03844ce14493170d4e88a50968171ace Mon Sep 17 00:00:00 2001 From: John Cater Date: Tue, 17 Dec 2024 16:30:04 -0500 Subject: [PATCH] Update to use Bazel 7.4.1. (#5071) This specifically enables the legacy WORKSPACE-based resolution, and disables the new bzlmod-based resolution. Related to #5065 and #5066. --------- Signed-off-by: John Cater --- .bazelrc | 5 +++++ .bazelversion | 2 +- bazel/example/.bazelrc | 5 +++++ bazel/example/.bazelversion | 2 +- bazel/example/WORKSPACE.bazel | 3 ++- 5 files changed, 14 insertions(+), 3 deletions(-) diff --git a/.bazelrc b/.bazelrc index 6532c3cafd..2b925ab17a 100644 --- a/.bazelrc +++ b/.bazelrc @@ -1 +1,6 @@ +# Remove once #5066 is resolved. +common --enable_workspace +# Enable once #5066 is resolved. +common --noenable_bzlmod + build --action_env=BAZEL_CXXOPTS="-std=c++17" diff --git a/.bazelversion b/.bazelversion index 19b860c187..815da58b7a 100644 --- a/.bazelversion +++ b/.bazelversion @@ -1 +1 @@ -6.4.0 +7.4.1 diff --git a/bazel/example/.bazelrc b/bazel/example/.bazelrc index 6532c3cafd..2b925ab17a 100644 --- a/bazel/example/.bazelrc +++ b/bazel/example/.bazelrc @@ -1 +1,6 @@ +# Remove once #5066 is resolved. +common --enable_workspace +# Enable once #5066 is resolved. +common --noenable_bzlmod + build --action_env=BAZEL_CXXOPTS="-std=c++17" diff --git a/bazel/example/.bazelversion b/bazel/example/.bazelversion index 19b860c187..815da58b7a 100644 --- a/bazel/example/.bazelversion +++ b/bazel/example/.bazelversion @@ -1 +1 @@ -6.4.0 +7.4.1 diff --git a/bazel/example/WORKSPACE.bazel b/bazel/example/WORKSPACE.bazel index 4be9dfe723..0ea8a56e92 100644 --- a/bazel/example/WORKSPACE.bazel +++ b/bazel/example/WORKSPACE.bazel @@ -7,7 +7,8 @@ local_repository( # This part is optional: only needed for custom backends with IR extensions. repo_mapping = { # Tells p4c where to look for `:ir_extension` target: in this project. - "@com_github_p4lang_p4c_extension": "@example_p4_project", + # The main repo has no name, so a bare `@` means this repository. + "@com_github_p4lang_p4c_extension": "@", }, )