Closed
Description
Most protocol buffer and gRPC projects that I have seen involve many proto files that typically exist outside of the client codebase. These large sets of proto files can be compiled into a file descriptor set:
protoc -I . --descriptor_set_out=descriptor-set.bin foo.proto
These descriptor sets can then be consumed during the protoc
code generation process with --descriptor_set_in
:
mkdir codegen_dir
protoc --descriptor_set_in=descriptor-set.bin --java_out=codegen_dir foo.proto
Rather than having to include many *.proto
files, it would be cleaner (IMHO) if we could use a descriptor set. Example:
sources:
- name: MyGrpcApi
handler:
grpc:
endpoint: localhost:50051
protoFilePath: foo.proto # this will still be needed to identify which proto definition in the descriptor set should be used.
fileDescriptorSet: descriptor-set.bin
serviceName: Example # maybe this isn't needed
packageName: io.xtech.example # maybe this isn't needed