bazelbuild / intellij

IntelliJ plugin for Bazel projects
https://ij.bazel.build/
Apache License 2.0
763 stars 305 forks source link

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

Closed timduly4 closed 1 year ago

timduly4 commented 2 years ago

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
JamesRTaylor commented 2 years ago

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.

sgowroji commented 2 years ago

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!

brandonwang15 commented 1 year ago

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.

sgowroji commented 1 year ago

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

raoarun commented 1 year ago

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