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

Add google protoc plugin generated golang struct support #241

Merged
merged 5 commits into from
Oct 1, 2020

Conversation

alexshtin
Copy link
Member

@alexshtin alexshtin commented Aug 31, 2020

Proto golang structs might be generated with 4 different protoc plugin versions:

  1. github.com/golang/protobuf - ~v1.3.5 is the most recent pre-APIv2 version of APIv1.
  2. github.com/golang/protobuf - ^v1.4.0 is a version of APIv1 implemented in terms of APIv2.
  3. google.golang.org/protobuf - ^v1.20.0 is APIv2.
  4. github.com/gogo/protobuf - any version.

Only case 4 was supported before. This PR add supports for cases 2 and 3 which are the same in this context. Case 1 is still not supported.

Also added test to verify that enum values are serialized properly.
https://community.temporal.io/t/protos-in-activities-arguments/555.

Also added better error message in case if value passed to FromPayload is not a pointer.

@alexshtin alexshtin changed the title Add jsonpb encoding test for enum inside proto object Add google protoc plugin generated golang struct support Oct 1, 2020
@alexshtin alexshtin merged commit b5049b0 into temporalio:master Oct 1, 2020
@alexshtin alexshtin deleted the feature/test-jsonpb-enum branch October 1, 2020 05:37
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