Skip to content
This repository has been archived by the owner on Mar 4, 2022. It is now read-only.

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

Open
Asalle opened this issue Jul 12, 2021 · 3 comments

Comments

@Asalle
Copy link

Asalle commented Jul 12, 2021

Prerequisites:

  1. protoc-gen-go v1.26.0
  2. protoc-gen-go-grpc 1.1.0
  3. libprotoc 3.12.4

Steps to reproduce:

  1. prototool generate <directory>

Expected results:
Generated protocols.

Actual result:

2021-07-12T14:03:00.200+0200	WARN	protoc returned a line we do not understand, please file this as an issue at https://github.com/uber/prototool/issues/new	{"protocLine": "See https://grpc.io/docs/languages/go/quickstart/#regenerate-grpc-code for more information."}
<input>:1:1:See https://grpc.io/docs/languages/go/quickstart/#regenerate-grpc-code for more information.
<input>:1:1:protoc-gen-go: protoc-gen-go: plugins are not supported; use 'protoc --go-grpc_out=...' to generate gRPC

9 times, I assume it's the number of files in the previously mentioned <directory>.

Possible explanation
It seems that protoc-gen-go does not support plugins since v1.2 link.

Is there a way to use the new protoc-gen-go-grpc binary with prototool?

@hi-horan
Copy link

hi-horan commented Aug 5, 2021

i run this command,and it's solved.

go get github.com/golang/protobuf/protoc-gen-go

@Asalle
Copy link
Author

Asalle commented Aug 10, 2021

@hi-horan in the readme of https://github.com/golang/protobuf/ you can see that it has been superseeded by google.golang.org/protobuf which causes the effect above.

@cep21
Copy link

cep21 commented Sep 27, 2021

May help to update the example. This should work

protoc:
  version: 3.11.0
lint:
  group: uber2

generate:
  go_options:
    import_path: github.com/me/helloworldgov1/gen
  plugins:
    - name: go
      type: go
      output: ../gen/go
    - name: go-grpc
      type: go
      output: ../gen/go

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

No branches or pull requests

3 participants