Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 14 additions & 8 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,20 @@ load("@gazelle//:def.bzl", "gazelle")
# index them as duplicate rule definitions and corrupt the canonical BUILD files.
# gazelle:exclude .claude

# Resolve protobuf import ambiguities - use the actual protopb packages, not the proto aliases
# gazelle:resolve go github.com/uber/submitqueue/api/base/change/protopb //api/base/change/protopb
# gazelle:resolve go github.com/uber/submitqueue/api/base/mergestrategy/protopb //api/base/mergestrategy/protopb
# gazelle:resolve go github.com/uber/submitqueue/api/runway/messagequeue/protopb //api/runway/messagequeue/protopb
# gazelle:resolve go github.com/uber/submitqueue/api/runway/protopb //api/runway/protopb
# gazelle:resolve go github.com/uber/submitqueue/api/submitqueue/gateway/protopb //api/submitqueue/gateway/protopb
# gazelle:resolve go github.com/uber/submitqueue/api/submitqueue/orchestrator/protopb //api/submitqueue/orchestrator/protopb
# gazelle:resolve go github.com/uber/submitqueue/api/stovepipe/protopb //api/stovepipe/protopb
# 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(
Expand Down
36 changes: 0 additions & 36 deletions api/base/change/proto/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,40 +1,4 @@
load("@rules_go//go:def.bzl", "go_library")
load("@rules_go//proto:def.bzl", "go_proto_library")
load("@rules_proto//proto:defs.bzl", "proto_library")

exports_files(
["change.proto"],
visibility = ["//tool/proto:__pkg__"],
)

proto_library(
name = "changepb_proto",
srcs = ["change.proto"],
visibility = ["//visibility:public"],
)

# keep
go_proto_library(
name = "changepb_go_proto",
compilers = [
"@rules_go//proto:go_proto",
"@rules_go//proto:go_grpc_v2",
],
importpath = "github.com/uber/submitqueue/api/base/change/proto",
proto = ":changepb_proto",
visibility = ["//visibility:public"],
)

go_library(
name = "proto",
embed = [":changepb_go_proto"],
importpath = "github.com/uber/submitqueue/api/base/change/proto",
visibility = ["//visibility:public"],
)

go_library(
name = "protopb",
embed = [":changepb_go_proto"],
importpath = "github.com/uber/submitqueue/api/base/change/protopb",
visibility = ["//visibility:public"],
)
36 changes: 0 additions & 36 deletions api/base/mergestrategy/proto/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,40 +1,4 @@
load("@rules_go//go:def.bzl", "go_library")
load("@rules_go//proto:def.bzl", "go_proto_library")
load("@rules_proto//proto:defs.bzl", "proto_library")

exports_files(
["mergestrategy.proto"],
visibility = ["//tool/proto:__pkg__"],
)

proto_library(
name = "mergestrategypb_proto",
srcs = ["mergestrategy.proto"],
visibility = ["//visibility:public"],
)

# keep
go_proto_library(
name = "mergestrategypb_go_proto",
compilers = [
"@rules_go//proto:go_proto",
"@rules_go//proto:go_grpc_v2",
],
importpath = "github.com/uber/submitqueue/api/base/mergestrategy/proto",
proto = ":mergestrategypb_proto",
visibility = ["//visibility:public"],
)

go_library(
name = "proto",
embed = [":mergestrategypb_go_proto"],
importpath = "github.com/uber/submitqueue/api/base/mergestrategy/proto",
visibility = ["//visibility:public"],
)

go_library(
name = "protopb",
embed = [":mergestrategypb_go_proto"],
importpath = "github.com/uber/submitqueue/api/base/mergestrategy/protopb",
visibility = ["//visibility:public"],
)
37 changes: 0 additions & 37 deletions api/base/messagequeue/proto/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,41 +1,4 @@
load("@rules_go//go:def.bzl", "go_library")
load("@rules_go//proto:def.bzl", "go_proto_library")
load("@rules_proto//proto:defs.bzl", "proto_library")

exports_files(
["messagequeue.proto"],
visibility = ["//tool/proto:__pkg__"],
)

