You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, apologies if there's a better way to raise this / this could very well be a user error, but I've been struggling to make automatic resolution of generated python targets work with gazelle.
Essentially I have a proto_py_libraryhello_py_library with src hello_pb2.py; these are all located in directory examples/basic. If I don't add a resolve line # gazelle:resolve py examples.basic.hello_pb2 //examples/basic:hello_py_library to my top-level BUILD file then any py_library that tries to import from examples.basic import hello_pb2 will fail to resolve with gazelle, eg)
gazelle: ERROR: failed to validate dependencies for target "@mchristen//examples/basic:client": "examples.basic.hello_pb2" at line 6 from "examples/basic/client.py" is an invalid dependency: possible solutions:
Is there something I can do with gazelle or stackb_rules_proto to make gazelle aware of this mapping without having to manually annotate it each time a .proto is added?
Any help would be greatly appreciated.
The text was updated successfully, but these errors were encountered:
Hello, apologies if there's a better way to raise this / this could very well be a user error, but I've been struggling to make automatic resolution of generated python targets work with gazelle.
michael-christen/toolbox#50 demonstrates how to reproduce the issue.
Essentially I have a
proto_py_library
hello_py_library
with srchello_pb2.py
; these are all located in directoryexamples/basic
. If I don't add a resolve line# gazelle:resolve py examples.basic.hello_pb2 //examples/basic:hello_py_library
to my top-level BUILD file then anypy_library
that tries to importfrom examples.basic import hello_pb2
will fail to resolve with gazelle, eg)Is there something I can do with gazelle or stackb_rules_proto to make gazelle aware of this mapping without having to manually annotate it each time a .proto is added?
Any help would be greatly appreciated.
The text was updated successfully, but these errors were encountered: