Skip to content
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
2 changes: 1 addition & 1 deletion .arclint
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"(^src/ui/src/types/generated/)",
"(^src/ui/src/types/schema\\.ts$)",
"(^third_party/cpplint/cpplint.py$)",
"(^third_party/github.com/gogo/protobuf/gogoproto/gogo.proto$)",
"(^third_party/github/gogo/protobuf/gogoproto/gogo.proto$)",
"(c_cpp_properties.json$)",
"(go\\.mod$)",
"(go\\.sum$)"
Expand Down
17 changes: 0 additions & 17 deletions bazel/external/protobuf_gogo_hack.patch

This file was deleted.

2 changes: 1 addition & 1 deletion bazel/external/protobuf_javascript.patch
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ index 97b5844..1351a54 100644

for (int i = 0; i < file->dependency_count(); i++) {
const std::string& name = file->dependency(i)->name();
+ if (ModuleAlias(name) == "github_com_gogo_protobuf_gogoproto_gogo_pb") {
+ if (ModuleAlias(name) == "github_gogo_protobuf_gogoproto_gogo_pb") {
+ continue;
+ }
printer->Print(
Expand Down
17 changes: 17 additions & 0 deletions bazel/external/rules_go.patch
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,20 @@ index abacbc80..09b2c9bf 100644
]
env.update({
"CGO_ENABLED": "1",
diff --git a/proto/gogo.bzl b/proto/gogo.bzl
index 05a8f044..374e7295 100644
--- a/proto/gogo.bzl
+++ b/proto/gogo.bzl
@@ -17,9 +17,9 @@ def _gogo_special_proto_impl(ctx):
ctx.file("BUILD.bazel", "")
ctx.symlink(
ctx.path(Label("@com_github_gogo_protobuf//gogoproto:gogo.proto")),
- "github.com/gogo/protobuf/gogoproto/gogo.proto",
+ "github/gogo/protobuf/gogoproto/gogo.proto",
)
- ctx.file("github.com/gogo/protobuf/gogoproto/BUILD.bazel", """
+ ctx.file("github/gogo/protobuf/gogoproto/BUILD.bazel", """
load("@rules_proto//proto:defs.bzl", "proto_library")

proto_library(

13 changes: 10 additions & 3 deletions bazel/gogo.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ def _gogo_grpc_proto_impl(ctx):
ctx.file("BUILD.bazel", "")
ctx.symlink(
ctx.path(Label("@com_github_gogo_protobuf//gogoproto:gogo.proto")),
"github.com/gogo/protobuf/gogoproto/gogo.proto",
"github/gogo/protobuf/gogoproto/gogo.proto",
)
ctx.file("github.com/gogo/protobuf/gogoproto/BUILD.bazel", """
ctx.file("github/gogo/protobuf/gogoproto/BUILD.bazel", """

load("@px//bazel:proto_compile.bzl", "pl_proto_library", "pl_cc_proto_library")
load("@px//bazel:proto_compile.bzl", "pl_proto_library", "pl_cc_proto_library", "pl_py_proto_library")

pl_proto_library(
name = "gogo_pl_proto",
Expand All @@ -44,6 +44,13 @@ pl_cc_proto_library(
deps = [],
)

pl_py_proto_library(
name = "gogo_pl_py_proto",
proto = ":gogo_pl_proto",
visibility = ["//visibility:public"],
deps = [],
)

""")

gogo_grpc_proto = repository_rule(
Expand Down
2 changes: 1 addition & 1 deletion bazel/repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def _cc_deps():
# Dependencies with native bazel build files.

_bazel_repo("upb")
_bazel_repo("com_google_protobuf", patches = ["//bazel/external:protobuf_gogo_hack.patch", "//bazel/external:protobuf_text_format.patch", "//bazel/external:protobuf_warning.patch"], patch_args = ["-p1"])
_bazel_repo("com_google_protobuf", patches = ["//bazel/external:protobuf_text_format.patch", "//bazel/external:protobuf_warning.patch"], patch_args = ["-p1"])
_bazel_repo("com_github_grpc_grpc", patches = ["//bazel/external:grpc.patch", "//bazel/external:grpc_go_toolchain.patch", "//bazel/external:grpc_test_visibility.patch"], patch_args = ["-p1"])

_bazel_repo("boringssl", patches = ["//bazel/external:boringssl.patch"], patch_args = ["-p0"])
Expand Down
2 changes: 1 addition & 1 deletion scripts/update_ts_protos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ function copy() {
# VizierapiServiceClient.ts has a relative import; we're copying elsewhere. We fix this with perl string substitution.
regexRelativeImport="s|import \* as ([^ ]+) from '([^ /]+/)+vizierapi_pb'\;|import * as \1 from './vizierapi_pb';|m"
# vizierapi_pb.d.ts incorrectly includes an unused (and non-existent) relative import related to Go protos. Remove it.
regexExtraneousImport="s|^import \* as github_com_gogo_protobuf_gogoproto_gogo_pb.*$||m"
regexExtraneousImport="s|^import \* as github_gogo_protobuf_gogoproto_gogo_pb.*$||m"

for abs_path in $abs_paths; do
echo "Propagating ${abs_path} ..."
Expand Down
2 changes: 1 addition & 1 deletion src/api/proto/cloudpb/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ pl_proto_library(
"//src/api/proto/uuidpb:uuid_pl_proto",
"//src/api/proto/vispb:vis_pl_proto",
"//src/api/proto/vizierconfigpb:vizier_pl_proto",
"@gogo_special_proto//github.com/gogo/protobuf/gogoproto",
"@gogo_grpc_proto//github/gogo/protobuf/gogoproto:gogo_pl_proto",
],
)

Expand Down
Loading
Loading