You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
sbe: Codec::New binds a message with a oneof field, which protowire-go refuses #141
This port binds an SBE message that has a real oneof field, and protowire-go refuses it. Found while porting #132 (PR #140).
Go (encoding/sbe/template.go, since the initial release d137dd0) refuses a field in a non-synthetic oneof:
in a message: sbe: oneof field %s.%s not supported
in a composite: composite %s contains oneof field %s (wrapped by the caller, for example sbe: composite M.c: composite C contains oneof field f)
in a group entry: no check, so a oneof there binds in Go too.
A proto3 optional field sits in a synthetic oneof and is not refused.
C++ now (read from src/sbe/template.cc on the #140 branch, not measured): BuildTemplate and BuildCompositeFields have no oneof check, so such a message binds. Every member gets its own slot in the block, and Marshal writes all of them, unset members as zero.
Done when:Codec::New refuses a oneof member in a message and in a composite with Go's text, a proto3 optional field still binds, a group entry's oneof behaves as Go's does, and a test pins each case.
This narrows what binds, so the CHANGELOG should say so.
Activity
sbe: refuse a oneof field in a message or composite, as protowire-go …
sbe: refuse a oneof field in a message or composite, as protowire-go …
sbe: refuse a oneof field in a message or composite, as protowire-go …
sbe: refuse a oneof field in a message or composite, as protowire-go …
sbe: refuse a oneof field in a message or composite, as protowire-go …