Skip to content

Commit

Permalink
Merge pull request #7231 from protocolbuffers/3.11.x-202002181624
Browse files Browse the repository at this point in the history
Merge branch 3.11.x to master
  • Loading branch information
rafi-kamal committed Feb 19, 2020
2 parents 83b47e4 + 0eb476b commit 1370c73
Show file tree
Hide file tree
Showing 42 changed files with 147 additions and 59 deletions.
20 changes: 20 additions & 0 deletions CHANGES.txt
@@ -1,3 +1,23 @@
2020-02-14 version 3.11.4 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)

C#
* Fix latest ArgumentException for C# extensions (#7188)
* Enforce recursion depth checking for unknown fields (#7210)

Ruby
* Fix wrappers with a zero value (#7195)
* Fix JSON serialization of 0/empty-valued wrapper types (#7198)

2020-01-31 version 3.11.3 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)

C++
* Add OUT and OPTIONAL to windows portability files (#7087)

PHP
* Refactored ulong to zend_ulong for php7.4 compatibility (#7147)
* Call register_class before getClass from desc to fix segfault (#7077)


2019-12-10 version 3.11.2 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)

PHP
Expand Down
2 changes: 1 addition & 1 deletion Protobuf-C++.podspec
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'Protobuf-C++'
s.version = '3.11.2'
s.version = '3.11.4'
s.summary = 'Protocol Buffers v3 runtime library for C++.'
s.homepage = 'https://github.com/google/protobuf'
s.license = '3-Clause BSD License'
Expand Down
2 changes: 1 addition & 1 deletion Protobuf.podspec
Expand Up @@ -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.11.2'
s.version = '3.11.4'
s.summary = 'Protocol Buffers v.3 runtime library for Objective-C.'
s.homepage = 'https://github.com/protocolbuffers/protobuf'
s.license = '3-Clause BSD License'
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Expand Up @@ -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.11.2],[protobuf@googlegroups.com],[protobuf])
AC_INIT([Protocol Buffers],[3.11.4],[protobuf@googlegroups.com],[protobuf])

AM_MAINTAINER_MODE([enable])

Expand Down
3 changes: 1 addition & 2 deletions csharp/Google.Protobuf.Tools.nuspec
Expand Up @@ -5,7 +5,7 @@
<title>Google Protocol Buffers tools</title>
<summary>Tools for Protocol Buffers - Google's data interchange format.</summary>
<description>See project site for more info.</description>
<version>3.11.2</version>
<version>3.11.4</version>
<authors>Google Inc.</authors>
<owners>protobuf-packages</owners>
<licenseUrl>https://github.com/protocolbuffers/protobuf/blob/master/LICENSE</licenseUrl>
Expand All @@ -20,7 +20,6 @@
<file src="protoc\windows_x64\protoc.exe" target="tools\windows_x64\protoc.exe"/>
<file src="protoc\linux_x86\protoc" target="tools\linux_x86\protoc"/>
<file src="protoc\linux_x64\protoc" target="tools\linux_x64\protoc"/>
<file src="protoc\macosx_x86\protoc" target="tools\macosx_x86\protoc"/>
<file src="protoc\macosx_x64\protoc" target="tools\macosx_x64\protoc"/>
<file src="..\src\google\protobuf\any.proto" target="tools\google\protobuf"/>
<file src="..\src\google\protobuf\api.proto" target="tools\google\protobuf"/>
Expand Down
1 change: 0 additions & 1 deletion csharp/build_tools.sh
Expand Up @@ -19,7 +19,6 @@ VERSION_NUMBER=$1
declare -a FILE_NAMES=( \
windows_x86 windows-x86_32.exe \
windows_x64 windows-x86_64.exe \
macosx_x86 osx-x86_32.exe \
macosx_x64 osx-x86_64.exe \
linux_x86 linux-x86_32.exe \
linux_x64 linux-x86_64.exe \
Expand Down
2 changes: 1 addition & 1 deletion csharp/src/Google.Protobuf/Google.Protobuf.csproj
Expand Up @@ -4,7 +4,7 @@
<Description>C# runtime library for Protocol Buffers - Google's data interchange format.</Description>
<Copyright>Copyright 2015, Google Inc.</Copyright>
<AssemblyTitle>Google Protocol Buffers</AssemblyTitle>
<VersionPrefix>3.11.2</VersionPrefix>
<VersionPrefix>3.11.4</VersionPrefix>
<LangVersion>6</LangVersion>
<Authors>Google Inc.</Authors>
<TargetFrameworks>netstandard1.0;netstandard2.0;net45</TargetFrameworks>
Expand Down
2 changes: 1 addition & 1 deletion java/bom/pom.xml
Expand Up @@ -4,7 +4,7 @@

<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-bom</artifactId>
<version>3.11.2</version>
<version>3.11.4</version>
<packaging>pom</packaging>

<name>Protocol Buffers [BOM]</name>
Expand Down
2 changes: 1 addition & 1 deletion java/core/pom.xml
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-parent</artifactId>
<version>3.11.2</version>
<version>3.11.4</version>
</parent>

<artifactId>protobuf-java</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion java/lite/pom.xml
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-parent</artifactId>
<version>3.11.2</version>
<version>3.11.4</version>
</parent>

<artifactId>protobuf-javalite</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion java/pom.xml
Expand Up @@ -4,7 +4,7 @@

<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-parent</artifactId>
<version>3.11.2</version>
<version>3.11.4</version>
<packaging>pom</packaging>

<name>Protocol Buffers [Parent]</name>
Expand Down
2 changes: 1 addition & 1 deletion java/util/pom.xml
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-parent</artifactId>
<version>3.11.2</version>
<version>3.11.4</version>
</parent>

<artifactId>protobuf-java-util</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion js/package.json
@@ -1,6 +1,6 @@
{
"name": "google-protobuf",
"version": "3.11.2",
"version": "3.11.4",
"description": "Protocol Buffers for JavaScript",
"main": "google-protobuf.js",
"files": [
Expand Down
11 changes: 11 additions & 0 deletions kokoro/macos/php7.4_mac/build.sh
@@ -0,0 +1,11 @@
#!/bin/bash
#
# Build file to set up and run tests

# Change to repo root
cd $(dirname $0)/../../..

# Prepare worker environment to run tests
source kokoro/macos/prepare_build_macos_rc

./tests.sh php7.4_mac
5 changes: 5 additions & 0 deletions kokoro/macos/php7.4_mac/continuous.cfg
@@ -0,0 +1,5 @@
# Config file for running tests in Kokoro

# Location of the build script in repository
build_file: "protobuf/kokoro/macos/php7.4_mac/build.sh"
timeout_mins: 1440
5 changes: 5 additions & 0 deletions kokoro/macos/php7.4_mac/presubmit.cfg
@@ -0,0 +1,5 @@
# Config file for running tests in Kokoro

# Location of the build script in repository
build_file: "protobuf/kokoro/macos/php7.4_mac/build.sh"
timeout_mins: 1440
2 changes: 0 additions & 2 deletions kokoro/release/collect_all_artifacts.sh
Expand Up @@ -43,9 +43,7 @@ mkdir -p protoc/linux_x64
cp ${INPUT_ARTIFACTS_DIR}/protoc-artifacts/target/linux/x86_32/protoc.exe protoc/linux_x86/protoc
cp ${INPUT_ARTIFACTS_DIR}/protoc-artifacts/target/linux/x86_64/protoc.exe protoc/linux_x64/protoc

mkdir -p protoc/macosx_x86
mkdir -p protoc/macosx_x64
cp ${INPUT_ARTIFACTS_DIR}/build32/src/protoc protoc/macosx_x86/protoc
cp ${INPUT_ARTIFACTS_DIR}/build64/src/protoc protoc/macosx_x64/protoc

# Install nuget (will also install mono)
Expand Down
8 changes: 0 additions & 8 deletions kokoro/release/protoc/macos/build.sh
Expand Up @@ -6,14 +6,6 @@ CXXFLAGS_COMMON="-std=c++14 -DNDEBUG -mmacosx-version-min=10.9"
cd github/protobuf
./autogen.sh

mkdir build32 && cd build32
export CXXFLAGS="$CXXFLAGS_COMMON -m32"
../configure --disable-shared
make -j4
file src/protoc
otool -L src/protoc | grep dylib
cd ..

mkdir build64 && cd build64
export CXXFLAGS="$CXXFLAGS_COMMON -m64"
../configure --disable-shared
Expand Down
1 change: 1 addition & 0 deletions php/ext/google/protobuf/def.c
Expand Up @@ -132,6 +132,7 @@ static void descriptor_init_c_instance(Descriptor *desc TSRMLS_DC) {
PHP_METHOD(Descriptor, getClass) {
Descriptor* desc = UNBOX(Descriptor, getThis());
DescriptorInternal* intern = desc->intern;
register_class(intern, false TSRMLS_CC);
#if PHP_MAJOR_VERSION < 7
const char* classname = intern->klass->name;
#else
Expand Down
36 changes: 32 additions & 4 deletions php/ext/google/protobuf/package.xml
Expand Up @@ -10,11 +10,11 @@
<email>protobuf-opensource@google.com</email>
<active>yes</active>
</lead>
<date>2019-12-10</date>
<time>11:22:54</time>
<date>2020-02-12</date>
<time>12:46:57</time>
<version>
<release>3.11.2</release>
<api>3.11.2</api>
<release>3.11.4</release>
<api>3.11.4</api>
</version>
<stability>
<release>stable</release>
Expand Down Expand Up @@ -501,5 +501,33 @@ G A release.
<license uri="https://opensource.org/licenses/BSD-3-Clause">3-Clause BSD License</license>
<notes>GA release.</notes>
</release>
<release>
<version>
<release>3.11.3</release>
<api>3.11.3</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
<date>2020-01-28</date>
<time>10:20:43</time>
<license uri="https://opensource.org/licenses/BSD-3-Clause">3-Clause BSD License</license>
<notes>GA release.</notes>
</release>
<release>
<version>
<release>3.11.4</release>
<api>3.11.4</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
<date>2020-02-12</date>
<time>12:46:57</time>
<license uri="https://opensource.org/licenses/BSD-3-Clause">3-Clause BSD License</license>
<notes>GA release.</notes>
</release>
</changelog>
</package>
10 changes: 5 additions & 5 deletions php/ext/google/protobuf/protobuf.h
Expand Up @@ -37,7 +37,7 @@
#include "upb.h"

#define PHP_PROTOBUF_EXTNAME "protobuf"
#define PHP_PROTOBUF_VERSION "3.11.2"
#define PHP_PROTOBUF_VERSION "3.11.4"

#define MAX_LENGTH_OF_INT64 20
#define SIZEOF_INT64 8
Expand Down Expand Up @@ -292,7 +292,7 @@

#define PHP_PROTO_HASH_OF(array) Z_ARRVAL_P(&array)

static inline int php_proto_zend_hash_index_update_zval(HashTable* ht, ulong h,
static inline int php_proto_zend_hash_index_update_zval(HashTable* ht, zend_ulong h,
zval* pData) {
void* result = NULL;
result = zend_hash_index_update(ht, h, pData);
Expand All @@ -308,7 +308,7 @@ static inline int php_proto_zend_hash_update(HashTable* ht, const char* key,
return result != NULL ? SUCCESS : FAILURE;
}

static inline int php_proto_zend_hash_index_update_mem(HashTable* ht, ulong h,
static inline int php_proto_zend_hash_index_update_mem(HashTable* ht, zend_ulong h,
void* pData, uint nDataSize,
void** pDest) {
void* result = NULL;
Expand Down Expand Up @@ -337,7 +337,7 @@ static inline int php_proto_zend_hash_update_mem(HashTable* ht, const char* key,
}

static inline int php_proto_zend_hash_index_find_zval(const HashTable* ht,
ulong h, void** pDest) {
zend_ulong h, void** pDest) {
zval* result = zend_hash_index_find(ht, h);
if (pDest != NULL) *pDest = result;
return result != NULL ? SUCCESS : FAILURE;
Expand All @@ -351,7 +351,7 @@ static inline int php_proto_zend_hash_find(const HashTable* ht, const char* key,
}

static inline int php_proto_zend_hash_index_find_mem(const HashTable* ht,
ulong h, void** pDest) {
zend_ulong h, void** pDest) {
void* result = NULL;
result = zend_hash_index_find_ptr(ht, h);
if (pDest != NULL) *pDest = result;
Expand Down
13 changes: 13 additions & 0 deletions php/tests/descriptors_test.php
Expand Up @@ -11,6 +11,8 @@
use Descriptors\TestDescriptorsEnum;
use Descriptors\TestDescriptorsMessage;
use Descriptors\TestDescriptorsMessage\Sub;
use Foo\TestMessage;
use Bar\TestInclude;

class DescriptorsTest extends TestBase
{
Expand Down Expand Up @@ -89,6 +91,17 @@ public function testDescriptor()
$this->assertSame(1, $desc->getOneofDeclCount());
}

public function testDescriptorForIncludedMessage()
{
$pool = DescriptorPool::getGeneratedPool();
$class = get_class(new TestMessage());
$this->assertSame('Foo\TestMessage', $class);
$desc = $pool->getDescriptorByClassName($class);
$fielddesc = $desc->getField(17);
$subdesc = $fielddesc->getMessageType();
$this->assertSame('Bar\TestInclude', $subdesc->getClass());
}

#########################################################
# Test enum descriptor.
#########################################################
Expand Down
6 changes: 2 additions & 4 deletions protoc-artifacts/build-zip.sh
Expand Up @@ -13,10 +13,9 @@ Example:
This script will download pre-built protoc or protoc plugin binaries from maven
repository and create .zip packages suitable to be included in the github
release page. If the target is protoc, well-known type .proto files will also be
included. Each invocation will create 9 zip packages:
included. Each invocation will create 8 zip packages:
dist/<TARGET>-<VERSION_NUMBER>-win32.zip
dist/<TARGET>-<VERSION_NUMBER>-win64.zip
dist/<TARGET>-<VERSION_NUMBER>-osx-x86_32.zip
dist/<TARGET>-<VERSION_NUMBER>-osx-x86_64.zip
dist/<TARGET>-<VERSION_NUMBER>-linux-x86_32.zip
dist/<TARGET>-<VERSION_NUMBER>-linux-x86_64.zip
Expand All @@ -34,7 +33,6 @@ VERSION_NUMBER=$2
declare -a FILE_NAMES=( \
win32.zip windows-x86_32.exe \
win64.zip windows-x86_64.exe \
osx-x86_32.zip osx-x86_32.exe \
osx-x86_64.zip osx-x86_64.exe \
linux-x86_32.zip linux-x86_32.exe \
linux-x86_64.zip linux-x86_64.exe \
Expand Down Expand Up @@ -100,7 +98,7 @@ for((i=0;i<${#FILE_NAMES[@]};i+=2));do
BINARY="$TARGET"
fi
BINARY_NAME=${FILE_NAMES[$(($i+1))]}
BINARY_URL=http://repo1.maven.org/maven2/com/google/protobuf/$TARGET/${VERSION_NUMBER}/$TARGET-${VERSION_NUMBER}-${BINARY_NAME}
BINARY_URL=https://repo1.maven.org/maven2/com/google/protobuf/$TARGET/${VERSION_NUMBER}/$TARGET-${VERSION_NUMBER}-${BINARY_NAME}
if ! wget ${BINARY_URL} -O ${DIR}/bin/$BINARY &> /dev/null; then
echo "[ERROR] Failed to download ${BINARY_URL}" >&2
echo "[ERROR] Skipped $TARGET-${VERSION_NAME}-${ZIP_NAME}" >&2
Expand Down
7 changes: 1 addition & 6 deletions protoc-artifacts/pom.xml
Expand Up @@ -8,7 +8,7 @@
</parent>
<groupId>com.google.protobuf</groupId>
<artifactId>protoc</artifactId>
<version>3.11.2</version>
<version>3.11.4</version>
<packaging>pom</packaging>
<name>Protobuf Compiler</name>
<description>
Expand Down Expand Up @@ -70,11 +70,6 @@
<classifier>osx-x86_64</classifier>
<type>exe</type>
</artifact>
<artifact>
<file>${basedir}/target/osx/x86_32/protoc.exe</file>
<classifier>osx-x86_32</classifier>
<type>exe</type>
</artifact>
<artifact>
<file>${basedir}/target/linux/aarch_64/protoc.exe</file>
<classifier>linux-aarch_64</classifier>
Expand Down
2 changes: 1 addition & 1 deletion python/google/protobuf/__init__.py
Expand Up @@ -30,7 +30,7 @@

# Copyright 2007 Google Inc. All Rights Reserved.

__version__ = '3.11.2'
__version__ = '3.11.4'

if __name__ != '__main__':
try:
Expand Down
2 changes: 1 addition & 1 deletion ruby/google-protobuf.gemspec
@@ -1,6 +1,6 @@
Gem::Specification.new do |s|
s.name = "google-protobuf"
s.version = "3.11.2"
s.version = "3.11.4"
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"
Expand Down
2 changes: 1 addition & 1 deletion src/Makefile.am
Expand Up @@ -18,7 +18,7 @@ else
PTHREAD_DEF =
endif

PROTOBUF_VERSION = 22:2:0
PROTOBUF_VERSION = 22:4:0

if GCC
# Turn on all warnings except for sign comparison (we ignore sign comparison
Expand Down

0 comments on commit 1370c73

Please sign in to comment.