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

Support for optional fields #35

Closed
harkamals opened this issue Sep 17, 2022 · 5 comments
Closed

Support for optional fields #35

harkamals opened this issue Sep 17, 2022 · 5 comments

Comments

@harkamals
Copy link

go generate ./...
api/assessment/metric.proto: is a proto3 file that contains optional fields, but code generator protoc-gen-gotag hasn't been updated to support optional fields in proto3. Please ask the owner of this code generator to support proto3 optional.--gotag_out:
proto.go:38: running "protoc": exit status 1

@Kavuti
Copy link
Collaborator

Kavuti commented May 10, 2024

Is this issue still relevant?
Me, @ucpr and @mesmerx are embracing the project and planning both maintenance and evolution, so we would like to tidy up everything before working on new features. If the issue is not relevant anymore or we don't get a response in a few days, it will be closed, until we are ready to work on it.

@tristan-vt
Copy link

Hi! We are definitely still interested in this functionality. I feel like it should mainly be just updating proto version

@Kavuti
Copy link
Collaborator

Kavuti commented May 27, 2024

Which version of the plugin are you using? Seems that the plugin supports the optional fields since the Jun 16, 2021 release. Maybe you didn't upgrade to the latest version?

@mesmerx
Copy link
Collaborator

mesmerx commented Jun 1, 2024

if you want optional for a "null" field in proto3 all fields are optional in that sense, so it dont make sense, in proto itself, if its oneof its other case

https://stackoverflow.com/questions/42622015/how-to-define-an-optional-field-in-protobuf-3

@oxisto
Copy link
Contributor

oxisto commented Jun 8, 2024

This should be fixed with #48

@mesmerx mesmerx closed this as completed Jun 8, 2024
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

No branches or pull requests

5 participants