diff --git a/BUILD.bazel b/BUILD.bazel index 98584b6042..e634a09b36 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -12,6 +12,217 @@ licenses(["notice"]) exports_files(["LICENSE"]) +################################################################################ +# Protobuf Runtime Library +################################################################################ + +cc_library( + name = "protobuf_lite", + srcs = [ + # AUTOGEN(protobuf_lite_srcs) + "src/google/protobuf/any_lite.cc", + "src/google/protobuf/arena.cc", + "src/google/protobuf/arenastring.cc", + "src/google/protobuf/arenaz_sampler.cc", + "src/google/protobuf/extension_set.cc", + "src/google/protobuf/generated_enum_util.cc", + "src/google/protobuf/generated_message_tctable_lite.cc", + "src/google/protobuf/generated_message_util.cc", + "src/google/protobuf/implicit_weak_message.cc", + "src/google/protobuf/inlined_string_field.cc", + "src/google/protobuf/io/coded_stream.cc", + "src/google/protobuf/io/io_win32.cc", + "src/google/protobuf/io/strtod.cc", + "src/google/protobuf/io/zero_copy_stream.cc", + "src/google/protobuf/io/zero_copy_stream_impl.cc", + "src/google/protobuf/io/zero_copy_stream_impl_lite.cc", + "src/google/protobuf/map.cc", + "src/google/protobuf/message_lite.cc", + "src/google/protobuf/parse_context.cc", + "src/google/protobuf/repeated_field.cc", + "src/google/protobuf/repeated_ptr_field.cc", + "src/google/protobuf/stubs/bytestream.cc", + "src/google/protobuf/stubs/common.cc", + "src/google/protobuf/stubs/int128.cc", + "src/google/protobuf/stubs/status.cc", + "src/google/protobuf/stubs/statusor.cc", + "src/google/protobuf/stubs/stringpiece.cc", + "src/google/protobuf/stubs/stringprintf.cc", + "src/google/protobuf/stubs/structurally_valid.cc", + "src/google/protobuf/stubs/strutil.cc", + "src/google/protobuf/stubs/time.cc", + "src/google/protobuf/wire_format_lite.cc", + ], + hdrs = glob([ + "src/google/protobuf/**/*.h", + "src/google/protobuf/**/*.inc", + ]), + copts = COPTS, + includes = ["src/"], + linkopts = LINK_OPTS, + visibility = ["//visibility:public"], +) + +cc_library( + name = "protobuf", + srcs = [ + # AUTOGEN(protobuf_srcs) + "src/google/protobuf/any.cc", + "src/google/protobuf/any.pb.cc", + "src/google/protobuf/api.pb.cc", + "src/google/protobuf/compiler/importer.cc", + "src/google/protobuf/compiler/parser.cc", + "src/google/protobuf/descriptor.cc", + "src/google/protobuf/descriptor.pb.cc", + "src/google/protobuf/descriptor_database.cc", + "src/google/protobuf/duration.pb.cc", + "src/google/protobuf/dynamic_message.cc", + "src/google/protobuf/empty.pb.cc", + "src/google/protobuf/extension_set_heavy.cc", + "src/google/protobuf/field_mask.pb.cc", + "src/google/protobuf/generated_message_bases.cc", + "src/google/protobuf/generated_message_reflection.cc", + "src/google/protobuf/generated_message_tctable_full.cc", + "src/google/protobuf/io/gzip_stream.cc", + "src/google/protobuf/io/printer.cc", + "src/google/protobuf/io/tokenizer.cc", + "src/google/protobuf/map_field.cc", + "src/google/protobuf/message.cc", + "src/google/protobuf/reflection_ops.cc", + "src/google/protobuf/service.cc", + "src/google/protobuf/source_context.pb.cc", + "src/google/protobuf/struct.pb.cc", + "src/google/protobuf/stubs/substitute.cc", + "src/google/protobuf/text_format.cc", + "src/google/protobuf/timestamp.pb.cc", + "src/google/protobuf/type.pb.cc", + "src/google/protobuf/unknown_field_set.cc", + "src/google/protobuf/util/delimited_message_util.cc", + "src/google/protobuf/util/field_comparator.cc", + "src/google/protobuf/util/field_mask_util.cc", + "src/google/protobuf/util/internal/datapiece.cc", + "src/google/protobuf/util/internal/default_value_objectwriter.cc", + "src/google/protobuf/util/internal/error_listener.cc", + "src/google/protobuf/util/internal/field_mask_utility.cc", + "src/google/protobuf/util/internal/json_escaping.cc", + "src/google/protobuf/util/internal/json_objectwriter.cc", + "src/google/protobuf/util/internal/json_stream_parser.cc", + "src/google/protobuf/util/internal/object_writer.cc", + "src/google/protobuf/util/internal/proto_writer.cc", + "src/google/protobuf/util/internal/protostream_objectsource.cc", + "src/google/protobuf/util/internal/protostream_objectwriter.cc", + "src/google/protobuf/util/internal/type_info.cc", + "src/google/protobuf/util/internal/utility.cc", + "src/google/protobuf/util/json_util.cc", + "src/google/protobuf/util/message_differencer.cc", + "src/google/protobuf/util/time_util.cc", + "src/google/protobuf/util/type_resolver_util.cc", + "src/google/protobuf/wire_format.cc", + "src/google/protobuf/wrappers.pb.cc", + ], + hdrs = glob([ + "src/**/*.h", + "src/**/*.inc", + ]), + copts = COPTS, + includes = ["src/"], + linkopts = LINK_OPTS, + visibility = ["//visibility:public"], + deps = [":protobuf_lite"] + select({ + "//build_defs:config_msvc": [], + "//conditions:default": ["@zlib//:zlib"], + }), +) + +# This provides just the header files for use in projects that need to build +# shared libraries for dynamic loading. This target is available until Bazel +# adds native support for such use cases. +# TODO(keveman): Remove this target once the support gets added to Bazel. +cc_library( + name = "protobuf_headers", + hdrs = glob([ + "src/**/*.h", + "src/**/*.inc", + ]), + includes = ["src/"], + visibility = ["//visibility:public"], +) + +filegroup( + name = "well_known_type_protos", + srcs = [ + "src/google/protobuf/any.proto", + "src/google/protobuf/api.proto", + "src/google/protobuf/duration.proto", + "src/google/protobuf/empty.proto", + "src/google/protobuf/field_mask.proto", + "src/google/protobuf/source_context.proto", + "src/google/protobuf/struct.proto", + "src/google/protobuf/timestamp.proto", + "src/google/protobuf/type.proto", + "src/google/protobuf/wrappers.proto", + ], + visibility = ["//visibility:public"], +) + +filegroup( + name = "built_in_runtime_protos", + srcs = [ + "src/google/protobuf/compiler/plugin.proto", + "src/google/protobuf/descriptor.proto", + ], + visibility = ["//:__subpackages__"], +) + +exports_files( + srcs = [ + "src/google/protobuf/any.proto", + "src/google/protobuf/api.proto", + "src/google/protobuf/compiler/plugin.proto", + "src/google/protobuf/descriptor.proto", + "src/google/protobuf/duration.proto", + "src/google/protobuf/empty.proto", + "src/google/protobuf/field_mask.proto", + "src/google/protobuf/source_context.proto", + "src/google/protobuf/struct.proto", + "src/google/protobuf/timestamp.proto", + "src/google/protobuf/type.proto", + "src/google/protobuf/wrappers.proto", + ], + visibility = ["//pkg:__pkg__"], +) + +alias( + name = "lite_well_known_protos", + actual = ":well_known_type_protos", + visibility = ["//visibility:public"], +) + +adapt_proto_library( + name = "cc_wkt_protos_genproto", + visibility = ["//visibility:public"], + deps = [ + "//:any_proto", + "//:api_proto", + "//:compiler_plugin_proto", + "//:descriptor_proto", + "//:duration_proto", + "//:empty_proto", + "//:field_mask_proto", + "//:source_context_proto", + "//:struct_proto", + "//:timestamp_proto", + "//:type_proto", + "//:wrappers_proto", + ], +) + +cc_library( + name = "cc_wkt_protos", + deprecation = "Only for backward compatibility. Do not use.", + visibility = ["//visibility:public"], +) + ################################################################################ # Well Known Types Proto Library Rules # diff --git a/CHANGES.txt b/CHANGES.txt index ffb9c08a2b..7571a8d246 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,23 @@ +2022-05-19 version 21.0-rc2(C++/Java/Python/PHP/Objective-C/C#/Ruby) + + Python + * Fix windows builds + * Throw more helpful error if generated code is out of date + * Fixed two reference leaks + + Ruby + * Support x64-mingw-ucrt platform + + PHP + * Fix SEGV by not writing to shared memory for zend_class_entry + + C# + * Suppress warning CS8981 + + Other + * Fix Maven release to release actual osx_aarch64 binary + * Fix protoc zips to have the proto files for well known types + 2022-05-10 version 21.0-rc1 (C++/Java/Python/PHP/Objective-C/C#/Ruby) C++ diff --git a/Protobuf-C++.podspec b/Protobuf-C++.podspec index 9d8815a8c8..1297ad3e82 100644 --- a/Protobuf-C++.podspec +++ b/Protobuf-C++.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'Protobuf-C++' - s.version = '3.21.0-rc1' + s.version = '3.21.0-rc2' s.summary = 'Protocol Buffers v3 runtime library for C++.' s.homepage = 'https://github.com/google/protobuf' s.license = 'BSD-3-Clause' @@ -8,7 +8,7 @@ Pod::Spec.new do |s| s.cocoapods_version = '>= 1.0' s.source = { :git => 'https://github.com/google/protobuf.git', - :tag => "v#{s.version}" } + :tag => "v21.0-rc2" } s.source_files = 'src/google/protobuf/*.{h,cc,inc}', 'src/google/protobuf/stubs/*.{h,cc}', diff --git a/Protobuf.podspec b/Protobuf.podspec index 37d7fc9a9d..643635d8bd 100644 --- a/Protobuf.podspec +++ b/Protobuf.podspec @@ -5,7 +5,7 @@ # dependent projects use the :git notation to refer to the library. Pod::Spec.new do |s| s.name = 'Protobuf' - s.version = '3.21.0-rc1' + s.version = '3.21.0-rc2' s.summary = 'Protocol Buffers v.3 runtime library for Objective-C.' s.homepage = 'https://github.com/protocolbuffers/protobuf' s.license = 'BSD-3-Clause' @@ -13,7 +13,7 @@ Pod::Spec.new do |s| s.cocoapods_version = '>= 1.0' s.source = { :git => 'https://github.com/protocolbuffers/protobuf.git', - :tag => "v#{s.version}" } + :tag => "v21.0-rc2" } s.source_files = 'objectivec/*.{h,m}', 'objectivec/google/protobuf/Any.pbobjc.h', diff --git a/configure.ac b/configure.ac index 7cf520012a..61246b27be 100644 --- a/configure.ac +++ b/configure.ac @@ -17,7 +17,7 @@ AC_PREREQ(2.59) # In the SVN trunk, the version should always be the next anticipated release # version with the "-pre" suffix. (We used to use "-SNAPSHOT" but this pushed # the size of one file name in the dist tarfile over the 99-char limit.) -AC_INIT([Protocol Buffers],[3.21.0-rc-1],[protobuf@googlegroups.com],[protobuf]) +AC_INIT([Protocol Buffers],[3.21.0-rc-2],[protobuf@googlegroups.com],[protobuf]) AM_MAINTAINER_MODE([enable]) diff --git a/csharp/Google.Protobuf.Tools.nuspec b/csharp/Google.Protobuf.Tools.nuspec index 25c0609b40..92a860ee81 100644 --- a/csharp/Google.Protobuf.Tools.nuspec +++ b/csharp/Google.Protobuf.Tools.nuspec @@ -5,7 +5,7 @@ Google Protocol Buffers tools Tools for Protocol Buffers - Google's data interchange format. See project site for more info. - 3.21.0-rc1 + 3.21.0-rc2 Google Inc. protobuf-packages https://github.com/protocolbuffers/protobuf/blob/main/LICENSE diff --git a/csharp/src/Google.Protobuf/Google.Protobuf.csproj b/csharp/src/Google.Protobuf/Google.Protobuf.csproj index 40986da945..d634551328 100644 --- a/csharp/src/Google.Protobuf/Google.Protobuf.csproj +++ b/csharp/src/Google.Protobuf/Google.Protobuf.csproj @@ -4,7 +4,7 @@ C# runtime library for Protocol Buffers - Google's data interchange format. Copyright 2015, Google Inc. Google Protocol Buffers - 3.21.0-rc1 + 3.21.0-rc2 7.2 Google Inc. diff --git a/java/README.md b/java/README.md index 41cbc869e9..1fbc624c53 100644 --- a/java/README.md +++ b/java/README.md @@ -23,7 +23,7 @@ If you are using Maven, use the following: com.google.protobuf protobuf-java - 3.21.0-rc-1 + 3.21.0-rc-2 ``` @@ -37,7 +37,7 @@ protobuf-java-util package: com.google.protobuf protobuf-java-util - 3.21.0-rc-1 + 3.21.0-rc-2 ``` @@ -45,7 +45,7 @@ protobuf-java-util package: If you are using Gradle, add the following to your `build.gradle` file's dependencies: ``` - implementation 'com.google.protobuf:protobuf-java:3.21.0-rc-1' + implementation 'com.google.protobuf:protobuf-java:3.21.0-rc-2' ``` Again, be sure to check that the version number matches (or is newer than) the version number of protoc that you are using. diff --git a/java/bom/pom.xml b/java/bom/pom.xml index ce950a2095..a770cbb9fe 100644 --- a/java/bom/pom.xml +++ b/java/bom/pom.xml @@ -4,7 +4,7 @@ com.google.protobuf protobuf-bom - 3.21.0-rc-1 + 3.21.0-rc-2 pom Protocol Buffers [BOM] diff --git a/java/core/pom.xml b/java/core/pom.xml index 8a33a507ae..bffa2958b4 100644 --- a/java/core/pom.xml +++ b/java/core/pom.xml @@ -4,7 +4,7 @@ com.google.protobuf protobuf-parent - 3.21.0-rc-1 + 3.21.0-rc-2 protobuf-java diff --git a/java/kotlin-lite/pom.xml b/java/kotlin-lite/pom.xml index a4737d8296..fd3734d36a 100644 --- a/java/kotlin-lite/pom.xml +++ b/java/kotlin-lite/pom.xml @@ -4,7 +4,7 @@ com.google.protobuf protobuf-parent - 3.21.0-rc-1 + 3.21.0-rc-2 protobuf-kotlin-lite diff --git a/java/kotlin/pom.xml b/java/kotlin/pom.xml index a3f66409bd..c9eeb6d79b 100644 --- a/java/kotlin/pom.xml +++ b/java/kotlin/pom.xml @@ -4,7 +4,7 @@ com.google.protobuf protobuf-parent - 3.21.0-rc-1 + 3.21.0-rc-2 protobuf-kotlin diff --git a/java/lite.md b/java/lite.md index fd6c163c1f..633478b4a1 100644 --- a/java/lite.md +++ b/java/lite.md @@ -29,7 +29,7 @@ protobuf Java Lite runtime. If you are using Maven, include the following: com.google.protobuf protobuf-javalite - 3.21.0-rc-1 + 3.21.0-rc-2 ``` diff --git a/java/lite/pom.xml b/java/lite/pom.xml index d62c1b375e..c10edfd444 100644 --- a/java/lite/pom.xml +++ b/java/lite/pom.xml @@ -4,7 +4,7 @@ com.google.protobuf protobuf-parent - 3.21.0-rc-1 + 3.21.0-rc-2 protobuf-javalite diff --git a/java/pom.xml b/java/pom.xml index a1d6ab06d2..467c06d0b1 100644 --- a/java/pom.xml +++ b/java/pom.xml @@ -4,7 +4,7 @@ com.google.protobuf protobuf-parent - 3.21.0-rc-1 + 3.21.0-rc-2 pom Protocol Buffers [Parent] diff --git a/java/util/pom.xml b/java/util/pom.xml index f20e1e5c58..a12fd2226f 100644 --- a/java/util/pom.xml +++ b/java/util/pom.xml @@ -4,7 +4,7 @@ com.google.protobuf protobuf-parent - 3.21.0-rc-1 + 3.21.0-rc-2 protobuf-java-util diff --git a/php/ext/google/protobuf/package.xml b/php/ext/google/protobuf/package.xml index d1d5d87d20..deda5c5b47 100644 --- a/php/ext/google/protobuf/package.xml +++ b/php/ext/google/protobuf/package.xml @@ -10,10 +10,10 @@ protobuf-opensource@google.com yes - 2022-05-10 - + 2022-05-19 + - 3.21.0RC1 + 3.21.0RC2 3.21.0 @@ -1298,5 +1298,20 @@ G A release. + + + 3.21.0RC2 + 3.21.0 + + + beta + beta + + 2022-05-19 + + BSD-3-Clause + + + diff --git a/php/ext/google/protobuf/protobuf.h b/php/ext/google/protobuf/protobuf.h index 292a0eeca0..f95179b053 100644 --- a/php/ext/google/protobuf/protobuf.h +++ b/php/ext/google/protobuf/protobuf.h @@ -127,7 +127,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_setter, 0, 0, 1) ZEND_ARG_INFO(0, value) ZEND_END_ARG_INFO() -#define PHP_PROTOBUF_VERSION "3.21.0RC1" +#define PHP_PROTOBUF_VERSION "3.21.0RC2" // ptr -> PHP object cache. This is a weak map that caches lazily-created // wrapper objects around upb types: diff --git a/pkg/BUILD.bazel b/pkg/BUILD.bazel index f01b517b09..93d816ea9d 100644 --- a/pkg/BUILD.bazel +++ b/pkg/BUILD.bazel @@ -16,17 +16,27 @@ package_naming( pkg_files( name = "wkt_protos_files", - srcs = ["//src/google/protobuf:well_known_type_protos"], + srcs = [ + "//:src/google/protobuf/any.proto", + "//:src/google/protobuf/api.proto", + "//:src/google/protobuf/descriptor.proto", + "//:src/google/protobuf/duration.proto", + "//:src/google/protobuf/empty.proto", + "//:src/google/protobuf/field_mask.proto", + "//:src/google/protobuf/source_context.proto", + "//:src/google/protobuf/struct.proto", + "//:src/google/protobuf/timestamp.proto", + "//:src/google/protobuf/type.proto", + "//:src/google/protobuf/wrappers.proto", + ], prefix = "include/google/protobuf", visibility = ["//visibility:private"], ) pkg_files( - name = "descriptor_protos_files", - srcs = [ - "//:descriptor_proto", - ], - prefix = "include/google/protobuf", + name = "compiler_plugin_protos_files", + srcs = ["//:src/google/protobuf/compiler/plugin.proto"], + prefix = "include/google/protobuf/compiler", visibility = ["//visibility:private"], ) @@ -65,6 +75,7 @@ pkg_files( pkg_zip( name = "protoc_release", srcs = [ + ":compiler_plugin_protos_files", ":descriptor_protos_files", ":protoc_files", ":protoc_readme", diff --git a/protobuf_deps.bzl b/protobuf_deps.bzl index 0f3c76aacc..362ae65772 100644 --- a/protobuf_deps.bzl +++ b/protobuf_deps.bzl @@ -114,6 +114,6 @@ def protobuf_deps(): _github_archive( name = "upb", repo = "https://github.com/protocolbuffers/upb", - commit = "c3cfd09b0184bcbdade71a3d788df02c83e897f2", - sha256 = "4a9f79385fc0c1e3e7ba5c34220db53f956c8c42d636bafc6a563da2facf8c3f", + commit = "12efc9b096f35b62055a217f45e6b0fe5fb1a099", + sha256 = "de0ab4ee1e2d8f01b494de39cd70b611e190b63943f1d5c448d4ecb9560dc16f", ) diff --git a/protobuf_version.bzl b/protobuf_version.bzl index 94e2247452..5725bdd6c3 100644 --- a/protobuf_version.bzl +++ b/protobuf_version.bzl @@ -1,3 +1,3 @@ -PROTOC_VERSION = '21.0-rc-1' -PROTOBUF_JAVA_VERSION = '3.21.0-rc-1' -PROTOBUF_PYTHON_VERSION = '4.21.0-rc-1' +PROTOC_VERSION = '21.0-rc-2' +PROTOBUF_JAVA_VERSION = '3.21.0-rc-2' +PROTOBUF_PYTHON_VERSION = '4.21.0-rc-2' diff --git a/protoc-artifacts/pom.xml b/protoc-artifacts/pom.xml index 7f285cae46..80451f9716 100644 --- a/protoc-artifacts/pom.xml +++ b/protoc-artifacts/pom.xml @@ -8,7 +8,7 @@ com.google.protobuf protoc - 21.0-rc-1 + 3.21.0-rc-2 pom Protobuf Compiler @@ -71,11 +71,7 @@ exe - - ${basedir}/target/osx/x86_64/protoc.exe + ${basedir}/target/osx/aarch_64/protoc.exe osx-aarch_64 exe diff --git a/python/google/protobuf/__init__.py b/python/google/protobuf/__init__.py index 49039d5e12..bd2faa4e5a 100644 --- a/python/google/protobuf/__init__.py +++ b/python/google/protobuf/__init__.py @@ -30,4 +30,4 @@ # Copyright 2007 Google Inc. All Rights Reserved. -__version__ = '4.21.0rc1' +__version__ = '4.21.0rc2' diff --git a/ruby/google-protobuf.gemspec b/ruby/google-protobuf.gemspec index ff55b64275..f86cda7656 100644 --- a/ruby/google-protobuf.gemspec +++ b/ruby/google-protobuf.gemspec @@ -1,6 +1,6 @@ Gem::Specification.new do |s| s.name = "google-protobuf" - s.version = "3.21.0.rc.1" + s.version = "3.21.0.rc.2" git_tag = "v#{s.version.to_s.sub('.rc.', '-rc')}" # Converts X.Y.Z.rc.N to vX.Y.Z-rcN, used for the git tag s.licenses = ["BSD-3-Clause"] s.summary = "Protocol Buffers" diff --git a/ruby/pom.xml b/ruby/pom.xml index 0d53cd1f35..0514dbe6e6 100644 --- a/ruby/pom.xml +++ b/ruby/pom.xml @@ -9,7 +9,7 @@ com.google.protobuf.jruby protobuf-jruby - 3.21.0-rc-1 + 3.21.0-rc-2 Protocol Buffer JRuby native extension Protocol Buffers are a way of encoding structured data in an efficient yet @@ -76,7 +76,7 @@ com.google.protobuf protobuf-java-util - 3.21.0-rc-1 + 3.21.0-rc-2 org.jruby diff --git a/src/google/protobuf/port_def.inc b/src/google/protobuf/port_def.inc index 033563090e..78b97e6cca 100644 --- a/src/google/protobuf/port_def.inc +++ b/src/google/protobuf/port_def.inc @@ -193,7 +193,7 @@ #ifdef PROTOBUF_VERSION_SUFFIX #error PROTOBUF_VERSION_SUFFIX was previously defined #endif -#define PROTOBUF_VERSION_SUFFIX "-rc1" +#define PROTOBUF_VERSION_SUFFIX "-rc2" #if defined(PROTOBUF_NAMESPACE) || defined(PROTOBUF_NAMESPACE_ID) #error PROTOBUF_NAMESPACE or PROTOBUF_NAMESPACE_ID was previously defined diff --git a/src/google/protobuf/stubs/common.h b/src/google/protobuf/stubs/common.h index 8b581ba63a..36a4b08e41 100644 --- a/src/google/protobuf/stubs/common.h +++ b/src/google/protobuf/stubs/common.h @@ -85,7 +85,7 @@ namespace internal { #define GOOGLE_PROTOBUF_VERSION 3021000 // A suffix string for alpha, beta or rc releases. Empty for stable releases. -#define GOOGLE_PROTOBUF_VERSION_SUFFIX "-rc1" +#define GOOGLE_PROTOBUF_VERSION_SUFFIX "-rc2" // The minimum header version which works with the current version of // the library. This constant should only be used by protoc's C++ code