proto3-suite
proto3-suite copied to clipboard
gRPC "option" expression support
Looks like atm option gRPC expression is not supported. Example:
[nix-shell:/app]# compile-proto-file --proto proto/lnd.proto > Lnd.hs --out src
Error: failed to compile "proto/lnd.proto":
CompileParseError "/app/proto/lnd.proto" (line 47, column 34):
unexpected "="
expecting "."
Here is link to actual line in protobuf document: https://github.com/lightningnetwork/lnd/blob/949a5c5a04a1d2ab239be5732fd1c6796f51e344/lnrpc/rpc.proto#L45
If proto3-suite does not support this feature (or it can't be fixed), maybe you can help me find a library which supports it. Thanks!
@tim2CF: proto3-suite currently does not support it
To provide some context here, one of the things we learned in the course of open sourcing this project is thatproto3-suite is doing something that is "architecturally" incorrect. Specifically, proto3-suite is parsing the .proto file itself, when protocol buffers was designed so that the protoc tool would parse that for you and pass in the parsed result to a plugin via a binary format (which is supported by the Haskell protocol-buffers package).
If we were to switch this to support being used as a protoc plugin then it would fix parsing issues like the one you mentioned, although at the moment we're not currently working on it.
thanks!
@tim2CF: You're welcome! 🙂