Questions tagged [gazelle]
6 questions
2
votes
1 answer
`go mod tidy` complains that the bazel-generated protobuf package is missing
I have a .proto protobuf definition file in a dir and I'm building a go library from it with Bazel like so (BUILD.bazel file below generated using gazelle):
load("@rules_proto//proto:defs.bzl", "proto_library")
load("@io_bazel_rules_go//go:def.bzl",…

Paul Milovanov
- 706
- 4
- 18
1
vote
1 answer
How to find out why gazelle is adding a specific dependency?
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…

Noel Yap
- 18,822
- 21
- 92
- 144
1
vote
1 answer
Bazel - BUILD not referencing external dependency
I'm trying to run some grpc tests with bazel.
I'm using "google.golang.org/grpc/credentials/insecure" to dial insecurely.
When running bazel test ..., I get the following error:
no such package '@org_golang_google_grpc//credentials/insecure': BUILD…

Jyan
- 43
- 1
- 1
- 8
1
vote
1 answer
How to get bazel/gazelle go_repository imports past go vet
I'm using bazel/gazelle to pull in some external git repositories.
For example:
go_repository(
name = "com_github_pkg_errors",
importpath = "github.com/pkg/errors",
sum = "h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=",
version =…

Daiwei Fan
- 11
- 1
0
votes
1 answer
How to tell gazelle that a go file is meant for go_default_test and not go_default_library?
I have a file, embed_testdata.go, meant to be used in tests but does not itself have tests (so I don't want to suffix it with _test.go). How do I tell gazelle that it's really test source and not prod source?
FYI, simply adding it to go_default_test…

Noel Yap
- 18,822
- 21
- 92
- 144
0
votes
0 answers
Bazel build error with third party library - no such package
I'm using bazel 4.1.0 to build to project.
Current set up:
go.mod file
...
github.com/mwitkow/go-proto-validators v0.3.2 // indirect
...
WORKSPACE file
load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies",…

ittus
- 21,730
- 5
- 57
- 57