dproto icon indicating copy to clipboard operation
dproto copied to clipboard

is there an equivalent of MergeFrom in dproto?

Open timotheecour opened this issue 7 years ago • 3 comments

https://developers.google.com/protocol-buffers/docs/reference/cpp/google.protobuf.message

if not, could that be on the roadmap?

for reference: see also https://github.com/google/protobuf/issues/3106#issuecomment-302232227

timotheecour avatar May 16 '17 18:05 timotheecour

Take a look at 76f074e, I added an implementation with some basic testing.

msoucy avatar May 17 '17 02:05 msoucy

awesome! btw, google's MergeFrom appends for repeated fields, which is kind of a silly default, how about adding an option to control whether repeated fields are appended or replaced if defined on the 2nd message?

timotheecour avatar May 17 '17 05:05 timotheecour

I have some other stuff on my plate at the moment, but it should be straightforward to add now that the framework for it is there.

msoucy avatar May 17 '17 23:05 msoucy