Hi,
I've nearly finished writing a compiler plugin for generating PHP
code. I now wanted to support some additional options. However, I'm
not sure how to begin. When I have a custom option in my proto file,
protoc seems to die with this error:
my.proto:2:8: Option php_skip_unknown unknown.
This
Hey Christopher,
I wanted to ask that do you use RPC calling for your applications? You
serialized the data into the files and send those files to the
distributed processing. If I am getting this right then RPC can be one
way for the client server architecture. So what your feed on that. Is
It sounds like you are using custom options incorrectly, independent of your
plugin. That error message is being produced by protoc before it even tries
to call your plugin. Please double-check the docs on custom options. If
you can't figure out what's wrong, show us the .proto code you are
Thanks for your reply Kenton,
I've been going round in circles with the documentation but completely
missed the section on custom options. Ok, so that has helped a little
but I'm still not sure how to apply it. So here is some more
information. I have the sample addressbook.proto file and at the
Your options extensions can live in a .proto file in the location of your
choosing. protoc doesn't need to know about your options: it will simply
parse the options into the UninterpretedOptions message. Then in the .proto
files where you want to use your options, you need to put the option names
You do not need to compile your option declarations into protoc. You only
need to compile them into your plugin binary. Files which use your options
must import the .proto file that defines them. protoc will then parse the
option definitions dynamically.
For example, you could create a file
Thanks to both Jason and Kenton you have made this a lot clearer to me now!
and thanks for the reserved number 1004, when I make a site for this
project I'll send you the email.
Andrew
On Wed, Apr 21, 2010 at 1:53 AM, Kenton Varda ken...@google.com wrote:
You do not need to compile your option