Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sluongng/upgrade googleapis #3462

Closed
wants to merge 2 commits into from
Closed
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
5 changes: 5 additions & 0 deletions BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ nogo(
# gazelle:exclude **/node_modules/**
# TODO(siggisim): remove once we support .css imports properly
# gazelle:exclude website/**
#
# gazelle:resolve go google.golang.org/genproto/googleapis/iam/v1 @org_golang_google_genproto//googleapis/iam/v1:iam
# gazelle:resolve go google.golang.org/genproto/googleapis/longrunning @org_golang_google_genproto//googleapis/longrunning
# gazelle:resolve go google.golang.org/genproto/googleapis/logging/v2 @org_golang_google_genproto//googleapis/logging/v2:logging
# gazelle:resolve proto go google/longrunning/operations.proto @org_golang_google_genproto//googleapis/longrunning
gazelle(name = "gazelle")

# Example usage: "bazel run //:gofmt -- -w ."
Expand Down
21 changes: 21 additions & 0 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,27 @@ http_archive(
],
)

http_archive(
name = "go_googleapis",
generator_function = "go_rules_dependencies",
generator_name = "go_googleapis",
patch_args = [
"-E",
"-p1",
],
patches = [
"//buildpatches:0001-delete-BUILD.bazel.patch",
"//buildpatches:0002-directives.patch",
"//buildpatches:0003-gazelle.patch",
],
sha256 = "1c3d5340dcec5154af6bda6b0e5d551f30a2e4699ddb9a575c5dcc0ff1b38540",
strip_prefix = "googleapis-7b0b2a5253990f181a68491236776613b266f966",
urls = [
"https://mirror.bazel.build/github.com/googleapis/googleapis/archive/7b0b2a5253990f181a68491236776613b266f966.zip",
"https://github.com/googleapis/googleapis/archive/7b0b2a5253990f181a68491236776613b266f966.zip",
],
)

load(":deps.bzl", "install_buildbuddy_dependencies")

# Install gazelle and go_rules dependencies after ours so that our go module versions take precedence.
Expand Down
144,906 changes: 144,906 additions & 0 deletions buildpatches/0001-delete-BUILD.bazel.patch

Large diffs are not rendered by default.

34 changes: 34 additions & 0 deletions buildpatches/0002-directives.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
From 449797e5f9ab5198e8e2f0d0813d54966f389cc1 Mon Sep 17 00:00:00 2001
From: Son Luong Ngoc <sluongng@gmail.com>
Date: Wed, 22 Feb 2023 14:55:27 +0100
Subject: [PATCH 2/3] directives

---
BUILD.bazel | 6 ++++++
google/BUILD.bazel | 1 +
2 files changed, 7 insertions(+)
create mode 100644 BUILD.bazel
create mode 100644 google/BUILD.bazel

diff --git a/BUILD.bazel b/BUILD.bazel
new file mode 100644
index 000000000..a820b310c
--- /dev/null
+++ b/BUILD.bazel
@@ -0,0 +1,6 @@
+# gazelle:go_naming_convention import_alias
+# gazelle:proto package
+# gazelle:proto_group go_package
+# gazelle:exclude gapic
+# gazelle:exclude third_party
+# gazelle:exclude google/example/endpointsapis/goapp
diff --git a/google/BUILD.bazel b/google/BUILD.bazel
new file mode 100644
index 000000000..cc47d14ce
--- /dev/null
+++ b/google/BUILD.bazel
@@ -0,0 +1 @@
+# gazelle:prefix google.golang.org/genproto/googleapis
--
2.39.2.722.g9855ee24e9

19,548 changes: 19,548 additions & 0 deletions buildpatches/0003-gazelle.patch

Large diffs are not rendered by default.

Loading