This is in the docs: https://developers.google.com/protocol-buffers/docs/proto#assigning-field-numbers
Yes, message is the scope for field numbers. Field numbers only need to be unique within a message -- e.g. MessageA cannot have two fields with the same number; but it is fine if MessageA and MessageB both have fields numbered 1. ---- *Josh Humphries* [email protected] On Fri, Mar 15, 2019 at 2:58 PM Michael Powell <[email protected]> wrote: > > > On Thursday, March 14, 2019 at 8:48:54 PM UTC-4, Michael Powell wrote: >> >> Hello, >> >> I am scanning through the v2 language guide, and the reserved field >> numbers as well as the allowed field numbers makes sense. >> >> What does not make sense is the scope. Is the scope contained with in a >> given message? That is, MessageA has one set of field numbers, whereas >> MessageB has an entirely different, distinct set of field numbers? >> > > Anyone at all? I'm thinking Message is the scope of a unique set of field > numbers, but I could be wrong there. Just looking for some clarification. > > Or is the scope broader than that? Say, an entire Package, Proto file, etc? >> >> Thanks! >> >> Best regards, >> >> Michael W Powell >> >> -- > 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 [email protected]. > To post to this group, send email to [email protected]. > Visit this group at https://groups.google.com/group/protobuf. > For more options, visit https://groups.google.com/d/optout. > -- 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/protobuf. For more options, visit https://groups.google.com/d/optout.
