Description
What version of protobuf and what language are you using?
v31.1
What operating system (Linux, Windows, ...) and version?
Linux
What runtime / compiler are you using (e.g., python version or gcc version)
What did you do?
Minimal example:
MODULE.bazel
bazel_dep(name = "protobuf", version = "31.1")
BUILD.bazel
genrule(
name = "foo",
# srcs = ["@protobuf//:protobuf_java"],
srcs = ["@protobuf//:protobuf_python"],
outs = ["bar.txt"],
cmd = "ls > \"$@\"",
tools = [],
)
Then run bazel query 'deps(//...)'
This works with @protobuf//:protobuf_java
as a dependency but I immediately get an error with @protobuf//:protobuf_python
as a dependency.
What did you expect to see
$ bazel query 'deps(//...)'
-> a list of my dependencies.
What did you see instead?
$ bazel query 'deps(//...)'
ERROR: Evaluation of query "deps(//...)" failed: preloading transitive closure failed: error loading package '@@protobuf+//python/dist': Unable to find package for @@[unknown repo 'protobuf_pip_deps' requested from @@protobuf+]//:requirements.bzl: The repository '@@[unknown repo 'protobuf_pip_deps' requested from @@protobuf+]' could not be resolved: No repository visible as '@protobuf_pip_deps' from repository '@@protobuf+'.