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

how to config pass arguments instead of pipeline? #358

Closed
yinheli opened this issue Jun 30, 2021 · 3 comments
Closed

how to config pass arguments instead of pipeline? #358

yinheli opened this issue Jun 30, 2021 · 3 comments

Comments

@yinheli
Copy link

yinheli commented Jun 30, 2021

buf.gen.yaml

version: v1beta1
plugins:
  - name: go
    out: .
    opt: paths=source_relative
  - name: go-grpc
    out: .
    opt:
      - paths=source_relative
      - require_unimplemented_servers=false
  - name: js
    out: js
    opt:
      - import_style=commonjs,binary
  - name: grpc
    out: js
    opt:
      - grpc_js

install protoc-gen-grpc

yarn global add request protoc-gen-grpc protoc-gen-grpc-ts 

that plugin not support pipeline pass proto file.

which error with "Missing input file" when do generate

buf generate

Missing input file.
/usr/local/share/.config/yarn/global/node_modules/protoc-gen-grpc-ts/bin/protoc-gen-grpc.js:41
        throw error;
        ^

Error: Command failed: /usr/local/share/.config/yarn/global/node_modules/protoc-gen-grpc-ts/bin/protoc --plugin=protoc-gen-grpc=/usr/local/share/.config/yarn/global/node_modules/protoc-gen-grpc-ts/bin/grpc_node_plugin
Missing input file.

    at ChildProcess.exithandler (child_process.js:308:12)
    at ChildProcess.emit (events.js:315:20)
    at maybeClose (internal/child_process.js:1048:16)
    at Socket.<anonymous> (internal/child_process.js:439:11)
    at Socket.emit (events.js:315:20)
    at Pipe.<anonymous> (net.js:673:12) {
  killed: false,
  code: 1,
  signal: null,
  cmd: '/usr/local/share/.config/yarn/global/node_modules/protoc-gen-grpc-ts/bin/protoc --plugin=protoc-gen-grpc=/usr/local/share/.config/yarn/global/node_modules/protoc-gen-grpc-ts/bin/grpc_node_plugin'
}
Failed to "generate": plugin grpc: exit status 1.
@johanbrandhorst
Copy link
Contributor

Hi, thanks for your issue. What do you mean by "pipeline pass proto file"? buf generate will pass the Protobuf files as encoded CodeGeneratorRequests to the plugins. Could you give me an example of a working protoc command perhaps?

@yinheli
Copy link
Author

yinheli commented Jul 1, 2021

I attached the example.

proto-example-node.tar.gz

Maybe is the issue of grpc_tools_node_protoc, which is not adapted with buf

@bufdev
Copy link
Member

bufdev commented Jul 1, 2021

We won't be downloading a tarball you attached to GitHub issues. Please provide an example in the comments of this issue.

@yinheli yinheli closed this as completed Jul 3, 2021
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

3 participants