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

Generate with dependencies using protoc #1019

Closed
ttc0419 opened this issue Nov 24, 2024 · 1 comment
Closed

Generate with dependencies using protoc #1019

ttc0419 opened this issue Nov 24, 2024 · 1 comment

Comments

@ttc0419
Copy link

ttc0419 commented Nov 24, 2024

I used protoc --fatal_warnings --es_out=src/protos --es_opt=target=ts -I protos -I protos/vendor protos/*.proto. But it does not generate ts for dependencies. What's the equivalent protoc command for buf include imports?

proto dir:

protos
├── dep.sh
├── envvar.proto
├── template.proto
└── vendor
    ├── google
    │   └── api
    │       ├── annotations.proto
    │       ├── field_behavior.proto
    │       ├── http.proto
    │       └── httpbody.proto
    └── validate.proto
@timostamm
Copy link
Member

To generate code for a Protobuf file, you have to pass the full path on the command line with protoc.

Something like:

protoc ...
  -I protos/vendor
  protos/vendor/google/api/*
  protos/vendor/*

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