higherkindness / mu-haskell

Mu (μ) is a purely functional framework for building micro services.
http://higherkindness.io/mu-haskell/
Apache License 2.0
330 stars 19 forks source link

Quasi.Protobuf fails to parse valid protobuf3 file #310

Open ProofOfKeags opened 3 years ago

ProofOfKeags commented 3 years ago

https://github.com/higherkindness/mu-haskell/blob/master/adapter/protobuf/src/Mu/Quasi/Grpc.hs

using the grpc quasiquoter fails to actually parse this particular protobuf definition: https://github.com/lightningnetwork/lnd/blob/v0.12.1-beta/lnrpc/rpc.proto

My first guess is that it doesn't like some of the package directives near the top that suggest the possibility of multifile protobuf defs.

Do you know why this might be? Is it a limitation that the team is aware of or is it something we have to explore?

If it needs exploration, how might I get at better error messages?

kutyel commented 3 years ago

Hi @ProofOfKeags, sorry for the late reply, is this maybe a duplicate of #257?

ProofOfKeags commented 3 years ago

Very possibly. You'll see that I commented on that issue at roughly the same time as I opened this ticket. I opened this one anyway because it was not clear that the imports were the specific reason it was failing, and not something else. This is because the specific file in question here does not actually import anything. However due to the package directive it might implicitly do so. I opened this ticket for thoroughness. I don't believe it is prudent at this time to close it as a duplicate just yet. But I can say that perhaps until #257 is resolved, that the only investigation that will help here is something that is more clear about the specific mode of failure in protobuf compilation.

kutyel commented 3 years ago

Makes sense, thanks! When we fix #257 we can revisit this issue and see if it was solved already! 👍🏻