--
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/protobuf/cdfd705b-7504-4220-93b7-0d2e3bc9c82f%40googlegroups.com.
Hi Afshin, adding a new field to an existing oneof is safe. Moving existing fields into a new or existing oneof may be unsafe as described in the language guide. Sounds like the guides you have looked into are inaccurate. If you don't mind, can you provide a link?
On Sun, Mar 29, 2020 at 10:19 AM Afshin <afsh...@gmail.com> wrote:
--Hi allWhen I was reading guides for protobuf 3, there was a huge limitation for oneof field. The guide states that updating a message by adding new fields to an existing oneof field is not safe. For example, if I have following message:message TestIt {oneof my_field {DataA a = 1;DataB b = 2;}}I cannot update it to the this new message:message TestIt {oneof my_field {DataA a = 1;DataB b = 2;DataC c = 3;}}
I think this is a really huge limitation for oneof field and makes it useless in a lot of cases. Is there any way to achieve something similar without using Any object?
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prot...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/protobuf/cdfd705b-7504-4220-93b7-0d2e3bc9c82f%40googlegroups.com.
---Nadav