Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: unknown command protoc for buf #1215

Closed
eleijonmarck opened this issue Jun 20, 2022 · 2 comments
Closed

Bug: unknown command protoc for buf #1215

eleijonmarck opened this issue Jun 20, 2022 · 2 comments

Comments

@eleijonmarck
Copy link

Hey,

I am trying to follow instructions for setting up a cosmos-sdk where I would like to generate protobuf files from buf.

context

I want to generate protobuf files. I have a docker image https://hub.docker.com/r/tendermintdev/sdk-proto-gen that I want to generate protobuf files with.

problem

buf protoc

unknown command "protoc" for "buf"

The following bash script should output the protobuf files

// makefile
...
proto_dirs=$(find ./proto -path -prune -o -name '*.proto' -print0 | xargs -0 -n1 dirname | sort | uniq)
for dir in $proto_dirs; do
  buf protoc \
  -I "proto" \
  -I "third_party/proto" \
  --gocosmos_out=plugins=interfacetype+grpc,\
Mgoogle/protobuf/any.proto=github.com/cosmos/cosmos-sdk/codec/types:. \
  $(find "${dir}" -maxdepth 1 -name '*.proto')
  
...

tested so far

downloading buf locally, I do not find the command avaialble.

buf version is here.

buf --version
1.5.0

Is there something I am missing?

@mfridman
Copy link
Member

mfridman commented Jun 20, 2022

We moved buf protoc to buf alpha protoc in #915.

I do not recommend using this command or relying on it, see linked issue for more details.

@mfridman
Copy link
Member

If you've seen references to buf protoc in our documentation, please let us know so we can fix this .. otherwise I'd suggest updating the cosmos-sdk instructions? Let us know if you have questions!

Closing the issue as no further action.

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

No branches or pull requests

2 participants