intellij icon indicating copy to clipboard operation
intellij copied to clipboard

Generated .pb.go files remain unsynced and unrecognized in GoLand

Open timduly4 opened this issue 2 years ago • 1 comments

GoLand isn't recognizing structures that are are generated by protobuf definitions, specifically the config.pb.go file. Any idea why?

This simple example is from the CockroachDB repo, and I have GoLand version 2022.1.3 with the Bazel plugin version 2022.06.14.0.1-api-version-221.

https://github.com/bazelbuild/intellij/issues/194 looks similar, but it is 5 years old, and they recommend to disable Go Modules. This is disabled by default in GoLand, and the problem remains.

Screen Shot 2022-06-26 at 6 03 40 PM

timduly4 avatar Jun 27 '22 00:06 timduly4

We've found that if we move the protobuf file to it's own sibling directory/module, the Bazel Plugin recognizes it. This doesn't work for the gogo protos, though. If anyone has advice on those, we'd love to hear workarounds.

JamesRTaylor avatar Aug 09 '22 01:08 JamesRTaylor

Hello @timduly4, I see the filenames are changed to proto and we are able to open and sync properly with bazel plugin. Could you please confirm if you are still looking unsynced error as mentioned in the above issue. Thanks!

sgowroji avatar Oct 04 '22 06:10 sgowroji

I've also been encountering this same issue! @sgowroji, I'm afraid I don't understand your last comment - are you able to replicate the issue or are you seeing different (working) behavior on your end? Happy to help add reproduction steps, assist in investigating here.

brandonwang15 avatar Dec 14 '22 09:12 brandonwang15

Yea if you are able to reproduce, could you provide some steps? Thanks!

sgowroji avatar Dec 14 '22 12:12 sgowroji

closing as no comments on this from @timduly4 since June 2022.

raoarun avatar Apr 20 '23 16:04 raoarun