From eccbac34438390948138160d3b9a08205d7d638a Mon Sep 17 00:00:00 2001 From: Stanley Cheung Date: Thu, 21 May 2020 14:25:52 -0700 Subject: [PATCH] Update grpc protoc plugins to support proto3 optional --- .gitmodules | 1 - bazel/grpc_deps.bzl | 8 +-- grpc.gemspec | 2 +- src/compiler/cpp_plugin.h | 6 ++- src/compiler/csharp_plugin.cc | 6 ++- src/compiler/node_plugin.cc | 6 ++- src/compiler/objective_c_plugin.cc | 6 ++- src/compiler/php_plugin.cc | 6 ++- src/compiler/python_generator.cc | 4 ++ src/compiler/python_generator.h | 4 +- src/compiler/ruby_plugin.cc | 6 ++- .../google/protobuf/descriptor.upb.c | 17 +++--- .../google/protobuf/descriptor.upb.h | 54 ++++++++++--------- src/cpp/Protobuf-C++.podspec | 2 +- src/csharp/build/dependencies.props | 2 +- .../!ProtoCompiler-gRPCCppPlugin.podspec | 2 +- .../!ProtoCompiler-gRPCPlugin.podspec | 2 +- src/objective-c/!ProtoCompiler.podspec | 2 +- templates/grpc.gemspec.template | 2 +- .../csharp/build/dependencies.props.template | 2 +- ...otoCompiler-gRPCCppPlugin.podspec.template | 2 +- ...!ProtoCompiler-gRPCPlugin.podspec.template | 2 +- .../test/cxx_alpine_x64/Dockerfile.template | 2 +- .../csharp/DistribTest/DistribTest.csproj | 4 +- .../DistribTest/DistribTestDotNet.csproj | 4 +- .../csharp/DistribTest/packages.config | 4 +- third_party/protobuf | 2 +- .../python/grpcio_tools/protoc_lib_deps.py | 2 +- .../python_dev_alpine3.7_x64/Dockerfile | 2 +- .../dockerfile/test/cxx_alpine_x64/Dockerfile | 2 +- .../test/python_alpine_x64/Dockerfile | 2 +- tools/run_tests/sanity/check_submodules.sh | 2 +- 32 files changed, 103 insertions(+), 67 deletions(-) diff --git a/.gitmodules b/.gitmodules index 90973196741..aefc8f9442f 100644 --- a/.gitmodules +++ b/.gitmodules @@ -8,7 +8,6 @@ [submodule "third_party/protobuf"] path = third_party/protobuf url = https://github.com/google/protobuf.git - branch = 3.0.x [submodule "third_party/gflags"] path = third_party/gflags url = https://github.com/gflags/gflags.git diff --git a/bazel/grpc_deps.bzl b/bazel/grpc_deps.bzl index 4d2b3244de9..3628d952121 100644 --- a/bazel/grpc_deps.bzl +++ b/bazel/grpc_deps.bzl @@ -154,11 +154,11 @@ def grpc_deps(): if "com_google_protobuf" not in native.existing_rules(): http_archive( name = "com_google_protobuf", - sha256 = "2435b7fb83b8a608c24ca677907aa9a35e482a7f018e65ca69481b3c8c9f7caf", - strip_prefix = "protobuf-d0bfd5221182da1a7cc280f3337b5e41a89539cf", + sha256 = "e887570666e71e7941b68cb9330dba5234551ef7a30fca4ee1f7de70238c30f3", + strip_prefix = "protobuf-ef22086980e148da5e8264647b96ccf1f7d1feaf", urls = [ - "https://storage.googleapis.com/grpc-bazel-mirror/github.com/google/protobuf/archive/d0bfd5221182da1a7cc280f3337b5e41a89539cf.tar.gz", - "https://github.com/google/protobuf/archive/d0bfd5221182da1a7cc280f3337b5e41a89539cf.tar.gz", + "https://storage.googleapis.com/grpc-bazel-mirror/github.com/google/protobuf/archive/ef22086980e148da5e8264647b96ccf1f7d1feaf.tar.gz", + "https://github.com/google/protobuf/archive/ef22086980e148da5e8264647b96ccf1f7d1feaf.tar.gz", ], ) diff --git a/grpc.gemspec b/grpc.gemspec index 195e27c5db1..af04b9d9de4 100644 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -32,7 +32,7 @@ Gem::Specification.new do |s| s.require_paths = %w( src/ruby/lib src/ruby/bin src/ruby/pb ) s.platform = Gem::Platform::RUBY - s.add_dependency 'google-protobuf', '~> 3.11' + s.add_dependency 'google-protobuf', '~> 3.12' s.add_dependency 'googleapis-common-protos-types', '~> 1.0' s.add_development_dependency 'bundler', '>= 1.9' diff --git a/src/compiler/cpp_plugin.h b/src/compiler/cpp_plugin.h index 1cdf0b3c196..bd8d056701b 100644 --- a/src/compiler/cpp_plugin.h +++ b/src/compiler/cpp_plugin.h @@ -34,10 +34,14 @@ class CppGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator { CppGrpcGenerator() {} virtual ~CppGrpcGenerator() {} + uint64_t GetSupportedFeatures() const override { + return FEATURE_PROTO3_OPTIONAL; + } + virtual bool Generate(const grpc::protobuf::FileDescriptor* file, const grpc::string& parameter, grpc::protobuf::compiler::GeneratorContext* context, - grpc::string* error) const { + grpc::string* error) const override { if (file->options().cc_generic_services()) { *error = "cpp grpc proto compiler plugin does not work with generic " diff --git a/src/compiler/csharp_plugin.cc b/src/compiler/csharp_plugin.cc index 5f13aa6749e..d4648b45757 100644 --- a/src/compiler/csharp_plugin.cc +++ b/src/compiler/csharp_plugin.cc @@ -29,10 +29,14 @@ class CSharpGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator { CSharpGrpcGenerator() {} ~CSharpGrpcGenerator() {} + uint64_t GetSupportedFeatures() const override { + return FEATURE_PROTO3_OPTIONAL; + } + bool Generate(const grpc::protobuf::FileDescriptor* file, const grpc::string& parameter, grpc::protobuf::compiler::GeneratorContext* context, - grpc::string* error) const { + grpc::string* error) const override { std::vector > options; grpc::protobuf::compiler::ParseGeneratorParameter(parameter, &options); diff --git a/src/compiler/node_plugin.cc b/src/compiler/node_plugin.cc index 0d19d8e9820..7b89a715535 100644 --- a/src/compiler/node_plugin.cc +++ b/src/compiler/node_plugin.cc @@ -32,10 +32,14 @@ class NodeGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator { NodeGrpcGenerator() {} ~NodeGrpcGenerator() {} + uint64_t GetSupportedFeatures() const override { + return FEATURE_PROTO3_OPTIONAL; + } + bool Generate(const grpc::protobuf::FileDescriptor* file, const grpc::string& parameter, grpc::protobuf::compiler::GeneratorContext* context, - grpc::string* error) const { + grpc::string* error) const override { grpc_node_generator::Parameters generator_parameters; generator_parameters.minimum_node_version = 4; diff --git a/src/compiler/objective_c_plugin.cc b/src/compiler/objective_c_plugin.cc index d5174bc9386..2738a733d1f 100644 --- a/src/compiler/objective_c_plugin.cc +++ b/src/compiler/objective_c_plugin.cc @@ -71,10 +71,14 @@ class ObjectiveCGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator { virtual ~ObjectiveCGrpcGenerator() {} public: + uint64_t GetSupportedFeatures() const override { + return FEATURE_PROTO3_OPTIONAL; + } + virtual bool Generate(const grpc::protobuf::FileDescriptor* file, const ::grpc::string& parameter, grpc::protobuf::compiler::GeneratorContext* context, - ::grpc::string* error) const { + ::grpc::string* error) const override { if (file->service_count() == 0) { // No services. Do nothing. return true; diff --git a/src/compiler/php_plugin.cc b/src/compiler/php_plugin.cc index d01cbf87a0f..d16cd08c849 100644 --- a/src/compiler/php_plugin.cc +++ b/src/compiler/php_plugin.cc @@ -33,10 +33,14 @@ class PHPGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator { PHPGrpcGenerator() {} ~PHPGrpcGenerator() {} + uint64_t GetSupportedFeatures() const override { + return FEATURE_PROTO3_OPTIONAL; + } + bool Generate(const grpc::protobuf::FileDescriptor* file, const grpc::string& parameter, grpc::protobuf::compiler::GeneratorContext* context, - grpc::string* error) const { + grpc::string* error) const override { if (file->service_count() == 0) { return true; } diff --git a/src/compiler/python_generator.cc b/src/compiler/python_generator.cc index 36318a3c031..0199bc53244 100644 --- a/src/compiler/python_generator.cc +++ b/src/compiler/python_generator.cc @@ -875,6 +875,10 @@ static bool ParseParameters(const grpc::string& parameter, return true; } +uint64_t PythonGrpcGenerator::GetSupportedFeatures() const { + return FEATURE_PROTO3_OPTIONAL; +} + bool PythonGrpcGenerator::Generate(const FileDescriptor* file, const grpc::string& parameter, GeneratorContext* context, diff --git a/src/compiler/python_generator.h b/src/compiler/python_generator.h index 6077ac4ec68..c816e3f2b84 100644 --- a/src/compiler/python_generator.h +++ b/src/compiler/python_generator.h @@ -44,10 +44,12 @@ class PythonGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator { PythonGrpcGenerator(const GeneratorConfiguration& config); ~PythonGrpcGenerator(); + uint64_t GetSupportedFeatures() const override; + bool Generate(const grpc::protobuf::FileDescriptor* file, const grpc::string& parameter, grpc::protobuf::compiler::GeneratorContext* context, - grpc::string* error) const; + grpc::string* error) const override; private: GeneratorConfiguration config_; diff --git a/src/compiler/ruby_plugin.cc b/src/compiler/ruby_plugin.cc index a1d2e818567..1b5f7aec50d 100644 --- a/src/compiler/ruby_plugin.cc +++ b/src/compiler/ruby_plugin.cc @@ -29,10 +29,14 @@ class RubyGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator { RubyGrpcGenerator() {} ~RubyGrpcGenerator() {} + uint64_t GetSupportedFeatures() const override { + return FEATURE_PROTO3_OPTIONAL; + } + bool Generate(const grpc::protobuf::FileDescriptor* file, const grpc::string& /*parameter*/, grpc::protobuf::compiler::GeneratorContext* context, - grpc::string* /*error*/) const { + grpc::string* /*error*/) const override { grpc::string code = grpc_ruby_generator::GetServices(file); if (code.size() == 0) { return true; // don't generate a file if there are no services diff --git a/src/core/ext/upb-generated/google/protobuf/descriptor.upb.c b/src/core/ext/upb-generated/google/protobuf/descriptor.upb.c index 61b9299bb43..64fa929b51e 100644 --- a/src/core/ext/upb-generated/google/protobuf/descriptor.upb.c +++ b/src/core/ext/upb-generated/google/protobuf/descriptor.upb.c @@ -130,23 +130,24 @@ static const upb_msglayout *const google_protobuf_FieldDescriptorProto_submsgs[1 &google_protobuf_FieldOptions_msginit, }; -static const upb_msglayout_field google_protobuf_FieldDescriptorProto__fields[10] = { - {1, UPB_SIZE(32, 32), 5, 0, 9, 1}, - {2, UPB_SIZE(40, 48), 6, 0, 9, 1}, +static const upb_msglayout_field google_protobuf_FieldDescriptorProto__fields[11] = { + {1, UPB_SIZE(36, 40), 6, 0, 9, 1}, + {2, UPB_SIZE(44, 56), 7, 0, 9, 1}, {3, UPB_SIZE(24, 24), 3, 0, 5, 1}, {4, UPB_SIZE(8, 8), 1, 0, 14, 1}, {5, UPB_SIZE(16, 16), 2, 0, 14, 1}, - {6, UPB_SIZE(48, 64), 7, 0, 9, 1}, - {7, UPB_SIZE(56, 80), 8, 0, 9, 1}, - {8, UPB_SIZE(72, 112), 10, 0, 11, 1}, + {6, UPB_SIZE(52, 72), 8, 0, 9, 1}, + {7, UPB_SIZE(60, 88), 9, 0, 9, 1}, + {8, UPB_SIZE(76, 120), 11, 0, 11, 1}, {9, UPB_SIZE(28, 28), 4, 0, 5, 1}, - {10, UPB_SIZE(64, 96), 9, 0, 9, 1}, + {10, UPB_SIZE(68, 104), 10, 0, 9, 1}, + {17, UPB_SIZE(32, 32), 5, 0, 8, 1}, }; const upb_msglayout google_protobuf_FieldDescriptorProto_msginit = { &google_protobuf_FieldDescriptorProto_submsgs[0], &google_protobuf_FieldDescriptorProto__fields[0], - UPB_SIZE(80, 128), 10, false, + UPB_SIZE(80, 128), 11, false, }; static const upb_msglayout *const google_protobuf_OneofDescriptorProto_submsgs[1] = { diff --git a/src/core/ext/upb-generated/google/protobuf/descriptor.upb.h b/src/core/ext/upb-generated/google/protobuf/descriptor.upb.h index 681614910e0..062dd1c7954 100644 --- a/src/core/ext/upb-generated/google/protobuf/descriptor.upb.h +++ b/src/core/ext/upb-generated/google/protobuf/descriptor.upb.h @@ -598,34 +598,36 @@ UPB_INLINE char *google_protobuf_FieldDescriptorProto_serialize(const google_pro return upb_encode(msg, &google_protobuf_FieldDescriptorProto_msginit, arena, len); } -UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_name(const google_protobuf_FieldDescriptorProto *msg) { return _upb_has_field(msg, 5); } -UPB_INLINE upb_strview google_protobuf_FieldDescriptorProto_name(const google_protobuf_FieldDescriptorProto *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(32, 32)); } -UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_extendee(const google_protobuf_FieldDescriptorProto *msg) { return _upb_has_field(msg, 6); } -UPB_INLINE upb_strview google_protobuf_FieldDescriptorProto_extendee(const google_protobuf_FieldDescriptorProto *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(40, 48)); } +UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_name(const google_protobuf_FieldDescriptorProto *msg) { return _upb_has_field(msg, 6); } +UPB_INLINE upb_strview google_protobuf_FieldDescriptorProto_name(const google_protobuf_FieldDescriptorProto *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(36, 40)); } +UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_extendee(const google_protobuf_FieldDescriptorProto *msg) { return _upb_has_field(msg, 7); } +UPB_INLINE upb_strview google_protobuf_FieldDescriptorProto_extendee(const google_protobuf_FieldDescriptorProto *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(44, 56)); } UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_number(const google_protobuf_FieldDescriptorProto *msg) { return _upb_has_field(msg, 3); } UPB_INLINE int32_t google_protobuf_FieldDescriptorProto_number(const google_protobuf_FieldDescriptorProto *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(24, 24)); } UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_label(const google_protobuf_FieldDescriptorProto *msg) { return _upb_has_field(msg, 1); } UPB_INLINE int32_t google_protobuf_FieldDescriptorProto_label(const google_protobuf_FieldDescriptorProto *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)); } UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_type(const google_protobuf_FieldDescriptorProto *msg) { return _upb_has_field(msg, 2); } UPB_INLINE int32_t google_protobuf_FieldDescriptorProto_type(const google_protobuf_FieldDescriptorProto *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(16, 16)); } -UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_type_name(const google_protobuf_FieldDescriptorProto *msg) { return _upb_has_field(msg, 7); } -UPB_INLINE upb_strview google_protobuf_FieldDescriptorProto_type_name(const google_protobuf_FieldDescriptorProto *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(48, 64)); } -UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_default_value(const google_protobuf_FieldDescriptorProto *msg) { return _upb_has_field(msg, 8); } -UPB_INLINE upb_strview google_protobuf_FieldDescriptorProto_default_value(const google_protobuf_FieldDescriptorProto *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(56, 80)); } -UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_options(const google_protobuf_FieldDescriptorProto *msg) { return _upb_has_field(msg, 10); } -UPB_INLINE const google_protobuf_FieldOptions* google_protobuf_FieldDescriptorProto_options(const google_protobuf_FieldDescriptorProto *msg) { return UPB_FIELD_AT(msg, const google_protobuf_FieldOptions*, UPB_SIZE(72, 112)); } +UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_type_name(const google_protobuf_FieldDescriptorProto *msg) { return _upb_has_field(msg, 8); } +UPB_INLINE upb_strview google_protobuf_FieldDescriptorProto_type_name(const google_protobuf_FieldDescriptorProto *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(52, 72)); } +UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_default_value(const google_protobuf_FieldDescriptorProto *msg) { return _upb_has_field(msg, 9); } +UPB_INLINE upb_strview google_protobuf_FieldDescriptorProto_default_value(const google_protobuf_FieldDescriptorProto *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(60, 88)); } +UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_options(const google_protobuf_FieldDescriptorProto *msg) { return _upb_has_field(msg, 11); } +UPB_INLINE const google_protobuf_FieldOptions* google_protobuf_FieldDescriptorProto_options(const google_protobuf_FieldDescriptorProto *msg) { return UPB_FIELD_AT(msg, const google_protobuf_FieldOptions*, UPB_SIZE(76, 120)); } UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_oneof_index(const google_protobuf_FieldDescriptorProto *msg) { return _upb_has_field(msg, 4); } UPB_INLINE int32_t google_protobuf_FieldDescriptorProto_oneof_index(const google_protobuf_FieldDescriptorProto *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(28, 28)); } -UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_json_name(const google_protobuf_FieldDescriptorProto *msg) { return _upb_has_field(msg, 9); } -UPB_INLINE upb_strview google_protobuf_FieldDescriptorProto_json_name(const google_protobuf_FieldDescriptorProto *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(64, 96)); } +UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_json_name(const google_protobuf_FieldDescriptorProto *msg) { return _upb_has_field(msg, 10); } +UPB_INLINE upb_strview google_protobuf_FieldDescriptorProto_json_name(const google_protobuf_FieldDescriptorProto *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(68, 104)); } +UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_proto3_optional(const google_protobuf_FieldDescriptorProto *msg) { return _upb_has_field(msg, 5); } +UPB_INLINE bool google_protobuf_FieldDescriptorProto_proto3_optional(const google_protobuf_FieldDescriptorProto *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(32, 32)); } UPB_INLINE void google_protobuf_FieldDescriptorProto_set_name(google_protobuf_FieldDescriptorProto *msg, upb_strview value) { - _upb_sethas(msg, 5); - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(32, 32)) = value; + _upb_sethas(msg, 6); + UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(36, 40)) = value; } UPB_INLINE void google_protobuf_FieldDescriptorProto_set_extendee(google_protobuf_FieldDescriptorProto *msg, upb_strview value) { - _upb_sethas(msg, 6); - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(40, 48)) = value; + _upb_sethas(msg, 7); + UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(44, 56)) = value; } UPB_INLINE void google_protobuf_FieldDescriptorProto_set_number(google_protobuf_FieldDescriptorProto *msg, int32_t value) { _upb_sethas(msg, 3); @@ -640,16 +642,16 @@ UPB_INLINE void google_protobuf_FieldDescriptorProto_set_type(google_protobuf_Fi UPB_FIELD_AT(msg, int32_t, UPB_SIZE(16, 16)) = value; } UPB_INLINE void google_protobuf_FieldDescriptorProto_set_type_name(google_protobuf_FieldDescriptorProto *msg, upb_strview value) { - _upb_sethas(msg, 7); - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(48, 64)) = value; + _upb_sethas(msg, 8); + UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(52, 72)) = value; } UPB_INLINE void google_protobuf_FieldDescriptorProto_set_default_value(google_protobuf_FieldDescriptorProto *msg, upb_strview value) { - _upb_sethas(msg, 8); - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(56, 80)) = value; + _upb_sethas(msg, 9); + UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(60, 88)) = value; } UPB_INLINE void google_protobuf_FieldDescriptorProto_set_options(google_protobuf_FieldDescriptorProto *msg, google_protobuf_FieldOptions* value) { - _upb_sethas(msg, 10); - UPB_FIELD_AT(msg, google_protobuf_FieldOptions*, UPB_SIZE(72, 112)) = value; + _upb_sethas(msg, 11); + UPB_FIELD_AT(msg, google_protobuf_FieldOptions*, UPB_SIZE(76, 120)) = value; } UPB_INLINE struct google_protobuf_FieldOptions* google_protobuf_FieldDescriptorProto_mutable_options(google_protobuf_FieldDescriptorProto *msg, upb_arena *arena) { struct google_protobuf_FieldOptions* sub = (struct google_protobuf_FieldOptions*)google_protobuf_FieldDescriptorProto_options(msg); @@ -665,8 +667,12 @@ UPB_INLINE void google_protobuf_FieldDescriptorProto_set_oneof_index(google_prot UPB_FIELD_AT(msg, int32_t, UPB_SIZE(28, 28)) = value; } UPB_INLINE void google_protobuf_FieldDescriptorProto_set_json_name(google_protobuf_FieldDescriptorProto *msg, upb_strview value) { - _upb_sethas(msg, 9); - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(64, 96)) = value; + _upb_sethas(msg, 10); + UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(68, 104)) = value; +} +UPB_INLINE void google_protobuf_FieldDescriptorProto_set_proto3_optional(google_protobuf_FieldDescriptorProto *msg, bool value) { + _upb_sethas(msg, 5); + UPB_FIELD_AT(msg, bool, UPB_SIZE(32, 32)) = value; } /* google.protobuf.OneofDescriptorProto */ diff --git a/src/cpp/Protobuf-C++.podspec b/src/cpp/Protobuf-C++.podspec index dcb9f4d705d..c3ccbcdad35 100644 --- a/src/cpp/Protobuf-C++.podspec +++ b/src/cpp/Protobuf-C++.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'Protobuf-C++' - s.version = '3.11.4' + s.version = '3.12.1' s.summary = 'Protocol Buffers v3 runtime library for C++.' s.homepage = 'https://github.com/google/protobuf' s.license = '3-Clause BSD License' diff --git a/src/csharp/build/dependencies.props b/src/csharp/build/dependencies.props index 9e85adf72f5..fce785d33ac 100644 --- a/src/csharp/build/dependencies.props +++ b/src/csharp/build/dependencies.props @@ -2,6 +2,6 @@ 2.30.0-dev - 3.11.4 + 3.12.1 diff --git a/src/objective-c/!ProtoCompiler-gRPCCppPlugin.podspec b/src/objective-c/!ProtoCompiler-gRPCCppPlugin.podspec index ca1490bcc0a..aaf66c1b105 100644 --- a/src/objective-c/!ProtoCompiler-gRPCCppPlugin.podspec +++ b/src/objective-c/!ProtoCompiler-gRPCCppPlugin.podspec @@ -100,7 +100,7 @@ Pod::Spec.new do |s| s.preserve_paths = plugin # Restrict the protoc version to the one supported by this plugin. - s.dependency '!ProtoCompiler', '3.11.4' + s.dependency '!ProtoCompiler', '3.12.1' # For the Protobuf dependency not to complain: s.ios.deployment_target = '7.0' s.osx.deployment_target = '10.9' diff --git a/src/objective-c/!ProtoCompiler-gRPCPlugin.podspec b/src/objective-c/!ProtoCompiler-gRPCPlugin.podspec index e48d3de8828..aa249e2e8ad 100644 --- a/src/objective-c/!ProtoCompiler-gRPCPlugin.podspec +++ b/src/objective-c/!ProtoCompiler-gRPCPlugin.podspec @@ -102,7 +102,7 @@ Pod::Spec.new do |s| s.preserve_paths = plugin # Restrict the protoc version to the one supported by this plugin. - s.dependency '!ProtoCompiler', '3.11.4' + s.dependency '!ProtoCompiler', '3.12.1' # For the Protobuf dependency not to complain: s.ios.deployment_target = '7.0' s.osx.deployment_target = '10.9' diff --git a/src/objective-c/!ProtoCompiler.podspec b/src/objective-c/!ProtoCompiler.podspec index cf894bc7441..fd5e70cea42 100644 --- a/src/objective-c/!ProtoCompiler.podspec +++ b/src/objective-c/!ProtoCompiler.podspec @@ -36,7 +36,7 @@ Pod::Spec.new do |s| # exclamation mark ensures that other "regular" pods will be able to find it as it'll be installed # before them. s.name = '!ProtoCompiler' - v = '3.11.4' + v = '3.12.1' s.version = v s.summary = 'The Protobuf Compiler (protoc) generates Objective-C files from .proto files' s.description = <<-DESC diff --git a/templates/grpc.gemspec.template b/templates/grpc.gemspec.template index 6a2f812f751..43405ada243 100644 --- a/templates/grpc.gemspec.template +++ b/templates/grpc.gemspec.template @@ -34,7 +34,7 @@ s.require_paths = %w( src/ruby/lib src/ruby/bin src/ruby/pb ) s.platform = Gem::Platform::RUBY - s.add_dependency 'google-protobuf', '~> 3.11' + s.add_dependency 'google-protobuf', '~> 3.12' s.add_dependency 'googleapis-common-protos-types', '~> 1.0' s.add_development_dependency 'bundler', '>= 1.9' diff --git a/templates/src/csharp/build/dependencies.props.template b/templates/src/csharp/build/dependencies.props.template index 388a5c2b8ab..92e899fdfbe 100755 --- a/templates/src/csharp/build/dependencies.props.template +++ b/templates/src/csharp/build/dependencies.props.template @@ -4,6 +4,6 @@ ${settings.csharp_version} - 3.11.4 + 3.12.1 diff --git a/templates/src/objective-c/!ProtoCompiler-gRPCCppPlugin.podspec.template b/templates/src/objective-c/!ProtoCompiler-gRPCCppPlugin.podspec.template index b0aba409bb8..148d3ac6cfb 100644 --- a/templates/src/objective-c/!ProtoCompiler-gRPCCppPlugin.podspec.template +++ b/templates/src/objective-c/!ProtoCompiler-gRPCCppPlugin.podspec.template @@ -102,7 +102,7 @@ s.preserve_paths = plugin # Restrict the protoc version to the one supported by this plugin. - s.dependency '!ProtoCompiler', '3.11.4' + s.dependency '!ProtoCompiler', '3.12.1' # For the Protobuf dependency not to complain: s.ios.deployment_target = '7.0' s.osx.deployment_target = '10.9' diff --git a/templates/src/objective-c/!ProtoCompiler-gRPCPlugin.podspec.template b/templates/src/objective-c/!ProtoCompiler-gRPCPlugin.podspec.template index 14754fe278a..c1865f65928 100644 --- a/templates/src/objective-c/!ProtoCompiler-gRPCPlugin.podspec.template +++ b/templates/src/objective-c/!ProtoCompiler-gRPCPlugin.podspec.template @@ -104,7 +104,7 @@ s.preserve_paths = plugin # Restrict the protoc version to the one supported by this plugin. - s.dependency '!ProtoCompiler', '3.11.4' + s.dependency '!ProtoCompiler', '3.12.1' # For the Protobuf dependency not to complain: s.ios.deployment_target = '7.0' s.osx.deployment_target = '10.9' diff --git a/templates/tools/dockerfile/test/cxx_alpine_x64/Dockerfile.template b/templates/tools/dockerfile/test/cxx_alpine_x64/Dockerfile.template index c628aac94a6..e1b1d20e5a0 100644 --- a/templates/tools/dockerfile/test/cxx_alpine_x64/Dockerfile.template +++ b/templates/tools/dockerfile/test/cxx_alpine_x64/Dockerfile.template @@ -14,7 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. - FROM alpine:3.5 + FROM alpine:3.9 # Install Git and basic packages. RUN apk update && apk add ${'\\'} diff --git a/test/distrib/csharp/DistribTest/DistribTest.csproj b/test/distrib/csharp/DistribTest/DistribTest.csproj index f2f22f9cdf5..18b9c37b465 100644 --- a/test/distrib/csharp/DistribTest/DistribTest.csproj +++ b/test/distrib/csharp/DistribTest/DistribTest.csproj @@ -100,8 +100,8 @@ ..\packages\Google.Apis.Auth.1.15.0\lib\net45\Google.Apis.Auth.PlatformServices.dll - - ..\packages\Google.Protobuf.3.11.2\lib\net45\Google.Protobuf.dll + + ..\packages\Google.Protobuf.3.12.1\lib\net45\Google.Protobuf.dll diff --git a/test/distrib/csharp/DistribTest/DistribTestDotNet.csproj b/test/distrib/csharp/DistribTest/DistribTestDotNet.csproj index 014b983e6d8..4ea742f5ec7 100644 --- a/test/distrib/csharp/DistribTest/DistribTestDotNet.csproj +++ b/test/distrib/csharp/DistribTest/DistribTestDotNet.csproj @@ -16,7 +16,7 @@ - + @@ -27,4 +27,4 @@ - \ No newline at end of file + diff --git a/test/distrib/csharp/DistribTest/packages.config b/test/distrib/csharp/DistribTest/packages.config index e0ba8eea640..6970a235dac 100644 --- a/test/distrib/csharp/DistribTest/packages.config +++ b/test/distrib/csharp/DistribTest/packages.config @@ -8,9 +8,9 @@ - + - \ No newline at end of file + diff --git a/third_party/protobuf b/third_party/protobuf index d0bfd522118..ef22086980e 160000 --- a/third_party/protobuf +++ b/third_party/protobuf @@ -1 +1 @@ -Subproject commit d0bfd5221182da1a7cc280f3337b5e41a89539cf +Subproject commit ef22086980e148da5e8264647b96ccf1f7d1feaf diff --git a/tools/distrib/python/grpcio_tools/protoc_lib_deps.py b/tools/distrib/python/grpcio_tools/protoc_lib_deps.py index e1dc4fb862e..73716efc9d7 100644 --- a/tools/distrib/python/grpcio_tools/protoc_lib_deps.py +++ b/tools/distrib/python/grpcio_tools/protoc_lib_deps.py @@ -20,4 +20,4 @@ PROTO_FILES=['google/protobuf/wrappers.proto', 'google/protobuf/type.proto', 'go CC_INCLUDE='third_party/protobuf/src' PROTO_INCLUDE='third_party/protobuf/src' -PROTOBUF_SUBMODULE_VERSION="d0bfd5221182da1a7cc280f3337b5e41a89539cf" +PROTOBUF_SUBMODULE_VERSION="ef22086980e148da5e8264647b96ccf1f7d1feaf" diff --git a/tools/dockerfile/distribtest/python_dev_alpine3.7_x64/Dockerfile b/tools/dockerfile/distribtest/python_dev_alpine3.7_x64/Dockerfile index e94a9289e11..a208ae05204 100644 --- a/tools/dockerfile/distribtest/python_dev_alpine3.7_x64/Dockerfile +++ b/tools/dockerfile/distribtest/python_dev_alpine3.7_x64/Dockerfile @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM alpine:3.7 +FROM alpine:3.9 RUN apk add --update build-base linux-headers python python-dev py-pip diff --git a/tools/dockerfile/test/cxx_alpine_x64/Dockerfile b/tools/dockerfile/test/cxx_alpine_x64/Dockerfile index 08dc8729546..c75945fe8a2 100644 --- a/tools/dockerfile/test/cxx_alpine_x64/Dockerfile +++ b/tools/dockerfile/test/cxx_alpine_x64/Dockerfile @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM alpine:3.5 +FROM alpine:3.9 # Install Git and basic packages. RUN apk update && apk add \ diff --git a/tools/dockerfile/test/python_alpine_x64/Dockerfile b/tools/dockerfile/test/python_alpine_x64/Dockerfile index 23568132646..1b806ab7f4d 100644 --- a/tools/dockerfile/test/python_alpine_x64/Dockerfile +++ b/tools/dockerfile/test/python_alpine_x64/Dockerfile @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM alpine:3.3 +FROM alpine:3.9 # Install Git and basic packages. RUN apk update && apk add \ diff --git a/tools/run_tests/sanity/check_submodules.sh b/tools/run_tests/sanity/check_submodules.sh index 6b64842aa49..0494a2cb52e 100755 --- a/tools/run_tests/sanity/check_submodules.sh +++ b/tools/run_tests/sanity/check_submodules.sh @@ -36,7 +36,7 @@ cat << EOF | awk '{ print $1 }' | sort > "$want_submodules" 80ed4d0bbf65d57cc267dfc63bd2584557f11f9b third_party/googleapis (common-protos-1_3_1-915-g80ed4d0bb) c9ccac7cb7345901884aabf5d1a786cfa6e2f397 third_party/googletest (6e2f397) 15ae750151ac9341e5945eb38f8982d59fb99201 third_party/libuv (v1.34.0) - d0bfd5221182da1a7cc280f3337b5e41a89539cf third_party/protobuf (v3.7.0-rc.2-784-gd0bfd5221) + ef22086980e148da5e8264647b96ccf1f7d1feaf third_party/protobuf (v3.12.1) 0f2bc6c0fdac9113e3863ea6e30e5b2bd33e3b40 third_party/protoc-gen-validate (v0.0.10) e8cd3a4bb307e2c810cffff99f93e96e6d7fee85 third_party/udpa (heads/master) cacf7f1d4e3d44d871b605da3b647f07d718623f third_party/zlib (v1.2.11)