Skip to content

Commit

Permalink
Switch to the Go Protobuf compiler v2
Browse files Browse the repository at this point in the history
This allows us to get rid of the local ServiceRegistrar patch we had to
apply on top of the compiler.
  • Loading branch information
EdSchouten committed Mar 31, 2024
1 parent 00c3eda commit ccf336d
Show file tree
Hide file tree
Showing 16 changed files with 617 additions and 551 deletions.
2 changes: 1 addition & 1 deletion BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ load("@com_github_bazelbuild_buildtools//buildifier:def.bzl", "buildifier")
load("@com_github_buildbarn_bb_storage_npm//:defs.bzl", "npm_link_all_packages")
load("@gazelle//:def.bzl", "gazelle")

# gazelle:go_grpc_compilers @rules_go//proto:go_grpc
# gazelle:go_grpc_compilers @rules_go//proto:go_proto,@rules_go//proto:go_grpc_v2
# gazelle:prefix github.com/buildbarn/bb-storage
# gazelle:resolve go github.com/google/go-jsonnet @google_jsonnet_go//:go_default_library
# gazelle:resolve proto build/bazel/remote/execution/v2/remote_execution.proto @com_github_bazelbuild_remote_apis//build/bazel/remote/execution/v2:remote_execution_proto
Expand Down
5 changes: 1 addition & 4 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ go_deps_dev = use_extension("@gazelle//:extensions.bzl", "go_deps", dev_dependen
go_deps_dev.gazelle_override(
build_file_generation = "on",
directives = [
"gazelle:go_grpc_compilers @io_bazel_rules_go//proto:go_proto,@io_bazel_rules_go//proto:go_grpc_v2",
"gazelle:resolve proto go build/bazel/semver/semver.proto //build/bazel/semver",
"gazelle:resolve proto go google/api/annotations.proto @org_golang_google_genproto_googleapis_api//annotations",
"gazelle:resolve proto go google/longrunning/operations.proto @com_google_cloud_go_longrunning//autogen/longrunningpb",
Expand All @@ -93,10 +94,6 @@ go_deps_dev.module_override(
patches = ["//:patches/com_github_golang_mock/mocks-for-funcs.diff"],
path = "github.com/golang/mock",
)
go_deps_dev.module_override(
patches = ["//:patches/com_github_golang_protobuf/service-registrar.diff"],
path = "github.com/golang/protobuf",
)
go_deps_dev.module_override(
patches = ["//:patches/com_github_grpc_ecosystem_go_grpc_prometheus/client-metrics-prevent-handled-twice.diff"],
path = "github.com/grpc-ecosystem/go-grpc-prometheus",
Expand Down
55 changes: 19 additions & 36 deletions MODULE.bazel.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 0 additions & 26 deletions patches/com_github_golang_protobuf/service-registrar.diff

This file was deleted.

5 changes: 4 additions & 1 deletion pkg/proto/fsac/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ proto_library(

go_proto_library(
name = "fsac_go_proto",
compilers = ["@rules_go//proto:go_grpc"],
compilers = [
"@rules_go//proto:go_proto",
"@rules_go//proto:go_grpc_v2",
],
importpath = "github.com/buildbarn/bb-storage/pkg/proto/fsac",
proto = ":fsac_proto",
visibility = ["//visibility:public"],
Expand Down
120 changes: 0 additions & 120 deletions pkg/proto/fsac/fsac.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit ccf336d

Please sign in to comment.