bufbuild/vscode-buf

Import external proto file Visual Studio Code error

Closed this issue · 4 comments

Screenshot 2022-02-17 at 12 00 44

How can I remove this error?
One way would be include .vscode/settings.json > "protoc": "options": --proto_path but I cant find where buf store them localy.

Hi @kroksys, thanks for filing this issue! Just as a heads-up, I transferred the issue to our vscode-buf repository, since this is specific to the plugin.

In terms of the issue you're seeing, the vscode-buf plugin uses our buf CLI, specifically buf lint, and since buf has its own compiler, it does not take a direct dependency on protoc, so it does not have the same settings or flags. In terms of your issue, I have a couple of questions regarding your setup:

I am having this issue as well with google/type/interval.proto. Here is my buf.yaml

version: v1
breaking:
  use:
    - FILE
lint:
  use:
    - MINIMAL
  except:
    - ENUM_VALUE_PREFIX
  # Recommended best practice is to use the buf.yaml to configure files/rules that should be ignored.
  # https://buf.build/docs/lint/overview/#allow_comment_ignores
  allow_comment_ignores: false
  rpc_allow_same_request_response: true
  rpc_allow_google_protobuf_empty_requests: true
  rpc_allow_google_protobuf_empty_responses: true
deps:
  - buf.build/googleapis/googleapis:01f6828d2b8868fc9d314f9ac86677d3253fa33b
Screenshot 2023-09-22 at 2 50 48 PM Screenshot 2023-09-22 at 2 51 15 PM

Weirdly, buf build and buf lint seem to be okay with it?

@willsoto I was getting the exact same was not found or had errors error and in my case it was from the vscode-proto3 extension, not from buf. Removing that extension gets rid of the errors.

Sounds like this has been resolved, so I'm going to close this issue. Feel free to re-open if I'm wrong!