proto3-suite icon indicating copy to clipboard operation
proto3-suite copied to clipboard

compile-proto-file does not respect the `package` directive

Open ProofOfKeags opened this issue 4 years ago • 2 comments

Trying to compile these protobufs here: https://github.com/lightningnetwork/lnd/blob/master/lnrpc/rpc.proto#L2421

It seems that it does not recognize the package prefix that is defined here: https://github.com/lightningnetwork/lnd/blob/master/lnrpc/rpc.proto#L3

Is this a bug or a limitation of the current implementation?

ProofOfKeags avatar May 14 '21 21:05 ProofOfKeags

Here's how it is defined by the protobuf3 spec: https://developers.google.com/protocol-buffers/docs/proto3#packages

I suppose the question is that if I were to submit a patch, what modules would I begin looking in here?

ProofOfKeags avatar May 14 '21 21:05 ProofOfKeags

Sorry for the late reply. This is definitely a bug in the current implementation. The main module that you would want to look at is Proto3.Suite.DotProto.Generate:

https://github.com/awakesecurity/proto3-suite/blob/master/src/Proto3/Suite/DotProto/Generate.hs

Gabriella439 avatar Jun 01 '21 19:06 Gabriella439