Closed rubenv closed 7 years ago
Do you care about prototext support?
@awalterschulze Not really to be honest. Any way to disable that?
The only way is to disable all of testgen unfortunately.
This looks like our culprit https://github.com/gogo/protobuf/blob/master/proto/text_parser.go#L995
But thats weird, since reflect.Uint32 is right there in the switch statement above it, hmmm
I'll look at this later again
Perhaps it sees TypeIdentifier
rather than uint32
?
That I will check later, but that is my hope as well. Because that might be fixable.
So the problem is in text.go
default:
_, err := fmt.Fprint(w, v.Interface())
return err
}
This will cause the String method to be called.
To get around this will require a lot of special case handling.
To get around this will require a lot of special case handling.
Looking at 2adc21f you have a very special definition of "a lot" :-)
Thanks a lot for the fix and the awesome, awesome project that gogoprotobuf is.
Yes after I made that statement I got a better plan 😀
On Thu, 31 Aug 2017, 21:01 Ruben Vermeersch, notifications@github.com wrote:
To get around this will require a lot of special case handling.
Looking at 2adc21f https://github.com/gogo/protobuf/commit/2adc21fd136931e0388e278825291678e1d98309 you have a very special definition of "a lot" :-)
Thanks a lot for the fix and the awesome, awesome project that gogoprotobuf is.
— You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub https://github.com/gogo/protobuf/issues/330#issuecomment-326390806, or mute the thread https://github.com/notifications/unsubscribe-auth/ABvsLfBE0V3cAJAKZjtd3GhMMWiw_bqYks5sdwLugaJpZM4PIh_b .
My pleasure. I am glad you enjoy it.
On Thu, 31 Aug 2017, 22:13 Walter Schulze, awalterschulze@gmail.com wrote:
Yes after I made that statement I got a better plan 😀
On Thu, 31 Aug 2017, 21:01 Ruben Vermeersch, notifications@github.com wrote:
To get around this will require a lot of special case handling.
Looking at 2adc21f https://github.com/gogo/protobuf/commit/2adc21fd136931e0388e278825291678e1d98309 you have a very special definition of "a lot" :-)
Thanks a lot for the fix and the awesome, awesome project that gogoprotobuf is.
— You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub https://github.com/gogo/protobuf/issues/330#issuecomment-326390806, or mute the thread https://github.com/notifications/unsubscribe-auth/ABvsLfBE0V3cAJAKZjtd3GhMMWiw_bqYks5sdwLugaJpZM4PIh_b .
Consider the following:
With
TypeIdentifier
defined like this:The generated tests for this fail:
Obviously this is related to the
String()
method onTypeIdentifier
. Is this a bug or am I doing something wrong?