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

Is there a better way to generate the *.pb.h.cpp *.grpc.h.cpp files? #53

Open
ZezhongWang opened this issue Jan 30, 2023 · 0 comments
Open

Comments

@ZezhongWang
Copy link

If I use buf generate buf.build/authzed/api, it will only generate authzed/api/ c++ code, without dependencies needed like google/api.
How I fix this problem now is I copy all the .proto files into following folder structure:

Protos
├── authzed
│   └── api
│       └── v1
│           ├── core.proto
│           ├── debug.proto
│           ├── error_reason.proto
│           ├── openapi.proto
│           ├── permission_service.proto
│           ├── schema_service.proto
│           └── watch_service.proto
├── google
│   └── api
│       ├── annotations.proto
│       └── http.proto
├── protoc-gen-openapiv2
│   └── options
│       ├── annotations.proto
│       └── openapiv2.proto
└── validate
    └── validate.proto

But I think it's not an elegant way to do that if authzed dependencies and itself have updates, then I need to redo those copy again.
I think it would be nice that buf generate will also generate dependencies minimal set needed.
Is there a better way to achieve this?

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

1 participant