Closed nikunjy closed 4 years ago
Could you try adding this directive to the root build file in your repository? It should do what you want:
# gazelle:resolve proto protobuf_elixir/brex_elixirpb.proto @protobuf_elixir//:brex_elixirpb_proto
Directives is the reference on this and all other directives.
Thank you so much @jayconrod that works like a charm. I should have looked there.
What version of gazelle are you using?
What version of rules_go are you using?
What version of Bazel are you using?
Build label: 3.1.0-homebrew
Does this issue reproduce with the latest releases of all the above?
Yes
What operating system and processor architecture are you using?
MacOS
What did you do?
I want to import this file https://github.com/brexhq/protobuf-elixir/blob/brex-head/src/brex_elixirpb.proto
This repo is not using bazel but I want to import the proto in a DIFFERENT repository which is using Bazel.
I imported it using
new_git_repository
with a build_file that looks like thiscontents of
proto.BUILD
Now I can import that file in my other repository using
import protobuf_elixir/brex_elixirpb.proto
I can manually write the
BUILD.bazel
to depend on thatproto_target
and it works.What did you expect to see?
I want to inform
gazelle
to understand thatimport protobuf_elixir/brex_elixirpb.proto
means add a dep of"@protobuf_elixir//:brex_elixirpb_proto"
I have looked at the
knownImports
and I don't know if that is the thing that I should extend using a flag or something elseWhat did you see instead?
Gazelle added a dep of
"//protobuf_elixir:protobuf_elixir_proto"
instead