// issue.proto
syntax = "proto2";
message Qux {
optional uint32 waldo = 1;
}
message Bar {
optional Qux qux = 1;
}
message Foo {
optional Bar bar = 1;
}
issue_pb = require('issue_pb')
foo = issue_pb.Foo()
foo.bar.qux.waldo = 1
foo:SerializeToString()
SerializeToString loops infinitely at _AddListFieldsMethod.
The problem seems to be that bar. _is_present_in_parent is false b/c bar.SetInParent is never called (may be?)
If I manually call bar.SetInParent, then it just works
issue_pb = require('issue_pb')
foo = issue_pb.Foo()
foo.bar.qux.waldo = 1
bar:SetInParent()
foo:SerializeToString() -- Now it works, I get the string
SerializeToString loops infinitely at _AddListFieldsMethod.
The problem seems to be that bar. _is_present_in_parent is false b/c bar.SetInParent is never called (may be?)
If I manually call bar.SetInParent, then it just works