Merge pull request #9834 from haberman/merge-to-main

Merge 3.20.x to main
pull/9840/head
Joshua Haberman 3 years ago committed by GitHub
commit 5b0a961188
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 30
      CHANGES.txt
  2. 2
      Makefile.am
  3. 2
      Protobuf-C++.podspec
  4. 2
      Protobuf.podspec
  5. 2
      configure.ac
  6. 2
      csharp/Google.Protobuf.Tools.nuspec
  7. 2
      csharp/src/Google.Protobuf/Google.Protobuf.csproj
  8. 6
      java/README.md
  9. 2
      java/bom/pom.xml
  10. 2
      java/core/pom.xml
  11. 2
      java/kotlin-lite/pom.xml
  12. 2
      java/kotlin/pom.xml
  13. 2
      java/lite.md
  14. 2
      java/lite/pom.xml
  15. 2
      java/pom.xml
  16. 2
      java/util/pom.xml
  17. 2
      js/package.json
  18. 9
      kokoro/release/ruby/macos/ruby/ruby_build_environment.sh
  19. 8
      php/composer.json.dist
  20. 21
      php/ext/google/protobuf/package.xml
  21. 2
      php/ext/google/protobuf/protobuf.h
  22. 23
      php/release.sh
  23. 2
      protobuf_version.bzl
  24. 2
      protoc-artifacts/pom.xml
  25. 2
      python/google/protobuf/__init__.py
  26. 2
      ruby/google-protobuf.gemspec
  27. 4
      ruby/pom.xml

