buf icon indicating copy to clipboard operation
buf copied to clipboard

Improve error messages with workspaces (e.g. `buf push`)

Open amckinney opened this issue 2 years ago • 0 comments

We've seen a few users struggle with the fact that their module needs to define all of its dependencies in a buf.lock before it can be pushed to the BSR. This is described in the tour, but it's still not clear from the error message. For example, from Slack:

$ buf push
Failure: oqton/services/storage/v1/service.proto:6:8:oqton/schema/v1/method.proto: does not exist

In this case, the user's module successfully built with a buf.work.yaml in a parent directory, but it couldn't be pushed since it wasn't expressed in this module's buf.lock. Let's detect this and return a better error that explains that the dependency was found and that they just need to run buf mod update.

Note that this relates to some of the other workspace-level operations described here.

amckinney avatar Jan 29 '22 00:01 amckinney