buf icon indicating copy to clipboard operation
buf copied to clipboard

`path not exist` errors from `allowNotExist` check shows root relative paths instead of relative paths to working directory

Open doriable opened this issue 2 years ago • 2 comments

Currently, when we do checks for allowNotExist for paths provided through the --path and --exclude-path flags, we only print out the root relative path, example:

https://github.com/bufbuild/buf/blob/94997f821e98f05f0cf63aa0901cadb9fe567d57/private/bufpkg/bufmodule/targeting_module.go#L155

We should be printing out the path relative to the user's working directory for more clarity in debugging.

doriable avatar Nov 05 '21 21:11 doriable

Along the same lines, when we are returning errors to users around imports, we should indicate that in the error: https://github.com/bufbuild/buf-lint-action/issues/10

doriable avatar Jan 04 '22 15:01 doriable

I don't believe this path will necessarily be relative to a user's working directory - this could be within a tarball, git repo, etc.

bufdev avatar Jan 04 '22 15:01 bufdev