buf icon indicating copy to clipboard operation
buf copied to clipboard

Outdated deps warning can be misleading when run from workspace directory

Open johanbrandhorst opened this issue 4 years ago • 1 comments

Steps to reproduce:

  1. Create a new workspace:
    version: v1
    directories:
      - proto
    
  2. Create a new module with at least one dependency in the proto directory:
    version: v1
    name: buf.build/whatever/whatever
    deps:
      - buf.build/googleapis/googleapis
    lint:
      use:
        - DEFAULT
    breaking:
      use:
        - FILE
    
  3. Run buf lint from the workspace directory:
    $ buf lint
    WARN    Specified deps are not covered in your buf.lock, run "buf mod update":
            - buf.build/googleapis/googleapis
    Failure: no .proto target files found # ignore this part
    

The misleading instructions here being that the user should run buf mod update inside the workspace directory, when it's really needed inside the proto directory.

johanbrandhorst avatar Oct 01 '21 13:10 johanbrandhorst

As a student, I found this ticket especially important. Some tutorials/guides (written in 2021-2022) contain this exact typo and it is a blocker. Without finding this ticket, I could not have proceeded with learning buf & grpc-gateway.

DennisPing avatar Jun 13 '22 17:06 DennisPing

This is going to change imminently, we're redoing workspaces in a v2 of the config files.

bufdev avatar Nov 27 '23 17:11 bufdev