All fully-qualified symbols must be a unique for an invocation of protoc.
In the generated code, you can refer to the generated extension (just like
referring to generated messages, enums, and services), and if their
fully-qualified names weren't unique, it would result in compilation errors
in the generated code.

----
*Josh Humphries*
jh...@bluegosling.com

On Mon, Mar 13, 2017 at 4:15 PM, Arpit Baldeva <abald...@gmail.com> wrote:

> Hi,
>
> I have my proto file like following.
>
> package example;
>
> message ExFieldOptions
> {
>   map<string, string> meta_data = 1;
> }
>
> extend google.protobuf.FieldOptions
> {
>     ExFieldOptions exOptions = 4245;
> }
>
> extend google.protobuf.MessageOptions
> {
>     ExFieldOptions exOptions = 4245;
> }
>
> When I run it through ProtoC (for C++ code generation), I run into an error
>
> "exOptions" is already defined in "example".
>
> Is this a bug? Or is it required that extension name need to be unique
> across options?
>
> Thanks.
>
> --
> 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+unsubscr...@googlegroups.com.
> To post to this group, send email to protobuf@googlegroups.com.
> 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 protobuf+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.

Reply via email to