diff --git a/api/bazel/BUILD b/api/bazel/BUILD index 3fa1544c1ae6..f68f07c91146 100644 --- a/api/bazel/BUILD +++ b/api/bazel/BUILD @@ -19,7 +19,10 @@ exports_files([ go_proto_compiler( name = "vtprotobuf_plugin_go", - options = ["features=marshal_strict+size"], + options = [ + "features=marshal_strict+size", + "buildTag=vtprotobuf", + ], plugin = "@com_github_planetscale_vtprotobuf//cmd/protoc-gen-go-vtproto", suffix = "_vtproto.pb.go", valid_archive = False, diff --git a/bazel/dependency_imports.bzl b/bazel/dependency_imports.bzl index 9e228961a686..fc9929247b57 100644 --- a/bazel/dependency_imports.bzl +++ b/bazel/dependency_imports.bzl @@ -151,8 +151,8 @@ def envoy_dependency_imports(go_version = GO_VERSION, jq_version = JQ_VERSION, y go_repository( name = "com_github_planetscale_vtprotobuf", importpath = "github.com/planetscale/vtprotobuf", - sum = "h1:nve54OLsoKDQhb8ZnnHHUyvAK3vjBiwTEJeC3UsqzJ8=", - version = "v0.5.1-0.20231205081218-d930d8ac92f8", + sum = "h1:GFCKgmp0tecUJ0sJuv4pzYCqS9+RGSn52M3FUwPs+uo=", + version = "v0.6.1-0.20240319094008-0393e58bdf10", build_external = "external", ) diff --git a/ci/do_ci.sh b/ci/do_ci.sh index 2cecbff3f793..9f0208fa49fd 100755 --- a/ci/do_ci.sh +++ b/ci/do_ci.sh @@ -308,13 +308,6 @@ case $CI_TARGET in if [[ "$GO_FILE" = *.validate.go ]]; then sed -i '1s;^;//go:build !disable_pgv\n;' "$OUTPUT_DIR/$(basename "$GO_FILE")" fi - # TODO(https://github.com/planetscale/vtprotobuf/pull/122) do this directly in the generator. - # Make vtprotobuf opt-in as it has some impact on binary sizes - if [[ "$GO_FILE" = *_vtproto.pb.go ]]; then - if ! grep -q 'package ignore' "$GO_FILE"; then - sed -i '1s;^;//go:build vtprotobuf\n// +build vtprotobuf\n;' "$OUTPUT_DIR/$(basename "$GO_FILE")" - fi - fi done <<< "$(find "$INPUT_DIR" -name "*.go")" done ;;