From bc4ad6b4e3c3531be7ea614160b0a5b93e83f4d2 Mon Sep 17 00:00:00 2001 From: Udaya Prakash Date: Wed, 14 Aug 2024 20:17:54 +0200 Subject: [PATCH] Add gazelle-overrides for argo, grpcgateway (#1867) **What type of PR is this?** Other **What package or component does this PR mostly affect?** bzlmod **What does this PR do? Why is it needed?** Adds default directives needed for some go libraries **Other notes for review** I realized we have some gazelle directives we use to make the listed libs build. Adding it to the default overrides so I don't need it in our libs. --- internal/bzlmod/default_gazelle_overrides.bzl | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/internal/bzlmod/default_gazelle_overrides.bzl b/internal/bzlmod/default_gazelle_overrides.bzl index 1c8cdd3ef..b6cc0d70e 100644 --- a/internal/bzlmod/default_gazelle_overrides.bzl +++ b/internal/bzlmod/default_gazelle_overrides.bzl @@ -22,6 +22,13 @@ DEFAULT_BUILD_FILE_GENERATION_BY_PATH = { } DEFAULT_DIRECTIVES_BY_PATH = { + "github.com/argoproj/argo-workflows/v3": [ + "gazelle:proto disable", + ], + "github.com/argoproj/argo-events": [ + "gazelle:proto disable", + "gazelle:go_naming_convention import_alias", + ], "github.com/census-instrumentation/opencensus-proto": [ "gazelle:proto disable", ], @@ -31,6 +38,10 @@ DEFAULT_DIRECTIVES_BY_PATH = { "github.com/cockroachdb/errors": [ "gazelle:proto disable", ], + "github.com/colinmarc/hdfs/v2": [ + "gazelle:go_naming_convention import_alias", + "gazelle:proto disable", + ], "github.com/containerd/containerd": [ "gazelle:proto disable", ], @@ -65,6 +76,11 @@ DEFAULT_DIRECTIVES_BY_PATH = { "github.com/googleapis/gnostic": [ "gazelle:proto disable", ], + "github.com/grpc-ecosystem/grpc-gateway": [ + "gazelle:resolve go github.com/grpc-ecosystem/grpc-gateway/internal //internal:go_default_library", + "gazelle:go_naming_convention import_alias", + "gazelle:proto disable", + ], "github.com/pseudomuto/protoc-gen-doc": [ # The build file in github.com/mwitkow/go-proto-validators has both go_proto and gogo_proto targets, but the checked # in go files are generated by gogo proto. Resolving to the gogo proto target preserves the behavior of Go modules.