proto_library(
name = "messagequeuepb_proto",
srcs = ["messagequeue.proto"],
visibility = ["//visibility:public"],
deps = ["@protobuf//:descriptor_proto"],
)

# keep
go_proto_library(
name = "messagequeuepb_go_proto",
compilers = [
"@rules_go//proto:go_proto",
"@rules_go//proto:go_grpc_v2",
],
importpath = "github.com/uber/submitqueue/api/base/messagequeue/proto",
proto = ":messagequeuepb_proto",
visibility = ["//visibility:public"],
)

go_library(
name = "proto",
embed = [":messagequeuepb_go_proto"],
importpath = "github.com/uber/submitqueue/api/base/messagequeue/proto",
visibility = ["//visibility:public"],
)

go_library(
name = "protopb",
embed = [":messagequeuepb_go_proto"],
importpath = "github.com/uber/submitqueue/api/base/messagequeue/protopb",
visibility = ["//visibility:public"],
)
47 changes: 0 additions & 47 deletions api/runway/messagequeue/proto/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,51 +1,4 @@
load("@rules_go//go:def.bzl", "go_library")
load("@rules_go//proto:def.bzl", "go_proto_library")
load("@rules_proto//proto:defs.bzl", "proto_library")

exports_files(
["merge.proto"],
visibility = ["//tool/proto:__pkg__"],
)

proto_library(
name = "mergepb_proto",
srcs = ["merge.proto"],
visibility = ["//visibility:public"],
deps = [
"//api/base/change/proto:changepb_proto",
"//api/base/mergestrategy/proto:mergestrategypb_proto",
"//api/base/messagequeue/proto:messagequeuepb_proto",
],
)

# keep
go_proto_library(
name = "mergepb_go_proto",
compilers = [
"@rules_go//proto:go_proto",
"@rules_go//proto:go_grpc_v2",
],
importpath = "github.com/uber/submitqueue/api/runway/messagequeue/proto",
proto = ":mergepb_proto",
visibility = ["//visibility:public"],
# keep
deps = [
"//api/base/change/proto:changepb_go_proto",
"//api/base/mergestrategy/proto:mergestrategypb_go_proto",
"//api/base/messagequeue/proto:messagequeuepb_go_proto",
],
)

go_library(
name = "proto",
embed = [":mergepb_go_proto"],
importpath = "github.com/uber/submitqueue/api/runway/messagequeue/proto",
visibility = ["//visibility:public"],
)

go_library(
name = "protopb",
embed = [":mergepb_go_proto"],
importpath = "github.com/uber/submitqueue/api/runway/messagequeue/protopb",
visibility = ["//visibility:public"],
)
36 changes: 0 additions & 36 deletions api/runway/proto/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,40 +1,4 @@
load("@rules_go//go:def.bzl", "go_library")
load("@rules_go//proto:def.bzl", "go_proto_library")
load("@rules_proto//proto:defs.bzl", "proto_library")

exports_files(
["runway.proto"],
visibility = ["//tool/proto:__pkg__"],
)

proto_library(
name = "runwaypb_proto",
srcs = ["runway.proto"],
visibility = ["//visibility:public"],
)

# keep
go_proto_library(
name = "runwaypb_go_proto",
compilers = [
"@rules_go//proto:go_proto",
"@rules_go//proto:go_grpc_v2",
],
importpath = "github.com/uber/submitqueue/api/runway/proto",
proto = ":runwaypb_proto",
visibility = ["//visibility:public"],
)

go_library(
name = "proto",
embed = [":runwaypb_go_proto"],
importpath = "github.com/uber/submitqueue/api/runway/proto",
visibility = ["//visibility:public"],
)

go_library(
name = "protopb",
embed = [":runwaypb_go_proto"],
importpath = "github.com/uber/submitqueue/api/runway/protopb",
visibility = ["//visibility:public"],
)
36 changes: 0 additions & 36 deletions api/stovepipe/proto/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,40 +1,4 @@
load("@rules_go//go:def.bzl", "go_library")
load("@rules_go//proto:def.bzl", "go_proto_library")
load("@rules_proto//proto:defs.bzl", "proto_library")

exports_files(
["stovepipe.proto"],
visibility = ["//tool/proto:__pkg__"],
)

proto_library(
name = "stovepipepb_proto",
srcs = ["stovepipe.proto"],
visibility = ["//visibility:public"],
)

# keep
go_proto_library(
name = "stovepipepb_go_proto",
compilers = [
"@rules_go//proto:go_proto",
"@rules_go//proto:go_grpc_v2",
],
importpath = "github.com/uber/submitqueue/api/stovepipe/proto",
proto = ":stovepipepb_proto",
visibility = ["//visibility:public"],
)

go_library(
name = "proto",
embed = [":stovepipepb_go_proto"],
importpath = "github.com/uber/submitqueue/api/stovepipe/proto",
visibility = ["//visibility:public"],
)

go_library(
name = "protopb",
embed = [":stovepipepb_go_proto"],
importpath = "github.com/uber/submitqueue/api/stovepipe/protopb",
visibility = ["//visibility:public"],
)
45 changes: 0 additions & 45 deletions api/submitqueue/gateway/proto/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,49 +1,4 @@
load("@rules_go//go:def.bzl", "go_library")
load("@rules_go//proto:def.bzl", "go_proto_library")
load("@rules_proto//proto:defs.bzl", "proto_library")

exports_files(
["gateway.proto"],
visibility = ["//tool/proto:__pkg__"],
)

proto_library(
name = "gatewaypb_proto",
srcs = ["gateway.proto"],
visibility = ["//visibility:public"],
deps = [
"//api/base/change/proto:changepb_proto",
"//api/base/mergestrategy/proto:mergestrategypb_proto",
],
)

# keep
go_proto_library(
name = "gatewaypb_go_proto",
compilers = [
"@rules_go//proto:go_proto",
"@rules_go//proto:go_grpc_v2",
],
importpath = "github.com/uber/submitqueue/api/submitqueue/gateway/proto",
proto = ":gatewaypb_proto",
visibility = ["//visibility:public"],
# keep
deps = [
"//api/base/change/proto:changepb_go_proto",
"//api/base/mergestrategy/proto:mergestrategypb_go_proto",
],
)

go_library(
name = "proto",
embed = [":gatewaypb_go_proto"],
importpath = "github.com/uber/submitqueue/api/submitqueue/gateway/proto",
visibility = ["//visibility:public"],
)

go_library(
name = "protopb",
embed = [":gatewaypb_go_proto"],
importpath = "github.com/uber/submitqueue/api/submitqueue/gateway/protopb",
visibility = ["//visibility:public"],
)
36 changes: 0 additions & 36 deletions api/submitqueue/orchestrator/proto/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,40 +1,4 @@
load("@rules_go//go:def.bzl", "go_library")
load("@rules_go//proto:def.bzl", "go_proto_library")
load("@rules_proto//proto:defs.bzl", "proto_library")

exports_files(
["orchestrator.proto"],
visibility = ["//tool/proto:__pkg__"],
)

proto_library(
name = "orchestratorpb_proto",
srcs = ["orchestrator.proto"],
visibility = ["//visibility:public"],
)

# keep
go_proto_library(
name = "orchestratorpb_go_proto",
compilers = [
"@rules_go//proto:go_proto",
"@rules_go//proto:go_grpc_v2",
],
importpath = "github.com/uber/submitqueue/api/submitqueue/orchestrator/proto",
proto = ":orchestratorpb_proto",
visibility = ["//visibility:public"],
)

go_library(
name = "proto",
embed = [":orchestratorpb_go_proto"],
importpath = "github.com/uber/submitqueue/api/submitqueue/orchestrator/proto",
visibility = ["//visibility:public"],
)

go_library(
name = "protopb",
embed = [":orchestratorpb_go_proto"],
importpath = "github.com/uber/submitqueue/api/submitqueue/orchestrator/protopb",
visibility = ["//visibility:public"],
)
Loading
Loading