-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathBUILD.bazel
More file actions
38 lines (32 loc) · 1.59 KB
/
Copy pathBUILD.bazel
File metadata and controls
38 lines (32 loc) · 1.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
load("@gazelle//:def.bzl", "gazelle")
# gazelle:prefix github.com/uber/submitqueue
# Name every Go Bazel target go_default_library / go_default_test so labels
# match go-code's (and other Bazel consumers') expected naming convention
# without per-import fixups.
# gazelle:go_naming_convention go_default_library
# Exclude nested worktrees (created under .claude/worktrees) so gazelle does not
# index them as duplicate rule definitions and corrupt the canonical BUILD files.
# gazelle:exclude .claude
# Disable Gazelle proto rule generation globally. We rely on the checked-in
# .pb.go files in protopb/ dirs (plain go_library) rather than Bazel proto
# compilation. Rationale:
# - The checked-in .pb.go is the single source of truth. Generating proto
# via Bazel duplicates the same types under the same importpath, causing
# duplicate-importpath ambiguity that required gazelle:resolve workarounds.
# - Non-Bazel consumers (plain go build/go get, including OSS users) can only
# use the checked-in .pb.go, so that path must work regardless. The Bazel
# proto rules are a redundant second path that serves no one the checked-in
# files don't already serve.
# - proto_library forces a transitive load of @protobuf//, which breaks in
# consumers on newer Bazel versions (e.g. go-code's Bazel 8.5.1 removed
# native.java_proto_library).
# gazelle:proto disable_global
# Export marker files for test data dependencies (used by FindRepoRoot in tests)
exports_files(
[
"MODULE.bazel",
"go.mod",
],
visibility = ["//visibility:public"],
)
gazelle(name = "gazelle")