Skip to content

Commit

Permalink
DEPS: add resolve hints and update packages
Browse files Browse the repository at this point in the history
A few former subpackages are now proper modules, which
requires some gazelle/bzl wrangling.

This caused a few spurious diffs where unrelated lines
got reordered. I didn't do this manually.
  • Loading branch information
tbg committed Jan 10, 2025
1 parent 4e3b377 commit 3708ee5
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 13 deletions.
4 changes: 3 additions & 1 deletion BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ exports_files([
# gazelle:resolve proto proto gogoproto/gogo.proto @com_github_gogo_protobuf//gogoproto:gogo_proto
# gazelle:resolve proto go gogoproto/gogo.proto @com_github_gogo_protobuf//gogoproto
# gazelle:resolve proto proto google/api/annotations.proto @go_googleapis//google/api:annotations_proto
# gazelle:resolve proto go google/api/annotations.proto @org_golang_google_genproto//googleapis/api/annotations:go_default_library
# gazelle:resolve proto go google/api/annotations.proto @org_golang_google_genproto_googleapis_api//annotations:go_default_library
# gazelle:resolve proto io/prometheus/client/metrics.proto @com_github_prometheus_client_model//io/prometheus/client:io_prometheus_client_proto
# gazelle:resolve proto go io/prometheus/client/metrics.proto @com_github_prometheus_client_model//go
# gazelle:resolve go github.com/prometheus/client_model/go @com_github_prometheus_client_model//go
Expand All @@ -57,6 +57,8 @@ exports_files([
# gazelle:resolve go google.golang.org/genproto/googleapis/pubsub/v1 @org_golang_google_genproto//googleapis/pubsub/v1:pubsub
# gazelle:resolve go google.golang.org/genproto/googleapis/cloud/kms/v1 @org_golang_google_genproto//googleapis/cloud/kms/v1:kms
# gazelle:resolve go google.golang.org/genproto/googleapis/devtools/build/v1 @org_golang_google_genproto//googleapis/devtools/build/v1:build
# gazelle:resolve go google.golang.org/genproto/googleapis/api/httpbody @org_golang_google_genproto_googleapis_api//httpbody:go_default_library
# gazelle:resolve go google.golang.org/genproto/googleapis/api/annotations @org_golang_google_genproto_googleapis_api//annotations:go_default_library

# See pkg/kv/kvpb/gen/BUILD.bazel for more details.
#
Expand Down
8 changes: 4 additions & 4 deletions build/patches/com_github_buchgr_bazel_remote.patch
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ diff -urN a/genproto/build/bazel/remote/asset/v1/BUILD.bazel b/genproto/build/ba
- "@go_googleapis//google/rpc:status_go_proto",
- "@io_bazel_rules_go//proto/wkt:duration_go_proto",
- "@io_bazel_rules_go//proto/wkt:timestamp_go_proto",
+ "@org_golang_google_genproto//googleapis/api/annotations:go_default_library",
+ "@org_golang_google_genproto//googleapis/rpc/status:go_default_library",
+ "@org_golang_google_genproto_googleapis_api//annotations:go_default_library",
+ "@org_golang_google_genproto_googleapis_rpc//status:go_default_library",
+ "@com_github_golang_protobuf//ptypes/duration:go_default_library",
+ "@com_github_golang_protobuf//ptypes/timestamp:go_default_library",
"@org_golang_google_grpc//:go_default_library",
Expand All @@ -133,9 +133,9 @@ diff -urN a/genproto/build/bazel/remote/execution/v2/BUILD.bazel b/genproto/buil
- "@io_bazel_rules_go//proto/wkt:duration_go_proto",
- "@io_bazel_rules_go//proto/wkt:timestamp_go_proto",
- "@io_bazel_rules_go//proto/wkt:wrappers_go_proto",
+ "@org_golang_google_genproto//googleapis/api/annotations:go_default_library",
+ "@org_golang_google_genproto_googleapis_api//annotations:go_default_library",
+ "@org_golang_google_genproto//googleapis/longrunning:go_default_library",
+ "@org_golang_google_genproto//googleapis/rpc/status:go_default_library",
+ "@org_golang_google_genproto_googleapis_rpc//status:go_default_library",
+ "@com_github_golang_protobuf//ptypes/duration:go_default_library",
+ "@com_github_golang_protobuf//ptypes/timestamp:go_default_library",
+ "@com_github_golang_protobuf//ptypes/wrappers:go_default_library",
Expand Down
4 changes: 2 additions & 2 deletions build/patches/com_github_grpc_ecosystem_grpc_gateway.patch
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ index 02aa7d2a8..fd922a156 100644
+ "@com_github_golang_protobuf//protoc-gen-go/descriptor:go_default_library",
"@io_bazel_rules_go//proto/wkt:compiler_plugin_go_proto",
- "@io_bazel_rules_go//proto/wkt:descriptor_go_proto",
+ "@org_golang_google_genproto//googleapis/api/annotations:go_default_library",
+ "@org_golang_google_genproto_googleapis_api//annotations:go_default_library",
],
)

Expand All @@ -65,7 +65,7 @@ index c4d18f624..41d5319fb 100644
+ "@com_github_golang_protobuf//ptypes/duration:go_default_library",
+ "@com_github_golang_protobuf//ptypes/timestamp:go_default_library",
+ "@com_github_golang_protobuf//ptypes/wrappers:go_default_library",
+ "@org_golang_google_genproto//googleapis/api/httpbody:go_default_library",
+ "@org_golang_google_genproto_googleapis_api//httpbody:go_default_library",
+ "@org_golang_google_genproto//protobuf/field_mask:go_default_library",
"@org_golang_google_grpc//codes:go_default_library",
"@org_golang_google_grpc//grpclog:go_default_library",
Expand Down
2 changes: 1 addition & 1 deletion build/patches/go_googleapis.patch
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ diff -urN a/google/cloud/kms/v1/BUILD.bazel b/google/cloud/kms/v1/BUILD.bazel
+ "@com_github_golang_protobuf//ptypes/duration:go_default_library",
+ "@com_github_golang_protobuf//ptypes/timestamp:go_default_library",
+ "@com_github_golang_protobuf//ptypes/wrappers:go_default_library",
+ "@org_golang_google_genproto//googleapis/api/annotations:go_default_library",
+ "@org_golang_google_genproto_googleapis_api//annotations:go_default_library",
+ "@org_golang_google_genproto//protobuf/field_mask:go_default_library",
],
)
Expand Down
4 changes: 2 additions & 2 deletions pkg/server/serverpb/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# gazelle:go_grpc_compilers //pkg/cmd/protoc-gen-gogoroach:protoc-gen-gogoroach_grpc_compiler, @com_github_grpc_ecosystem_grpc_gateway//protoc-gen-grpc-gateway:go_gen_grpc_gateway

