Cap'n Proto library and code generator for Go
1.22k
stars
110
forks
source link
Setting a field in the data section of an unmarshaled struct created with a previous version that did not have any data section fields panics #562
Open
xortive opened 6 months ago
If one were to serialize
OldStruct
withgo-capnp
, deserialize it, and setnewField
, it will panic here: https://github.com/capnproto/go-capnp/blob/0d218d2660ffa094198d7aba689c4eb04ff6ae18/struct.go#L201I think
go-capnp
should allocate a data section in this scenario to match the C++ implementation.reproduction test: