vscode-proto3 icon indicating copy to clipboard operation
vscode-proto3 copied to clipboard

Bug report: can not detect imported *.proto filles after saving

Open magentaqin opened this issue 3 years ago • 7 comments

Can not detect imported *.proto filles after saving file. It indicates this error: Import "rpc_interface_common.proto" was not found or had errors. Screen Shot 2022-04-08 at 4 29 02 PM

But if I reload VSCode window, imported *.proto filles can be detected: Screen Shot 2022-04-08 at 4 31 32 PM

magentaqin avatar Apr 08 '22 08:04 magentaqin

I am having the same issue

gabrielrra avatar May 06 '22 18:05 gabrielrra

Same here, but I also noticed it works when you specify the import starting from the root of the project - e.g protos/common.proto works, but common.proto requires a VSCode reload to work properly

dstoyanoff avatar Oct 03 '22 09:10 dstoyanoff

+1

FishGoddess avatar Feb 20 '23 05:02 FishGoddess

I am having the same issue. My "fix" for now is to just press Ctrl+Shift+P and type "Reload Window". This "solves" the issue, but it's really frustrating when editing a lot of proto files.

jacobkapitein avatar Mar 17 '23 13:03 jacobkapitein

This comment solved my issue it seems https://github.com/zxh0/vscode-proto3/issues/112#issuecomment-980016036

I added in my projects' settings.json the following:

{
    "protoc": {
        "options": [
            "--proto_path=${workspaceFolder}/proto"
        ]
    }
}

My proto files are in a folder called "proto" in the root of my project. No more issues after saving.

simon-connektica avatar May 16 '23 22:05 simon-connektica