Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Switch from --go_out=plugins to -go-grpc_out PATH problem [duplicate]

I'm trying to setup an older go/grpc project of mine, about 4 months since last change, and protoc and protoc-gen-go seems to have changed a lot.

back in the days I was able to generate the files with something like:

protoc --go_out=plugins=grpc:. *.proto

As it is still documented at: https://github.com/golang/protobuf

But trying to run this todays gives the following error:

--go_out: protoc-gen-go: plugins are not supported; use 'protoc --go-grpc_out=...' to generate gRPC

Ok, so I tried to use the --go-grpc_out flag, but:

Please specify a program using absolute path or make sure the program is available in your PATH system variable

What am I missing? protoc-gen-go is registered in the path, as you can see when using the old command.

like image 358
Andre93 Avatar asked Apr 05 '20 15:04

Andre93


1 Answers

Answer: protoc-gen-go-grpc: program not found or is not executable

Short v1.2 of protoc-gen-go doesn't support plugins anymore. And will be replaced by protoc-gen-go-grpc, which I coulnd't find.

BUT!

github.com/golang/protobuf version of protoc-gen-go-grpc still and will be supporting plugins.

like image 200
Andre93 Avatar answered Nov 17 '22 17:11

Andre93