buf icon indicating copy to clipboard operation
buf copied to clipboard

Explore .bufignore

Open amckinney opened this issue 2 years ago • 1 comments

We currently support build.excludes in the user's buf.yaml, but now that we plan to encode the ModuleConfig within the Module it's clear that the build section doesn't make as much sense here. The buf.yaml should remain focused on the properties of the module - not the files that buf should exclude from its build.

We already plan to roll out an --exclude flag for features like https://github.com/bufbuild/buf/issues/224, so we should explore a solution similar to git and docker, namely a .bufignore file that can ignore files and/or directories like so:

# .bufignore
foo/bar
baz/bat.proto

In this world, the .bufignore would exist alongside the user's buf.yaml and/or buf.work.yaml. We need to look into the exact semantics used by .dockerignore and .gitignore to see how and whether or not the values between multiple .bufignore files need to be merged into a single set.

amckinney avatar Sep 21 '21 23:09 amckinney

What do we want to do about this?

bufdev avatar Feb 03 '22 16:02 bufdev

Talked more about this, we're going to close this as we don't think this is on our near-term roadmap.

bufdev avatar Jan 30 '23 20:01 bufdev