-
Notifications
You must be signed in to change notification settings - Fork 48
feat(compliance): Add optional fields for all primitive types #1602
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
base: main
Are you sure you want to change the base?
Conversation
coryan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple of questions, but neither is blocking. I would like @vchudnov-g to take a look if possible.
| // The proto compiler seems to misgenerate optional bytes fields. | ||
| // The generated code looks like: | ||
| // ``` | ||
| // if cmd.Flags().Changed("info.p_bytes") { | ||
| // RepeatDataBodyInfoInput.Info.PBytes = &repeatDataBodyInfoInputInfoPBytes | ||
| // } | ||
| // ``` | ||
| // The dereference of `&repeatDataBodyInfoInputInfoPBytes` is incorrect since | ||
| // `repeatDataBodyInfoInputInfoPBytes` is already a `byte[]` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yikes! Did you file a bug?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did not. I assumed that there was something weird about the tooling that Showcase is using since it seems impossible that the official golang proto compiler would misgenerate code for such a common type.
| if req.GetReturnPartialSuccess() { | ||
| params.Add("returnPartialSuccess", fmt.Sprintf("%v", req.GetReturnPartialSuccess())) | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you know where these are coming from?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. I didn't look at any of the generated code.
No description provided.