I have a workspace where I use gazelle to generate my BUILD files and for some reason the com_github_ipfs_go_merkledag dependency is breaking the build when trying to resolve it's github.com/gogo/protobuf/gogoproto dependency. The setup and run is below.
Workspace:
# Declare indirect dependencies and init toolchains.
go_rules_dependencies()
go_register_toolchains(version = "1.16")
go_embed_data_dependencies()
load("@rules_proto//proto:repositories.bzl", "rules_proto_dependencies", "rules_proto_toolchains")
rules_proto_dependencies()
rules_proto_toolchains()
load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies", "go_repository")
gazelle_dependencies()
Commands:
bazel run //:gazelle
bazel run //:gazelle -- update-repos -from_file=go.mod
bazel build //...
Output:
...
no such package '@com_github_ipfs_go_merkledag//github.com/gogo/protobuf/gogoproto':
BUILD file not found in directory 'github.com/gogo/protobuf/gogoproto' of external repository @com_github_ipfs_go_merkledag.
Add a BUILD file to a directory to mark it as a package. and referenced by '@com_github_ipfs_go_merkledag//pb:merkledag_pb_go_proto'
...
Not sure what the solution for this is?