Skip to content
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

gRPC "option" expression support #118

Open
tim2CF opened this issue Nov 28, 2019 · 3 comments
Open

gRPC "option" expression support #118

tim2CF opened this issue Nov 28, 2019 · 3 comments

Comments

@tim2CF
Copy link
Collaborator

tim2CF commented Nov 28, 2019

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!

@Gabriella439
Copy link
Contributor

@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.

@tim2CF
Copy link
Collaborator Author

tim2CF commented Dec 11, 2019

thanks!

@Gabriella439
Copy link
Contributor

@tim2CF: You're welcome! 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants