-
Notifications
You must be signed in to change notification settings - Fork 343
Description
Feature
I've written a local buf plugin that generates empty Connect implementation files from .proto definitions. Whenever I define a new RPC method, I simply run the proto compilation again, and it automatically generates a corresponding empty implementation for the new RPC.
Currently, if I set clean: true, all previously generated RPC implementations are deleted and regenerated from scratch. However, I'd also like certain directories that contain basic structural definitions generated from proto—such as the protocol directory—to be cleaned on every compilation (e.g., in case I've deleted a .proto file and want its generated artifacts removed too).
It would be ideal if I could configure the clean option in buf.gen.yaml like this:
clean:
- protocolThat would solve the problem perfectly. After all, when using protoc directly, it's quite straightforward to customize whether or not to delete files in the output directory. If buf aims to offer a superior developer experience, I’d suggest avoiding overly restrictive defaults and allowing more flexibility.