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/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
15 changes: 11 additions & 4 deletions bazel/gogo.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ def _gogo_grpc_proto_impl(ctx):
ctx.file("WORKSPACE", 'workspace(name = "{}")'.format(ctx.name))
ctx.file("BUILD.bazel", "")
ctx.symlink(
ctx.path(Label("@com_github_gogo_protobuf//gogoproto:gogo.proto")),
"github.com/gogo/protobuf/gogoproto/gogo.proto",
ctx.path(Label("//third_party/gogoproto:gogo.proto")),
"gogoproto/gogo.proto",
)
ctx.file("github.com/gogo/protobuf/gogoproto/BUILD.bazel", """
ctx.file("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 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//gogoproto:gogo_pl_proto",
],
)

Expand Down
712 changes: 356 additions & 356 deletions src/api/proto/cloudpb/cloudapi.pb.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/api/proto/cloudpb/cloudapi.proto
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ option go_package = "cloudpb";
// * Please do not include dependencies that are outside of src/api
// * and only include protobufs that are useful to external-facing users.
//
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
import "gogoproto/gogo.proto";
import "google/protobuf/empty.proto";
import "google/protobuf/timestamp.proto";
import "google/protobuf/wrappers.proto";
Expand Down
2 changes: 1 addition & 1 deletion src/api/proto/vispb/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ pl_proto_library(
srcs = ["vis.proto"],
visibility = ["//src:__subpackages__"],
deps = [
"@gogo_special_proto//github.com/gogo/protobuf/gogoproto",
"@gogo_grpc_proto//gogoproto:gogo_pl_proto",
],
)

Expand Down
Loading
Loading