load("@rules_proto//proto:defs.bzl", "proto_library")
load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
load("@rules_proto//proto:defs.bzl", "proto_library")

proto_library(
name = "serverpb_proto",
Expand Down Expand Up @@ -72,7 +72,6 @@ go_proto_library(
# NB: The grpc-gateway compiler injects a dependency on the descriptor
# package that Gazelle isn't prepared to deal with.
"@com_github_golang_protobuf//descriptor:go_default_library_gen", # keep
"@org_golang_google_genproto//googleapis/api/annotations:go_default_library",
"//pkg/build",
"//pkg/clusterversion",
"//pkg/config/zonepb",
Expand All @@ -95,6 +94,7 @@ go_proto_library(
"//pkg/util/log/logpb",
"//pkg/util/metric",
"//pkg/util/tracing/tracingpb",
"@org_golang_google_genproto_googleapis_api//annotations:go_default_library",
],
)

Expand Down
6 changes: 3 additions & 3 deletions pkg/ts/tspb/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# gazelle:go_grpc_compilers //pkg/cmd/protoc-gen-gogoroach:protoc-gen-gogoroach_grpc_compiler, @com_github_grpc_ecosystem_grpc_gateway//protoc-gen-grpc-gateway:go_gen_grpc_gateway

load("@rules_proto//proto:defs.bzl", "proto_library")
load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
load("@io_bazel_rules_go//go:def.bzl", "go_library")
load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
load("@rules_proto//proto:defs.bzl", "proto_library")

go_library(
name = "tspb",
Expand Down Expand Up @@ -38,6 +38,6 @@ go_proto_library(
"//pkg/roachpb",
"@com_github_gogo_protobuf//gogoproto",
"@com_github_golang_protobuf//descriptor:go_default_library_gen", # keep
"@org_golang_google_genproto//googleapis/api/annotations:go_default_library",
"@org_golang_google_genproto_googleapis_api//annotations:go_default_library",
],
)

0 comments on commit 3708ee5

Please sign in to comment.