Closed raphael closed 3 months ago
With user defined type protobuf names.
Example of problematic desgin:
var CustomType = Type("CustomType", func() { Meta("struct:name:proto", "CustomType") Meta("struct:pkg:path", "types") Field(1, "a", Int) Field(2, "b", String) }) Service("CustomMessageName", func() { Method("Unary", func() { Payload(CustomType) Result(CustomType) GRPC(func() {}) }) Method("Stream", func() { Payload(CustomType) Result(CustomType) GRPC(func() {}) }) })
Goa would generate function signature that would use the wrong package for the type constructors and results, e.g.:
func NewPayload(message *types.MethodPayload) *types.CustomType {
instead of:
func NewMethodPayload(message *service_payloadpb.MethodPayload) *types.CustomType {
The problem is the blind merge of all the payload metadata including the key that defines the custom package path.
With user defined type protobuf names.
Example of problematic desgin:
Goa would generate function signature that would use the wrong package for the type constructors and results, e.g.:
instead of:
The problem is the blind merge of all the payload metadata including the key that defines the custom package path.