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

make hasOptionalKeyword function public #17714

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mscheong01
Copy link
Contributor

Hi, I am currently migrating my third party Kotlin protobuf code generation libaray, krotoDC from protobuf v3 to v4.
However, I noticed that FieldDescriptor::hasOptionalKeyword() has become package-private. My library relies on this api to check if the field is private or not. can we please make this function public again?

@mscheong01 mscheong01 requested a review from a team as a code owner August 4, 2024 07:22
@mscheong01 mscheong01 requested review from shaod2 and removed request for a team August 4, 2024 07:22
Copy link

google-cla bot commented Aug 4, 2024

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@mscheong01
Copy link
Contributor Author

ref: mscheong01/krotoDC#32

@shaod2 shaod2 requested review from zhangskz and removed request for shaod2 August 14, 2024 16:21
@zhangskz
Copy link
Member

hasOptionalKeyword() was intentionally removed as part of 1aeacd4 since these API's are proto2/proto3 specific and break under Editions (https://protobuf.dev/editions/overview/).

Most users of hasOptionalKeyword() likely want to move to use FieldDescriptor.hasPresence() instead. Can you elaborate on what you mean by "to check if the field is private or not"?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants