So, let's say I'm developing a plugin which, say, add or removes builder
pattern to java generator (this is actually a real use case). So I created a
.proto file with my plugin metadata info:


import "google/protobuf/descriptor.proto"

extend google.protobuf.MessageOptions {
  optional bool use_builder_pattern = 50001;

Now I can just do:


import "path/to/MyPluginMetadata.proto"

message Foo {
  option (use_builder_pattern) = true;

Now, when I ask protoc to generate code for MyAppMessages.proto, I
get which depends on, even
though MyPluginMetadata.proto solely provides metadata extensions. Is there
a way to avoid that?


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

Reply via email to