Do you have a minimal example? On 4 June 2012 11:48, Ahmed Charfeddine <[email protected]> wrote:
> Knowlegeable answer. > Ok it is very natural that within the scope of a single message, ids are > required to be unique. > But I'm putting all messages in one file and the compiler was complaining > about shared ids. [?] > > > > On Mon, Jun 4, 2012 at 11:44 AM, Marc Gravell <[email protected]>wrote: > >> it only has to be unique to the particular message - not unique globally. >> The "why" is simply: because that is what it uses on the wire to identify >> different members. >> >> If they weren't unique, clearly it wouldn't work. If they weren't >> explicit (but were, say, assumed positionally) then it would not be >> possible to version the contracts easily, and extension members wouldn't >> make much sense. >> >> Or another way of considering it: ask the same question, but in the >> context of a regular programming language: replace "id" with "member name". >> Same thing - just less text on the wire. >> >> (if I've missed the point of your question, let me know) >> >> Marc >> >> On 4 June 2012 11:03, charfeddine.ahmed <[email protected]>wrote: >> >>> Why do we need to put a unique id to each member in a .proto file ? >>> It is annoying when we need to make changes (add, remove members). >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Protocol Buffers" group. >>> To post to this group, send email to [email protected]. >>> To unsubscribe from this group, send email to >>> [email protected]. >>> For more options, visit this group at >>> http://groups.google.com/group/protobuf?hl=en. >>> >>> >> >> >> -- >> Regards, >> >> Marc >> > > -- Regards, Marc -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/protobuf?hl=en.
<<B05.gif>>
