feat: support reserved enum values#688
Merged
anthony-swirldslabs merged 1 commit intomainfrom Nov 18, 2025
Merged
Conversation
Signed-off-by: Anthony Petrov <anthony@swirldslabs.com>
JUnit Test Report 78 files ±0 78 suites ±0 4m 5s ⏱️ -1s Results for commit f071ae0. ± Comparison against base commit 6b108a7. This pull request removes 2 and adds 1 tests. Note that renamed tests count towards both. |
Integration Test Report 410 files +1 410 suites +1 20m 17s ⏱️ + 3m 52s Results for commit f071ae0. ± Comparison against base commit 6b108a7. This pull request removes 3 and adds 11 tests. Note that renamed tests count towards both. |
jsync-swirlds
approved these changes
Nov 18, 2025
imalygin
approved these changes
Nov 18, 2025
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.
Description:
Introducing rudimentary support for reserved enum values. The grammar is able to parse them instead of treating them as regular enum values, and the code generator simply ignores them because PBJ doesn't support unknown enum values currently.
A new
enum_reserved.protois added to integration tests. W/o the fix, the model would produce a generated test that would fail because the output of the JSON codec would differ from what ProtoC generates.Also, I'm fixing a bunch of useless warning messages that PBJ used to produce for dangling comments and similar items.
Related issue(s):
Fixes #339
Notes for reviewer:
All tests should pass.
Checklist