Open cnsgsz opened 7 months ago
@ujohnny @LeFrosch do you have capacity to handle it?
I can confirm I can reproduce the problem, however sadly I have to assign P3 as I don't have capacity to fix it soon
However, I think this might be caused by the fact that py_proto_library
from creates the class dynamically as you mentioned, so I'm not sure if this will ever work. Are there any other generators that create regular python class files?
Btw I'm not sure if we can do a lot about that on IJ side, however it seems that you could configure your project in a way it would produce more ide-readable python proto outputs. Btw there is a related ticked in the protocolbuffers project https://github.com/protocolbuffers/protobuf/issues/16115
Description of the bug:
Clion cannot find protobuf generated code.
This also makes auto-complete etc not possible for protobuf code.
Which category does this issue belong to?
CLion, PyCharm
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Define any proto and use
py_proto_library
that comes with the protobuf library.Example from tensorflow's workspace files:
In
BUILD
:Example
foo.proto
:Which Intellij IDE are you using? Please provide the specific version.
Clion 2023.3.4 and PyCharm professional 2023.3.4
What programming languages and tools are you using? Please provide specific versions.
python3.10
What Bazel plugin version are you using?
2024.1.30.0.1-api-version-233
Have you found anything relevant by searching the web?
No response
Any other information, logs, or outputs that you want to share?
It's not clear to me if this is a pycharm/clion issue, or bazel plugin issue, or protobuf (rule) issue. See this pycharm/clion issue.
In my generated
foo_pb2.py
, I don't seeFooProto
explicitly defined.globals()
might be doing something magical that confuses clion/pycharm?