Migrate from WORKSPACE to Bzlmod (Bazel 7-8, Ubuntu)#61
Open
smolkaj wants to merge 1 commit into
Open
Conversation
f01dc4d to
615cc1e
Compare
9b5172a to
f374dca
Compare
217e48f to
a5a633c
Compare
Replace the legacy WORKSPACE + p4_infra_deps.bzl dependency system with a MODULE.bazel file. All dependencies now come from the Bazel Central Registry, including grpc 1.80.0-pre1 (no patches needed). Bazel 9 is blocked by grpc 1.80.0-pre1 using native.cc_library (removed in Bazel 9). macOS is blocked by p4c 1.2.5.11 using pipe2() (Linux-only).
smolkaj
added a commit
to smolkaj/sonic-pins
that referenced
this pull request
Mar 19, 2026
Replace the legacy WORKSPACE + pins_infra_deps.bzl dependency system with MODULE.bazel. All deps now come from the Bazel Central Registry where possible; only otg_models and sonic_swss_common remain as non-BCR deps via a module extension. Key changes: - 28 BCR bazel_dep() entries replace ~25 http_archive calls - Delete local gutil/ and p4_infra/ forks; depend on upstream @gutil (BCR 20260309.0) and @p4_infra (pinned to smolkaj/p4-infra bzlmod branch via git_override, pending google/p4-infra#61) - Extract sonic-pins-specific p4_runtime_session / matchers files to new p4rt_test_helpers/ package - C++17 → C++20, Bazel 6.4.0 → 8.2.1 - GMP → boost.multiprecision (single call site in z3_util.cc) - z3 dynamic → z3 static (BCR z3 dynamic has runfiles issues) - Update ~840 #include paths (gutil/gutil/ → gutil/, p4_infra/p4_pdpi/ → p4_pdpi/, gnoi proto → github.com/openconfig/ gnoi/ paths, etc.) - Update golden files for new p4c 1.2.5.11 output - Trim install_dependencies.sh to sonic_swss_common system deps only Not yet working: p4rt_app/ (sonic_swss_common C++20 incompatibility). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
9b4eb77 to
3f73359
Compare
This was referenced Mar 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
WORKSPACE → Bzlmod migration
New
MODULE.bazelreplaces the oldWORKSPACE+p4_infra_deps.bzldependency system. All deps now come from the Bazel Central Registry — no patches or overrides needed, thanks togrpc 1.80.0-pre1.CI modernization
{ubuntu-22.04, ubuntu-latest} × {Bazel 7.x, 8.x}Code fixes for Bazel compatibility
p4_pdpi/ir_utils.cc: replacedstd::optional::transform(C++23) withabsl::optional+ manual mapnetaddr/network_address.h: removed redundantoperator!=(C++20 synthesizes fromoperator==)string_encodings/decimal_string_test_runner.cc: fixed test runner for Bzlmod runfilesWhat's NOT in scope
grpc 1.80.0-pre1usingnative.cc_library(removed in Bazel 9).p4c 1.2.5.11usingpipe2()(Linux-only). TODO in CI.grpc::Status-based public API is preserved — no breaking changes.🤖 Generated with Claude Code