Repository navigation
fix(bazel): ignore enum values the BEP protos don't have - #1360
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## tylerbeebe/bazel-9-bep-protos #1360 +/- ##
=================================================================
- Coverage 85.82% 82.74% -3.08%
=================================================================
Files 85 85
Lines 19186 19071 -115
=================================================================
- Hits 16467 15781 -686
- Misses 2719 3290 +571 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
TylerJang27
approved these changes
Nov 18, 2026
TylerJang27
left a comment
Collaborator
There was a problem hiding this comment.
There's a big ol debate about protobuf parser crates. I think prost is the standard, and this shouldn't be a big change, but would appreciate a quick sanity check from Dylan here
Contributor
Author
A JSON build event with an enum value our vendored protos lack, as Bazel 9's NON_CONFIGURABLE was, failed the whole parse and found no tests. pbjson-build 0.9's ignore_unknown_enum_variants reads such a value as the enum's default instead, as the binary parser already does. pbjson 0.9 needs prost 0.14, so bazel-bep moves to prost 0.14 alone, re-exports it for context's binary parser, and drops tonic: nothing enabled its gRPC client or server features. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
😎 Stack merged successfully - details. |
trunk-io
Bot
force-pushed
the
tylerbeebe/bep-ignore-unknown-enums
branch
from
November 18, 2026 03:37
d25f4ad to
6b536bc
Compare
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.
Stacked on #1359 (Bazel 9.0.1 protos). Merge that first; GitHub will then retarget this PR to
main.Why
#1359 fixes Bazel 9 by adding
NON_CONFIGURABLEto the vendored protos. The next Bazel that adds an enum value would break--bazel-bep-pathJSON uploads the same way, finding no tests. The JSON parser thatpbjsongenerates rejects any enum name it doesn't know. The binary parser already copes, because prost keeps unknown enum numbers.Change
pbjson-build0.9'signore_unknown_enum_variants. An unknown enum value now reads as the enum's default, like an unknown field, instead of failing the whole parse.pbjson0.9 needsprost0.14, sobazel-bepmoves toprost0.14,prost-build0.14 andprotox0.9. The rest of the workspace stays onprost0.12.bazel-bepnow re-exportsprost, andcontext's binary BEP parser decodes with that copy.tonic:bazel-bepdropstonicand itsclient/serverfeatures, which nothing enabled, and generates the messages withprost-builddirectly.Cargo.lock: it only removes the oldtonicstack and the duplicate oldhyper/axum/httpcopies it pulled in. It adds theprost0.14 family alongside 0.12. No version the rest of the workspace uses changed.bazel-bep/README.mdsays unknown fields and enum values are skipped.Testing
test_parse_json_bep_with_unknown_enum_values: a JSON BEP with option tags no Bazel has. It fails withoutignore_unknown_enum_variantsand passes with it.context,bazel-bep,trunk-analytics-cliandtest_reportsuites pass, except the three Swift xunit tests, which need a Swift toolchain this machine doesn't have.cargo check --workspace --all-targetspasses, including the Python and JavaScript bindings, andtrunk checkis clean.🤖 Generated with Claude Code