lileio / lile

Easily generate gRPC services in Go ⚡️
MIT License
1.51k stars 88 forks source link

Allow to use gogo/protobuf (importing files with no go_package) #23

Closed facundomedica closed 6 years ago

facundomedica commented 7 years ago

When I try to use gogo along with lile (protoc -I../vendor -I ../models -I . ecommerce.proto --lile-server_out=. --gogo_out=plugins=grpc:$$GOPATH/src)

I get

2017/09/29 18:35:42 No go_package option defined for import github.com/gogo/protobuf/gogoproto/gogo.proto
facundomedica commented 7 years ago

I commented the lines where lile makes the check and got it to work, but I don't know if it is okay to do that. The only problem I got is with a bad import in the generated service, which has nothing to do with this (it happens because of the modified protoc command I think).

facundomedica commented 7 years ago

Update: also it creates an import with a "."

arbarlow commented 7 years ago

@facundomedica sorry for the late reply! I tried this with a blank service and it worked fine (though I didn't code up a full app so I might be missing something for sure)

I tried.. lile new lileio/orders and then I changed the Makefile to be the following protoc -I . orders.proto --lile-server_out=. --gogo_out=plugins=grpc:$$GOPATH/src

I didn't get any compilation errors.

No go_package option defined is probably coming from the gogo.proto itself, can you give me a set of commands to run to reproduce, I would like to support gogo!

arbarlow commented 6 years ago

@facundomedica closing this for the moment, if you still have a problem, let me know!