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

buf config init that can parse the Protobuf roots of a given source directory #3176

Open
doriable opened this issue Jul 22, 2024 · 0 comments
Labels
Feature New feature or request

Comments

@doriable
Copy link
Member

doriable commented Jul 22, 2024

Feature

Having buf config init take a directory (. by default), finds all Protobuf definitions, and create a buf.yaml with the appropriate modules.

For example, I have a source repository for my project that might look something like:

.
├── LICENSE
├── README.md
├── proto
│   ├── api
│   └── vendor
└── src

Running buf config init, it would:

  • Find all the Protobuf definitions
  • Scans the import paths of all the files
  • Figures out that there are two Protobuf roots, api and vendor
  • Produce a buf.yaml with the following content:
version: v2
modules:
  - path: proto/api
  - path: proto/vendor

This is pretty closely related to #3159

@doriable doriable added the Feature New feature or request label Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant