-
Notifications
You must be signed in to change notification settings - Fork 575
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Accept binary DescriptorProto as input #2940
Comments
There is indeed no way to do that right now. And although we have a |
Thanks for the reply. I understand this is a specific need of mine. |
No way for your source to expose |
Long story short, a subset of our proto messages are not defined in Our source of truth is a proto message in protobuf text format. We digest that message and produce N binary files of protobuf types, which are then fed to different platforms for code generation. |
I would like to use a binary
DescriptorProto
as input tosourcePath
orprotoPath
Where
first_file.pb
is a serializedDescriptorProto
.I checked Wire's source code and I don't think there's a way to do this right now.
ProtoParser
expects.proto
, and unfortunatelyprotobuf-java
does not support generating.proto
files.Since Wire can generate protobuf-compatible binary files, maybe it isn't too hard to accept binary as input too?
To expand on my use case, I receive a serialized
FileDescriptorSet
as input. Onprotoc
, the call to generate code would beWhere
first_file_name.proto
andsecond_file_name.proto
areDescriptorProto
indata_models.pb
, aFileDescriptorSet
. Whenprotoc
doesn't find a.proto
file in the filesystem, it looks if it exists in any of thedescriptor_set_in
parameters. If there's aFileDescriptorProto
with that name, it generates the code.Thanks!
The text was updated successfully, but these errors were encountered: