On Mar 6, 4:55 pm, aepensky <apen...@gmail.com> wrote:
> Sorry, I realize that wasn't a very clear statement...
> What I mean is, if there is an option which does not leave any
> "fingerprint" in either the serialized message or the
> FileDescriptorSet, so that you can't tell how the option was set by
> looking at either of these, then the option is controlling only code
> generation and is not affecting the service contract.  So it should
> not be in the .proto file.
> I think that applies to the package statement as well as
> optimize_for.  Protocol Buffers does not put globally unique
> signatures into the messages or descriptors based on your package
> declaration.  It only affects the code generation.

It's definitely in the descriptor set - because that's what my C#
generator uses!

I agree that it doesn't affect the wire format of the messages
themselves, but I still think a world in which everyone who uses the
same package/namespace for the same proto for each language is a saner
one. (i.e. all Java users will see one package; all C# users will see
one namespace, etc. There can be differences between languages, but at
least two users of the same language have a common namespace).

It's certainly a personal thing, and again maybe you should be able to
*override* it from the command line, but I think it makes sense to at
least put "default" package/namespace options into the proto file.

You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To post to this group, send email to protobuf@googlegroups.com
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to