@ -1,35 +1,41 @@
Unreleased Changes (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript) Unreleased Changes (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)
Compiler
* Require package names to be less than 512 bytes in length
2022-04-05 version 3.20.1 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)
PHP PHP
* Fix building packaged PHP extension (#9727) * Fix building packaged PHP extension (#9727)
* Fixed composer.json to only advertise compatibility with PHP 7.0+. (#9819)
Ruby
* Disable the aarch64 build on macOS until it can be fixed. (#9816)
Other Other
* Fix versioning issues in 3.20.0 * Fix versioning issues in 3.20.0
Unreleased Changes C++
C++
* Refactor generated message class layout * Refactor generated message class layout
* Optimize tokenizer ParseInteger by removing division * Optimize tokenizer ParseInteger by removing division
* Reserve exactly the right amount of capacity in ExtensionSet::MergeFrom * Reserve exactly the right amount of capacity in ExtensionSet::MergeFrom
Compiler Compiler
* Protoc outputs the list of suggested field numbers when invalid field * Protoc outputs the list of suggested field numbers when invalid field
numbers are specified in the .proto file. numbers are specified in the .proto file.
* Require package names to be less than 512 bytes in length
Java Java
* 6x speedup in ArrayEncoder.writeUInt32NotTag * 6x speedup in ArrayEncoder.writeUInt32NotTag
Python Python
* Added UnknownFieldSet(message) for pure Python. The old * Added UnknownFieldSet(message) for pure Python. The old
message.UnknownFields() will be deprecated after UnknownFieldSet(message) is message.UnknownFields() will be deprecated after UnknownFieldSet(message) is
added for cpp extension. added for cpp extension.
2022-04-21 version 3.20.1 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)
PHP
* Fix building packaged PHP extension (#9727)
Other
* Fix versioning issues in 3.20.0
2022-03-04 version 3.20.0 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript) 2022-03-04 version 3.20.0 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)
Ruby Ruby
@ -97,6 +103,8 @@ Python
JSON serializations with UTF-8 or other non-ASCII encodings. JSON serializations with UTF-8 or other non-ASCII encodings.
* Added experimental support for directly assigning numpy scalars and array. * Added experimental support for directly assigning numpy scalars and array.
* Improve the calculation of public_dependencies in DescriptorPool. * Improve the calculation of public_dependencies in DescriptorPool.
* [Breaking Change] Disallow setting fields to numpy singleton arrays or repeated fields to numpy
multi-dimensional arrays. Numpy arrays should be indexed or flattened explicitly before assignment.
Compiler Compiler
* Migrate IsDefault(const std::string*) and UnsafeSetDefault(const std::string*) * Migrate IsDefault(const std::string*) and UnsafeSetDefault(const std::string*)

@ -816,10 +816,10 @@ objectivec_EXTRA_DIST= \
Protobuf.podspec Protobuf.podspec
php_EXTRA_DIST= \ php_EXTRA_DIST= \
composer.json \
php/README.md \ php/README.md \
php/REFCOUNTING.md \ php/REFCOUNTING.md \
php/composer.json \ php/composer.json \
php/composer.json.dist \
php/ext/google/protobuf/arena.c \ php/ext/google/protobuf/arena.c \
php/ext/google/protobuf/arena.h \ php/ext/google/protobuf/arena.h \
php/ext/google/protobuf/array.c \ php/ext/google/protobuf/array.c \

@ -1,6 +1,6 @@
Pod::Spec.new do |s| Pod::Spec.new do |s|
s.name = 'Protobuf-C++' s.name = 'Protobuf-C++'
s.version = '3.20.1-rc1' s.version = '3.20.1'
s.summary = 'Protocol Buffers v3 runtime library for C++.' s.summary = 'Protocol Buffers v3 runtime library for C++.'
s.homepage = 'https://github.com/google/protobuf' s.homepage = 'https://github.com/google/protobuf'
s.license = 'BSD-3-Clause' s.license = 'BSD-3-Clause'

@ -5,7 +5,7 @@
# dependent projects use the :git notation to refer to the library. # dependent projects use the :git notation to refer to the library.
Pod::Spec.new do |s| Pod::Spec.new do |s|
s.name = 'Protobuf' s.name = 'Protobuf'
s.version = '3.20.1-rc1' s.version = '3.20.1'
s.summary = 'Protocol Buffers v.3 runtime library for Objective-C.' s.summary = 'Protocol Buffers v.3 runtime library for Objective-C.'
s.homepage = 'https://github.com/protocolbuffers/protobuf' s.homepage = 'https://github.com/protocolbuffers/protobuf'
s.license = 'BSD-3-Clause' s.license = 'BSD-3-Clause'

@ -17,7 +17,7 @@ AC_PREREQ(2.59)
# In the SVN trunk, the version should always be the next anticipated release # 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 # 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.) # the size of one file name in the dist tarfile over the 99-char limit.)
AC_INIT([Protocol Buffers],[3.20.1-rc-1],[protobuf@googlegroups.com],[protobuf]) AC_INIT([Protocol Buffers],[3.20.1],[protobuf@googlegroups.com],[protobuf])
AM_MAINTAINER_MODE([enable]) AM_MAINTAINER_MODE([enable])

@ -5,7 +5,7 @@
<title>Google Protocol Buffers tools</title> <title>Google Protocol Buffers tools</title>
<summary>Tools for Protocol Buffers - Google's data interchange format.</summary> <summary>Tools for Protocol Buffers - Google's data interchange format.</summary>
<description>See project site for more info.</description> <description>See project site for more info.</description>
<version>3.20.1-rc1</version> <version>3.20.1</version>
<authors>Google Inc.</authors> <authors>Google Inc.</authors>
<owners>protobuf-packages</owners> <owners>protobuf-packages</owners>
<licenseUrl>https://github.com/protocolbuffers/protobuf/blob/main/LICENSE</licenseUrl> <licenseUrl>https://github.com/protocolbuffers/protobuf/blob/main/LICENSE</licenseUrl>

@ -4,7 +4,7 @@
<Description>C# runtime library for Protocol Buffers - Google's data interchange format.</Description> <Description>C# runtime library for Protocol Buffers - Google's data interchange format.</Description>
<Copyright>Copyright 2015, Google Inc.</Copyright> <Copyright>Copyright 2015, Google Inc.</Copyright>
<AssemblyTitle>Google Protocol Buffers</AssemblyTitle> <AssemblyTitle>Google Protocol Buffers</AssemblyTitle>
<VersionPrefix>3.20.1-rc1</VersionPrefix> <VersionPrefix>3.20.1</VersionPrefix>
<!-- C# 7.2 is required for Span/BufferWriter/ReadOnlySequence --> <!-- C# 7.2 is required for Span/BufferWriter/ReadOnlySequence -->
<LangVersion>7.2</LangVersion> <LangVersion>7.2</LangVersion>
<Authors>Google Inc.</Authors> <Authors>Google Inc.</Authors>

@ -23,7 +23,7 @@ If you are using Maven, use the following:
<dependency> <dependency>
<groupId>com.google.protobuf</groupId> <groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId> <artifactId>protobuf-java</artifactId>
<version>3.20.1-rc-1</version> <version>3.20.1</version>
</dependency> </dependency>
``` ```
@ -37,7 +37,7 @@ protobuf-java-util package:
<dependency> <dependency>
<groupId>com.google.protobuf</groupId> <groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java-util</artifactId> <artifactId>protobuf-java-util</artifactId>
<version>3.20.1-rc-1</version> <version>3.20.1</version>
</dependency> </dependency>
``` ```
@ -45,7 +45,7 @@ protobuf-java-util package:
If you are using Gradle, add the following to your `build.gradle` file's dependencies: If you are using Gradle, add the following to your `build.gradle` file's dependencies:
``` ```
implementation 'com.google.protobuf:protobuf-java:3.20.1-rc-1' implementation 'com.google.protobuf:protobuf-java:3.20.1'
``` ```
Again, be sure to check that the version number matches (or is newer than) the version number of protoc that you are using. Again, be sure to check that the version number matches (or is newer than) the version number of protoc that you are using.

@ -4,7 +4,7 @@
<groupId>com.google.protobuf</groupId> <groupId>com.google.protobuf</groupId>
<artifactId>protobuf-bom</artifactId> <artifactId>protobuf-bom</artifactId>
<version>3.20.1-rc-1</version> <version>3.20.1</version>
<packaging>pom</packaging> <packaging>pom</packaging>
<name>Protocol Buffers [BOM]</name> <name>Protocol Buffers [BOM]</name>

@ -4,7 +4,7 @@
<parent> <parent>
<groupId>com.google.protobuf</groupId> <groupId>com.google.protobuf</groupId>
<artifactId>protobuf-parent</artifactId> <artifactId>protobuf-parent</artifactId>
<version>3.20.1-rc-1</version> <version>3.20.1</version>
</parent> </parent>
<artifactId>protobuf-java</artifactId> <artifactId>protobuf-java</artifactId>

@ -4,7 +4,7 @@
<parent> <parent>
<groupId>com.google.protobuf</groupId> <groupId>com.google.protobuf</groupId>
<artifactId>protobuf-parent</artifactId> <artifactId>protobuf-parent</artifactId>
<version>3.20.1-rc-1</version> <version>3.20.1</version>
</parent> </parent>
<artifactId>protobuf-kotlin-lite</artifactId> <artifactId>protobuf-kotlin-lite</artifactId>

@ -4,7 +4,7 @@
<parent> <parent>
<groupId>com.google.protobuf</groupId> <groupId>com.google.protobuf</groupId>
<artifactId>protobuf-parent</artifactId> <artifactId>protobuf-parent</artifactId>
<version>3.20.1-rc-1</version> <version>3.20.1</version>
</parent> </parent>
<artifactId>protobuf-kotlin</artifactId> <artifactId>protobuf-kotlin</artifactId>

@ -29,7 +29,7 @@ protobuf Java Lite runtime. If you are using Maven, include the following:
<dependency> <dependency>
<groupId>com.google.protobuf</groupId> <groupId>com.google.protobuf</groupId>
<artifactId>protobuf-javalite</artifactId> <artifactId>protobuf-javalite</artifactId>
<version>3.20.1-rc-1</version> <version>3.20.1</version>
</dependency> </dependency>
``` ```

@ -4,7 +4,7 @@
<parent> <parent>
<groupId>com.google.protobuf</groupId> <groupId>com.google.protobuf</groupId>
<artifactId>protobuf-parent</artifactId> <artifactId>protobuf-parent</artifactId>
<version>3.20.1-rc-1</version> <version>3.20.1</version>
</parent> </parent>
<artifactId>protobuf-javalite</artifactId> <artifactId>protobuf-javalite</artifactId>

@ -4,7 +4,7 @@
<groupId>com.google.protobuf</groupId> <groupId>com.google.protobuf</groupId>
<artifactId>protobuf-parent</artifactId> <artifactId>protobuf-parent</artifactId>
<version>3.20.1-rc-1</version> <version>3.20.1</version>
<packaging>pom</packaging> <packaging>pom</packaging>
<name>Protocol Buffers [Parent]</name> <name>Protocol Buffers [Parent]</name>

@ -4,7 +4,7 @@
<parent> <parent>
<groupId>com.google.protobuf</groupId> <groupId>com.google.protobuf</groupId>
<artifactId>protobuf-parent</artifactId> <artifactId>protobuf-parent</artifactId>
<version>3.20.1-rc-1</version> <version>3.20.1</version>
</parent> </parent>
<artifactId>protobuf-java-util</artifactId> <artifactId>protobuf-java-util</artifactId>

@ -1,6 +1,6 @@
{ {
"name": "google-protobuf", "name": "google-protobuf",
"version": "3.20.1-rc.1", "version": "3.20.1",
"description": "Protocol Buffers for JavaScript", "description": "Protocol Buffers for JavaScript",
"main": "google-protobuf.js", "main": "google-protobuf.js",
"files": [ "files": [

@ -91,7 +91,8 @@ ruby --version | grep 'ruby 3.1.0'
for v in 3.1.0 ; do for v in 3.1.0 ; do
ccache -c ccache -c
rake -f "$CROSS_RUBY31" cross-ruby VERSION="$v" HOST=x86_64-darwin MAKE="$MAKE" rake -f "$CROSS_RUBY31" cross-ruby VERSION="$v" HOST=x86_64-darwin MAKE="$MAKE"
rake -f "$CROSS_RUBY31" cross-ruby VERSION="$v" HOST=aarch64-darwin MAKE="$MAKE" # Disabled until it can be fixed: https://github.com/protocolbuffers/protobuf/issues/9804
# rake -f "$CROSS_RUBY31" cross-ruby VERSION="$v" HOST=aarch64-darwin MAKE="$MAKE"
done done
set +x # rvm commands are very verbose set +x # rvm commands are very verbose
@ -101,7 +102,8 @@ ruby --version | grep 'ruby 2.7.0'
for v in 3.0.0 2.7.0 ; do for v in 3.0.0 2.7.0 ; do
ccache -c ccache -c
rake -f "$CROSS_RUBY" cross-ruby VERSION="$v" HOST=x86_64-darwin MAKE="$MAKE" rake -f "$CROSS_RUBY" cross-ruby VERSION="$v" HOST=x86_64-darwin MAKE="$MAKE"
rake -f "$CROSS_RUBY" cross-ruby VERSION="$v" HOST=aarch64-darwin MAKE="$MAKE" # Disabled until it can be fixed: https://github.com/protocolbuffers/protobuf/issues/9804
# rake -f "$CROSS_RUBY" cross-ruby VERSION="$v" HOST=aarch64-darwin MAKE="$MAKE"
done done
set +x set +x
rvm use 2.5.0 rvm use 2.5.0
@ -110,7 +112,8 @@ ruby --version | grep 'ruby 2.5.0'
for v in 2.6.0 2.5.1; do for v in 2.6.0 2.5.1; do
ccache -c ccache -c
rake -f "$CROSS_RUBY" cross-ruby VERSION="$v" HOST=x86_64-darwin MAKE="$MAKE" rake -f "$CROSS_RUBY" cross-ruby VERSION="$v" HOST=x86_64-darwin MAKE="$MAKE"
rake -f "$CROSS_RUBY" cross-ruby VERSION="$v" HOST=aarch64-darwin MAKE="$MAKE" # Disabled until it can be fixed: https://github.com/protocolbuffers/protobuf/issues/9804
# rake -f "$CROSS_RUBY" cross-ruby VERSION="$v" HOST=aarch64-darwin MAKE="$MAKE"
done done
set +x set +x
rvm use 2.7.0 rvm use 2.7.0

@ -6,18 +6,18 @@
"homepage": "https://developers.google.com/protocol-buffers/", "homepage": "https://developers.google.com/protocol-buffers/",
"license": "BSD-3-Clause", "license": "BSD-3-Clause",
"require": { "require": {
"php": ">=5.5.0" "php": ">=7.0.0"
}, },
"require-dev": { "require-dev": {
"phpunit/phpunit": ">=4.8.0" "phpunit/phpunit": ">=5.0.0"
}, },
"suggest": { "suggest": {
"ext-bcmath": "Need to support JSON deserialization" "ext-bcmath": "Need to support JSON deserialization"
}, },
"autoload": { "autoload": {
"psr-4": { "psr-4": {
"Google\\Protobuf\\": "php/src/Google/Protobuf", "Google\\Protobuf\\": "src/Google/Protobuf",
"GPBMetadata\\Google\\Protobuf\\": "php/src/GPBMetadata/Google/Protobuf" "GPBMetadata\\Google\\Protobuf\\": "src/GPBMetadata/Google/Protobuf"
} }
} }
} }

@ -10,10 +10,10 @@
<email>protobuf-opensource@google.com</email> <email>protobuf-opensource@google.com</email>
<active>yes</active> <active>yes</active>
</lead> </lead>
<date>2022-04-05</date> <date>2022-04-20</date>
<time>17:06:47</time> <time>22:01:25</time>
<version> <version>
<release>3.20.1RC1</release> <release>3.20.1</release>
<api>3.20.1</api> <api>3.20.1</api>
</version> </version>
<stability> <stability>
@ -1268,5 +1268,20 @@ G A release.
<notes> <notes>
</notes> </notes>
</release> </release>
<release>
<version>
<release>3.20.1</release>
<api>3.20.1</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
<date>2022-04-20</date>
<time>22:01:25</time>
<license uri="https://opensource.org/licenses/BSD-3-Clause">BSD-3-Clause</license>
<notes>
</notes>
</release>
</changelog> </changelog>
</package> </package>

@ -127,7 +127,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_setter, 0, 0, 1)
ZEND_ARG_INFO(0, value) ZEND_ARG_INFO(0, value)
ZEND_END_ARG_INFO() ZEND_END_ARG_INFO()
#define PHP_PROTOBUF_VERSION "3.20.1RC1" #define PHP_PROTOBUF_VERSION "3.20.1"
// ptr -> PHP object cache. This is a weak map that caches lazily-created // ptr -> PHP object cache. This is a weak map that caches lazily-created
// wrapper objects around upb types: // wrapper objects around upb types:

@ -10,24 +10,17 @@ set -ex
VERSION=$1 VERSION=$1
rm -rf protobuf-php
git clone https://github.com/protocolbuffers/protobuf-php.git git clone https://github.com/protocolbuffers/protobuf-php.git
git clone https://github.com/protocolbuffers/protobuf.git
# Clean old files # Clean old files
pushd protobuf-php rm -rf protobuf-php/src
rm -rf src
popd
# Checkout the target version
pushd protobuf/php
git checkout -b $VERSION
popd
# Copy files # Copy files
pushd protobuf-php cp -r php/src protobuf-php
mv ../protobuf/php/src src cp php/composer.json.dist protobuf-php/composer.json
mv ../protobuf/composer.json composer.json
sed -i 's|php/src|src|g' composer.json cd protobuf-php
git add . git add .
git commit -m "$VERSION" git commit -m "$VERSION"
if [ $(git tag -l "$VERSION") ]; then if [ $(git tag -l "$VERSION") ]; then
@ -35,7 +28,3 @@ if [ $(git tag -l "$VERSION") ]; then
else else
git tag "$VERSION" git tag "$VERSION"
fi fi
popd
# Clean up
rm -rf protobuf

@ -1 +1 @@
PROTOBUF_VERSION = '3.20.1-rc-1' PROTOBUF_VERSION = '3.20.1'

@ -8,7 +8,7 @@
</parent> </parent>
<groupId>com.google.protobuf</groupId> <groupId>com.google.protobuf</groupId>
<artifactId>protoc</artifactId> <artifactId>protoc</artifactId>
<version>3.20.1-rc-1</version> <version>3.20.1</version>
<packaging>pom</packaging> <packaging>pom</packaging>
<name>Protobuf Compiler</name> <name>Protobuf Compiler</name>
<description> <description>

@ -30,4 +30,4 @@
# Copyright 2007 Google Inc. All Rights Reserved. # Copyright 2007 Google Inc. All Rights Reserved.
__version__ = '3.20.1rc1' __version__ = '3.20.1'

@ -1,6 +1,6 @@
Gem::Specification.new do |s| Gem::Specification.new do |s|
s.name = "google-protobuf" s.name = "google-protobuf"
s.version = "3.20.1.rc.1" s.version = "3.20.1"
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 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.licenses = ["BSD-3-Clause"]
s.summary = "Protocol Buffers" s.summary = "Protocol Buffers"

@ -9,7 +9,7 @@
<groupId>com.google.protobuf.jruby</groupId> <groupId>com.google.protobuf.jruby</groupId>
<artifactId>protobuf-jruby</artifactId> <artifactId>protobuf-jruby</artifactId>
<version>3.20.1-rc-1</version> <version>3.20.1</version>
<name>Protocol Buffer JRuby native extension</name> <name>Protocol Buffer JRuby native extension</name>
<description> <description>
Protocol Buffers are a way of encoding structured data in an efficient yet Protocol Buffers are a way of encoding structured data in an efficient yet
@ -76,7 +76,7 @@
<dependency> <dependency>
<groupId>com.google.protobuf</groupId> <groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java-util</artifactId> <artifactId>protobuf-java-util</artifactId>
<version>3.20.1-rc-1</version> <version>3.20.1</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.jruby</groupId> <groupId>org.jruby</groupId>

Loading…
Cancel
Save