-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Description
It seems that the Marshal method is called when deterministic is true or false.
https://github.com/golang/protobuf/blob/master/proto/table_marshal.go#L227-L232
This might be a non deterministic generated Marshal method in a library used by a user pulling in the newer version of golang/protobuf, where they are able to set deterministic to true.
Even if we modify this code to rather be
if u.hasmarshaler && !deterministic {
...
}
We also have to worry about
https://github.com/golang/protobuf/blob/master/proto/table_marshal.go#L310-L314
Which means that if there is a Marshaler the size cache is not set, but the non generated marshal function assumes that it is set.
How do we solve this?
Metadata
Metadata
Assignees
Labels
No labels