From 6ad997d68e803bb46539d37e0d066081117adebf Mon Sep 17 00:00:00 2001 From: Hubert Slojewski Date: Mon, 25 Oct 2021 14:09:59 +0200 Subject: [PATCH] Update gRPC to the latest (1.41.0) and Protobuf CHANGELOG_BEGIN CHANGELOG_END --- bazel-java-deps.bzl | 6 +++--- bazel_tools/protobuf-win32.patch | 18 ------------------ deps.bzl | 9 +++------ .../com/daml/ledger/api/v1/completion.proto | 1 - 4 files changed, 6 insertions(+), 28 deletions(-) delete mode 100644 bazel_tools/protobuf-win32.patch diff --git a/bazel-java-deps.bzl b/bazel-java-deps.bzl index 6ecc9ad97929..165ebd3efda3 100644 --- a/bazel-java-deps.bzl +++ b/bazel-java-deps.bzl @@ -44,7 +44,7 @@ netty_version = "4.1.67.Final" # 2.0.42.Final # ``` netty_tcnative_version = "2.0.40.Final" -grpc_version = "1.35.0" +grpc_version = "1.41.0" akka_version = "2.6.13" def install_java_deps(): @@ -139,8 +139,8 @@ def install_java_deps(): "io.netty:netty-resolver:{}".format(netty_version), "io.netty:netty-tcnative-boringssl-static:{}".format(netty_tcnative_version), # protobuf - "com.google.protobuf:protobuf-java:3.17.1", - #scalapb + "com.google.protobuf:protobuf-java:3.17.3", + # scalapb "com.thesamet.scalapb:compilerplugin_{}:{}".format(scala_major_version, scalapb_version), "com.thesamet.scalapb:lenses_{}:{}".format(scala_major_version, scalapb_version), "com.thesamet.scalapb:protoc-bridge_{}:{}".format(scala_major_version, scalapb_protoc_version), diff --git a/bazel_tools/protobuf-win32.patch b/bazel_tools/protobuf-win32.patch deleted file mode 100644 index c61f4e18ac06..000000000000 --- a/bazel_tools/protobuf-win32.patch +++ /dev/null @@ -1,18 +0,0 @@ -# See https://github.com/protocolbuffers/protobuf/issues/8049 -diff --git a/src/google/protobuf/port_def.inc b/src/google/protobuf/port_def.inc -index 320e888ec..e24b8808c 100644 ---- a/src/google/protobuf/port_def.inc -+++ b/src/google/protobuf/port_def.inc -@@ -560,10 +560,10 @@ - #define PROTOBUF_CONSTINIT - #endif - --// Some constructors can't be constexpr under MSVC, but given that MSVC will not -+// Some constructors can't be constexpr under Windows, but given that Windows will not - // do constant initialization of globals anyway we can omit `constexpr` from - // them. These constructors are marked with PROTOBUF_MAYBE_CONSTEXPR --#if defined(_MSC_VER) -+#if defined(_WIN32) - #define PROTOBUF_MAYBE_CONSTEXPR - #else - #define PROTOBUF_MAYBE_CONSTEXPR constexpr diff --git a/deps.bzl b/deps.bzl index d7defdbd12bf..f0577f63d5a0 100644 --- a/deps.bzl +++ b/deps.bzl @@ -156,13 +156,10 @@ def daml_deps(): if "com_google_protobuf" not in native.existing_rules(): http_archive( name = "com_google_protobuf", - sha256 = "bf0e5070b4b99240183b29df78155eee335885e53a8af8683964579c214ad301", + sha256 = "528927e398f4e290001886894dac17c5c6a2e5548f3fb68004cfb01af901b53a", # changing this version needs to be in sync with protobuf-java and grpc dependencies in bazel-java-bdeps.bzl - strip_prefix = "protobuf-3.14.0", - urls = ["https://github.com/protocolbuffers/protobuf/archive/v3.14.0.zip"], - patches = [ - "@com_github_digital_asset_daml//bazel_tools:protobuf-win32.patch", - ], + strip_prefix = "protobuf-3.17.3", + urls = ["https://github.com/protocolbuffers/protobuf/archive/v3.17.3.zip"], patch_args = ["-p1"], ) diff --git a/ledger-api/grpc-definitions/com/daml/ledger/api/v1/completion.proto b/ledger-api/grpc-definitions/com/daml/ledger/api/v1/completion.proto index 1cd01d7ee55a..9ad162e293dd 100644 --- a/ledger-api/grpc-definitions/com/daml/ledger/api/v1/completion.proto +++ b/ledger-api/grpc-definitions/com/daml/ledger/api/v1/completion.proto @@ -6,7 +6,6 @@ syntax = "proto3"; package com.daml.ledger.api.v1; import "google/protobuf/duration.proto"; -import "google/protobuf/timestamp.proto"; import "google/rpc/status.proto"; option java_outer_classname = "CompletionOuterClass";