0

I'm not being able to generate the protobuffer files for grpc

protoc -I=./ --go_out=plugins=grpc:. code/proto/*
--go_out: protoc-gen-go: plugins are not supported; use 'protoc --go-grpc_out=...' to generate gRPC

See https://grpc.io/docs/languages/go/quickstart/#regenerate-grpc-code for more information.
make: *** [protoc-gen] Error 1

I don't want to regenerate using the new version cause is not backwards compatible, I need to use the version (I don't find which one is it) that can run with plugins

user1532587
  • 993
  • 1
  • 14
  • 39

1 Answers1

0

I've been able to generate valid code (doesnt break anything) with this command. First using --go-grpc_out as a replacement of the grpc plugin used before and second using this flag require_unimplemented_servers=false to avoid adding an extra method that can break your code if you're using polimorphism

protoc -I=./ --go-grpc_out=require_unimplemented_servers=false:.  --go_out=.  code/proto/*
user1532587
  • 993
  • 1
  • 14
  • 39