Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply new proto2 field presence and default values for optional fields as well #720

Conversation

timostamm
Copy link
Member

This widens #716 to support default values for proto2 optional fields as well, and applies the same technique to support field presence as for proto2 required fields.

Since the well-known types in google/protobuf/descriptor.proto and google/protobuf/plugin.proto use proto2, call sites in our descriptor wrappers and plugin-framework that distinguish between set/unset fields need to be updated to use the functions for field presence added in #717.

@timostamm timostamm requested a review from jhump February 16, 2024 14:16
Copy link
Member

@jhump jhump left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@timostamm timostamm merged commit 26b4b13 into tstamm/improve-proto2-required Feb 16, 2024
3 checks passed
@timostamm timostamm deleted the tstamm/presence-and-default-values-for-proto2-optional-fields branch February 16, 2024 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants