On Wed, Feb 7, 2018 at 7:14 PM, Marquis Taliaferro < [email protected]> wrote:
> Is there a way to generating a api descriptor proto in bazel for a grpc > service. I dont mind writing my own rule but i would prefer not to just > use a genrule for this. What im trying to do is described here > <https://cloud.google.com/endpoints/docs/grpc/get-started-grpc-kubernetes-engine> > in > step 1. > > So basically given a proto_library rule like this > > proto_library( > name = "user_proto", > srcs = ["user.proto"], > deps = [ > ":error_proto", > "//src/main/proto/overloaded/common:common_proto", > "@googleapi//:annotations_proto"] > ) > > how would i generate a descriptor proto that is equivalant to being > generated on the commend line such as > > protoc \ > *--include_imports \* > * --include_source_info \* > --proto_path=. \ > --descriptor_set_out=api_descriptor.pb \ > user.proto > > If there are some docs that im missing that could help that would also be > very appreciated. > I think the bazel folks may answer this question better since they implemented the proto_library rule in bazel. You can post the question there as well. As I remember, the proto_library rule already produces a descriptor output but only for the proto in "srcs". So when you build "user_proto", a descriptor file for user.proto is produced but not with "include_imports", nor with "include_source_info". See: https://github.com/bazelbuild/bazel/issues/4201#issuecomment-348673194 https://github.com/bazelbuild/bazel/issues/4201#issuecomment-351055194 > > Thanks, > Marquis > > -- > 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.
