-
Notifications
You must be signed in to change notification settings - Fork 582
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 gogoproto #52
Comments
This is probably an oversight in the template, not using the correct package value. I can look into this.
I haven't worked with gogoproto, so I don't have specifics here, but I'd say we should treat this as a different language target since it deviates in some fundamental ways from the official protoc-gen-go output. A lot could be reused between the two, though. |
Tis a good start to be sure to be sure, but I have run into an issue with
|
|
I added GoGo support to If approach in lyft/protoc-gen-star#51 seems viable and it gets merged, I can open PR to this repo for improving the GoGo support. FTR, in our fork (https://github.com/TheThingsIndustries/protoc-gen-validate) we added support for fielpaths in validators, so the caller can specify a subset of fields to validate. If no paths are specified - all fields are validated, same as the original plugin. |
Is there any plan supporting gogoproto.embed? Embed reduce a lot of duplicate codes. Right now I have to skip the embed message. message AdPrimaryKey {
string media = 1;
string name = 2;
}
message Ad {
AdPrimaryKey pk = 1 [(gogoproto.embed) = true, (validate.rules).message.skip = true];
AdType type = 2 [(validate.rules).enum.not_in = 0];
enum AdType {
NONE = 0;
OTHERS = 1;
VIDEO = 2;
}
}
message UpdateAdRequest {
AdPrimaryKey pk = 1 [(gogoproto.embed) = true, (validate.rules).message.skip = true];
Ad ad = 2;
} |
care about this too. |
Given that the project is unmaintained for a while gogo/protobuf#691 I would not expect this to happen |
It seems that this tool only supports the standard goproto code generation output. I have noticed the following deviations for gogo:
go_package
annotation that allows multiple proto files to be combined into one package, to avoid circular dependencies between packagesgogoproto.nullable
changes a pointer to an embedded struct for fields that are not nullable by constructiongogoproto.stdduration
changes a duration fromptypes.Duration
totime.Duration
What needs to be done to extend PGV with gogo support?
The text was updated successfully, but these errors were encountered: