bazel: add Bazel 8.5.0 build support for simple_switch_grpc#1355
Open
Shawn-Dong wants to merge 1 commit intop4lang:mainfrom
Open
bazel: add Bazel 8.5.0 build support for simple_switch_grpc#1355Shawn-Dong wants to merge 1 commit intop4lang:mainfrom
Shawn-Dong wants to merge 1 commit intop4lang:mainfrom
Conversation
Add BUILD files for all simple_switch_grpc targets and dependencies. Use system-installed gRPC/protobuf for ABI compatibility with p4lang-PI. Generate config.h via genrule to avoid conflicts with cmake build. Signed-off-by: Shawn Dong <yanshengtian@gmail.com>
ec8234b to
631a029
Compare
Contributor
|
Thanks for your PR @Shawn-Dong, it looks great. None of the PRs will be carefully reviewed until Apr 1 (once the contributor deadline is over). Starting today (March 16th), the GSoC contributor application will open. Please make sure you submit your application before the deadline. During the first week of April, after applications and PRs are reviewed, candidates who will be considered will be sent an interview. The contributor who gets admitted into GSoC will have their PR pushed to head cc: @qobilidop |
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.
Summary
Add Bazel 8.5.0 build support for
simple_switch_grpcand its dependencies. The existing autoconf/CMake build is unaffected.Design decisions
System gRPC/protobuf
BCR protobuf conflicts with p4lang-PI's pre-generated
.pb.hheaders, so system-installed libraries are used to maintain ABI compatibility.config.h via genrule
cmake generates
config.hinto its build directory but adds the source tree to the include path first. A committedconfig.hwould shadow cmake's version, so a Bazel genrule generates it intobazel-out/instead.Exclusive test tags
All 11 tests bind to shared gRPC ports, so
tags = ["exclusive"]prevents parallel execution.Test plan
bazel build //targets/simple_switch_grpc:simple_switch_grpcbazel test //targets/simple_switch_grpc/tests/...