From 537cdbcfada4be782b183ca9fc59917ef7a1ca7d Mon Sep 17 00:00:00 2001 From: Malte Poll Date: Thu, 8 Jun 2023 20:09:46 +0200 Subject: [PATCH] bazel: trim path to *.pb.go files embedded in go libraries See https://github.com/bazelbuild/rules_go/issues/3581 for context. --- bootstrapper/initproto/BUILD.bazel | 1 + debugd/service/BUILD.bazel | 1 + disk-mapper/recoverproto/BUILD.bazel | 1 + joinservice/joinproto/BUILD.bazel | 1 + keyservice/keyserviceproto/BUILD.bazel | 1 + upgrade-agent/upgradeproto/BUILD.bazel | 1 + verify/verifyproto/BUILD.bazel | 1 + 7 files changed, 7 insertions(+) diff --git a/bootstrapper/initproto/BUILD.bazel b/bootstrapper/initproto/BUILD.bazel index dcf0c80e2..5a93f21a3 100644 --- a/bootstrapper/initproto/BUILD.bazel +++ b/bootstrapper/initproto/BUILD.bazel @@ -12,6 +12,7 @@ proto_library( go_proto_library( name = "initproto_go_proto", compilers = ["@io_bazel_rules_go//proto:go_grpc"], + gc_goopts = ["-trimpath=$(BINDIR)=>."], importpath = "github.com/edgelesssys/constellation/v2/bootstrapper/initproto", proto = ":initproto_proto", visibility = ["//visibility:public"], diff --git a/debugd/service/BUILD.bazel b/debugd/service/BUILD.bazel index d199f8880..3d7f80459 100644 --- a/debugd/service/BUILD.bazel +++ b/debugd/service/BUILD.bazel @@ -12,6 +12,7 @@ proto_library( go_proto_library( name = "service_go_proto", compilers = ["@io_bazel_rules_go//proto:go_grpc"], + gc_goopts = ["-trimpath=$(BINDIR)=>."], importpath = "github.com/edgelesssys/constellation/v2/debugd/service", proto = ":service_proto", visibility = ["//visibility:public"], diff --git a/disk-mapper/recoverproto/BUILD.bazel b/disk-mapper/recoverproto/BUILD.bazel index f0b082986..565bffff6 100644 --- a/disk-mapper/recoverproto/BUILD.bazel +++ b/disk-mapper/recoverproto/BUILD.bazel @@ -12,6 +12,7 @@ proto_library( go_proto_library( name = "recoverproto_go_proto", compilers = ["@io_bazel_rules_go//proto:go_grpc"], + gc_goopts = ["-trimpath=$(BINDIR)=>."], importpath = "github.com/edgelesssys/constellation/v2/disk-mapper/recoverproto", proto = ":recoverproto_proto", visibility = ["//visibility:public"], diff --git a/joinservice/joinproto/BUILD.bazel b/joinservice/joinproto/BUILD.bazel index af6e014e3..23fd6d605 100644 --- a/joinservice/joinproto/BUILD.bazel +++ b/joinservice/joinproto/BUILD.bazel @@ -12,6 +12,7 @@ proto_library( go_proto_library( name = "joinproto_go_proto", compilers = ["@io_bazel_rules_go//proto:go_grpc"], + gc_goopts = ["-trimpath=$(BINDIR)=>."], importpath = "github.com/edgelesssys/constellation/v2/joinservice/joinproto", proto = ":joinproto_proto", visibility = ["//visibility:public"], diff --git a/keyservice/keyserviceproto/BUILD.bazel b/keyservice/keyserviceproto/BUILD.bazel index 75a30eaf5..161d1b3a3 100644 --- a/keyservice/keyserviceproto/BUILD.bazel +++ b/keyservice/keyserviceproto/BUILD.bazel @@ -12,6 +12,7 @@ proto_library( go_proto_library( name = "keyserviceproto_go_proto", compilers = ["@io_bazel_rules_go//proto:go_grpc"], + gc_goopts = ["-trimpath=$(BINDIR)=>."], importpath = "github.com/edgelesssys/constellation/v2/keyservice/keyserviceproto", proto = ":keyserviceproto_proto", visibility = ["//visibility:public"], diff --git a/upgrade-agent/upgradeproto/BUILD.bazel b/upgrade-agent/upgradeproto/BUILD.bazel index 5c41d9514..2a7ee6b4e 100644 --- a/upgrade-agent/upgradeproto/BUILD.bazel +++ b/upgrade-agent/upgradeproto/BUILD.bazel @@ -12,6 +12,7 @@ proto_library( go_proto_library( name = "upgradeproto_go_proto", compilers = ["@io_bazel_rules_go//proto:go_grpc"], + gc_goopts = ["-trimpath=$(BINDIR)=>."], importpath = "github.com/edgelesssys/constellation/v2/upgrade-agent/upgradeproto", proto = ":upgradeproto_proto", visibility = ["//visibility:public"], diff --git a/verify/verifyproto/BUILD.bazel b/verify/verifyproto/BUILD.bazel index f29743315..d0c9258a7 100644 --- a/verify/verifyproto/BUILD.bazel +++ b/verify/verifyproto/BUILD.bazel @@ -12,6 +12,7 @@ proto_library( go_proto_library( name = "verifyproto_go_proto", compilers = ["@io_bazel_rules_go//proto:go_grpc"], + gc_goopts = ["-trimpath=$(BINDIR)=>."], importpath = "github.com/edgelesssys/constellation/v2/verify/verifyproto", proto = ":verifyproto_proto", visibility = ["//visibility:public"],