We have proto files that import "google/api/annotations.proto";
. I'm adding # gazelle:resolve proto go google/api/annotations.proto @org_golang_google_genproto//googleapis/api/annotations
to some BUILD
files but gazelle
is still adding "@go_googleapis//google/api:annotations_go_proto"
as a dep
to go_library
rules.
How do I find out why gazelle
is doing that?
As per the docs for directives: https://github.com/bazelbuild/bazel-gazelle#directives
import-lang is the language importing the library. This is usually the same as source-lang but may differ with generated code. For example, when resolving dependencies for a go_proto_library, source-lang would be "proto" and import-lang would be "go". import-lang may be omitted if it is the same as source-lang.
Since you have your import-lang set to go
, Its picking up the name of the rule defining the go_proto_library
in the repo: