Skip to content

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

Open
@ZezhongWang

Description

@ZezhongWang

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions