GitHub repository with your minimal reproducible example (do not leave this field blank or fill out this field with "github.com/bufbuild/buf" or we will automatically close your issue, see the instructions above!)
https://github.com/ashtuchkin/buf-bug-repro
Commands
docker run -v .:/cloud --workdir=/cloud bufbuild/buf lint /cloud/cloud_protos/example/example.proto
Output
Failure: Module "path: ".", includes: "cloud_protos"" had no .proto files
Expected Output
No lint failures
Anything else?
It works if a relative path is provided (buf lint cloud_protos/example/example.proto) or if I use --disable-symlinks.
There are 2 problems:
- Error on absolute path. This is annoying because
vscode-buf plugin is using absolute paths when I'm editing files + recent version 0.7 started to open Output panel and focus it on each error, so I can't edit the proto files in peace - it always steals the focus and shows this error.
- Why does buf even traverses directories outside of
includes dirs in the modules? I've run it under strace and see it traverses not only the whole repo (including .git, .venv, node_modules etc), but also a lot of /home/<user>/.cache directories symlinked from it. In total, it's > 200000 files that are not relevant to the linting, which just makes buf slow (~8 seconds for each lint in my case).
Circular symlink is not a theoretical issue - it's what bazel creates in a standard setup, via bazel-<repo> symlink. With bazel it's 2 levels, but the error is reproducible with just one level: /cloud/bazel-cloud/cloud_protos -> /cloud/cloud_protos, see in the repo.
GitHub repository with your minimal reproducible example (do not leave this field blank or fill out this field with "github.com/bufbuild/buf" or we will automatically close your issue, see the instructions above!)
https://github.com/ashtuchkin/buf-bug-repro
Commands
Output
Expected Output
No lint failures
Anything else?
It works if a relative path is provided (
buf lint cloud_protos/example/example.proto) or if I use--disable-symlinks.There are 2 problems:
vscode-bufplugin is using absolute paths when I'm editing files + recent version 0.7 started to open Output panel and focus it on each error, so I can't edit the proto files in peace - it always steals the focus and shows this error.includesdirs in the modules? I've run it understraceand see it traverses not only the whole repo (including .git, .venv, node_modules etc), but also a lot of/home/<user>/.cachedirectories symlinked from it. In total, it's > 200000 files that are not relevant to the linting, which just makes buf slow (~8 seconds for each lint in my case).Circular symlink is not a theoretical issue - it's what bazel creates in a standard setup, via
bazel-<repo>symlink. With bazel it's 2 levels, but the error is reproducible with just one level:/cloud/bazel-cloud/cloud_protos -> /cloud/cloud_protos, see in the repo.