Automatically run `buf generate` when proto files are edited
stabai opened this issue · 0 comments
stabai commented
One of the biggest points of developer friction when working with protos is regenerating stubs after changing the protos. As quick as the Buf generator is, it would make a lot of sense for it to be automatically run any time proto files in its workspace are modified.
Example workflow:
- Developer is implementing a gRPC method in a Node server
- Realizes a field is missing from the request proto
- Opens the proto file and add the new field
- Saves the proto file
- Switches back to the server code implementing the gRPC method
- The server code is now aware of the new field and can use it
Without this feature, developers need an extra step between 4 and 5 to manually re-run the buf generate
command. It's not super time-consuming, but it's extra friction and context switching that can break flow.
Related: I've filed the same request for the IntelliJ plugin as bufbuild/intellij-buf#72