From 28e227c3aa4e909799889a40a37dfc39812e1e44 Mon Sep 17 00:00:00 2001 From: martijneken Date: Fri, 25 Oct 2024 22:33:04 -0400 Subject: [PATCH] chore: Bump Bazel protobuf to match Make, bump Bazel version (#176) Bump Bazel protobuf to match Make, bump Bazel version Signed-off-by: Martijn Stevenson --- .bazelversion | 2 +- bazel/dependencies.bzl | 2 ++ bazel/repositories.bzl | 15 ++++++++++++--- example/Makefile | 6 ++++++ 4 files changed, 21 insertions(+), 4 deletions(-) create mode 100644 example/Makefile diff --git a/.bazelversion b/.bazelversion index ee74734..f22d756 100644 --- a/.bazelversion +++ b/.bazelversion @@ -1 +1 @@ -4.1.0 +6.5.0 diff --git a/bazel/dependencies.bzl b/bazel/dependencies.bzl index 6d76591..dfba4e4 100644 --- a/bazel/dependencies.bzl +++ b/bazel/dependencies.bzl @@ -14,8 +14,10 @@ load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps") load("@emsdk//:deps.bzl", emsdk_deps = "deps") +load("@rules_python//python:repositories.bzl", "py_repositories") # Requires proxy_wasm_cpp_sdk_repositories() to be loaded first. def proxy_wasm_cpp_sdk_dependencies(): + py_repositories() protobuf_deps() emsdk_deps() diff --git a/bazel/repositories.bzl b/bazel/repositories.bzl index d28daf5..8442da5 100644 --- a/bazel/repositories.bzl +++ b/bazel/repositories.bzl @@ -24,12 +24,21 @@ def proxy_wasm_cpp_sdk_repositories(): url = "https://github.com/emscripten-core/emsdk/archive/refs/tags/3.1.67.tar.gz", ) + # protobuf depends on rules_python py_repositories + maybe( + http_archive, + name = "rules_python", + sha256 = "778aaeab3e6cfd56d681c89f5c10d7ad6bf8d2f1a72de9de55b23081b2d31618", + strip_prefix = "rules_python-0.34.0", + url = "https://github.com/bazelbuild/rules_python/releases/download/0.34.0/rules_python-0.34.0.tar.gz", + ) + maybe( http_archive, name = "com_google_protobuf", - sha256 = "77ad26d3f65222fd96ccc18b055632b0bfedf295cb748b712a98ba1ac0b704b2", - strip_prefix = "protobuf-3.17.3", - url = "https://github.com/protocolbuffers/protobuf/releases/download/v3.17.3/protobuf-all-3.17.3.tar.gz", + sha256 = "4fc5ff1b2c339fb86cd3a25f0b5311478ab081e65ad258c6789359cd84d421f8", + strip_prefix = "protobuf-26.1", + url = "https://github.com/protocolbuffers/protobuf/releases/download/v26.1/protobuf-26.1.tar.gz", ) maybe( diff --git a/example/Makefile b/example/Makefile new file mode 100644 index 0000000..04ab3d6 --- /dev/null +++ b/example/Makefile @@ -0,0 +1,6 @@ +PROXY_WASM_CPP_SDK=/sdk + +PROTOBUF= # full / lite / none +WASM_DEPS= # absl_base re2 ... + +include ${PROXY_WASM_CPP_SDK}/Makefile