Permalink
Browse files

Merge branch '3.5.x' into 3.5.x-merge

  • Loading branch information...
acozzette committed Nov 30, 2017
2 parents 6de51ca + 94bb1ee commit a27da093393d3dc7301d27fe328284335cb98528
Showing with 291 additions and 252 deletions.
  1. +77 −1 CHANGES.txt
  2. +1 −1 Protobuf.podspec
  3. +0 −1 cmake/extract_includes.bat.in
  4. +1 −1 configure.ac
  5. +16 −0 conformance/conformance_test.cc
  6. +1 −1 csharp/Google.Protobuf.Tools.nuspec
  7. +1 −1 java/core/pom.xml
  8. +1 −1 java/pom.xml
  9. +1 −1 java/util/pom.xml
  10. +1 −1 js/package.json
  11. +9 −0 php/ext/google/protobuf/encode_decode.c
  12. +1 −0 php/ext/google/protobuf/message.c
  13. +19 −3 php/ext/google/protobuf/package.xml
  14. +9 −20 php/ext/google/protobuf/protobuf.h
  15. +3 −4 php/src/Google/Protobuf/Any.php
  16. +15 −5 php/src/Google/Protobuf/Internal/Message.php
  17. +7 −0 php/tests/encode_decode_test.php
  18. +1 −1 post_process_dist.sh
  19. +6 −5 protoc-artifacts/README.md
  20. +13 −0 protoc-artifacts/build-protoc.sh
  21. +3 −1 protoc-artifacts/build-zip.sh
  22. +1 −1 protoc-artifacts/pom.xml
  23. +1 −1 python/google/protobuf/__init__.py
  24. +10 −1 python/google/protobuf/descriptor_pool.py
  25. +1 −1 ruby/google-protobuf.gemspec
  26. +3 −4 src/Makefile.am
  27. +2 −2 src/google/protobuf/any.pb.h
  28. +2 −2 src/google/protobuf/api.pb.h
  29. +1 −1 src/google/protobuf/compiler/command_line_interface.cc
  30. +1 −1 src/google/protobuf/compiler/command_line_interface_unittest.cc
  31. +1 −1 src/google/protobuf/compiler/importer.cc
  32. +11 −6 src/google/protobuf/compiler/objectivec/objectivec_helpers.cc
  33. +27 −9 src/google/protobuf/compiler/php/php_generator.cc
  34. +9 −0 src/google/protobuf/compiler/php/php_generator.h
  35. +1 −1 src/google/protobuf/compiler/plugin.cc
  36. +2 −2 src/google/protobuf/compiler/plugin.pb.h
  37. +2 −2 src/google/protobuf/descriptor.pb.h
  38. +2 −2 src/google/protobuf/duration.pb.h
  39. +2 −2 src/google/protobuf/empty.pb.h
  40. +2 −2 src/google/protobuf/field_mask.pb.h
  41. +0 −3 src/google/protobuf/io/zero_copy_stream_impl.cc
  42. +0 −3 src/google/protobuf/io/zero_copy_stream_unittest.cc
  43. +1 −1 src/google/protobuf/message_unittest.cc
  44. +2 −2 src/google/protobuf/source_context.pb.h
  45. +2 −2 src/google/protobuf/struct.pb.h
  46. +2 −7 src/google/protobuf/stubs/atomicops.h
  47. +0 −122 src/google/protobuf/stubs/atomicops_internals_atomicword_compat.h
  48. +5 −5 src/google/protobuf/stubs/common.h
  49. +2 −2 src/google/protobuf/stubs/io_win32.cc
  50. +0 −6 src/google/protobuf/stubs/io_win32.h
  51. +2 −2 src/google/protobuf/stubs/io_win32_unittest.cc
  52. +1 −1 src/google/protobuf/testing/file.cc
  53. +1 −1 src/google/protobuf/testing/googletest.cc
  54. +2 −2 src/google/protobuf/timestamp.pb.h
  55. +2 −2 src/google/protobuf/type.pb.h
  56. +2 −2 src/google/protobuf/wrappers.pb.h
View
@@ -1,3 +1,79 @@
2017-11-13 version 3.5.0 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)
Planned Future Changes
* Make C++ implementation C++11 only: we plan to require C++11 to build
protobuf code starting from 3.6.0 release. Please join this github issue:
https://github.com/google/protobuf/issues/2780 to provide your feedback.
General
* Unknown fields are now preserved in proto3 for most of the language
implementations for proto3 by default. See the per-language section for
details.
* reserve keyword are now supported in enums
C++
* Proto3 messages are now preserving unknown fields by default. If you rely on
unknowns fields being dropped. Please use DiscardUnknownFields() explicitly.
* Deprecated the unsafe_arena_release_* and unsafe_arena_add_allocated_*
methods for string fields.
* Added move constructor and move assignment to RepeatedField,
RepeatedPtrField and google::protobuf::Any.
* Added perfect forwarding in Arena::CreateMessage
* In-progress experimental support for implicit weak fields with lite protos.
This feature allows the linker to strip out more unused messages and reduce
binary size.
* Various performance optimizations.
Java
* Proto3 messages are now preserving unknown fields by default. If you’d like
to drop unknown fields, please use the DiscardUnknownFieldsParser API. For
example:
Parser<Foo> parser = DiscardUnknownFieldsParser.wrap(Foo.parser());
Foo foo = parser.parseFrom(input);
* Added a new CodedInputStream decoder for Iterable<ByteBuffer> with direct
ByteBuffers.
* TextFormat now prints unknown length-delimited fields as messages if
possible.
* FieldMaskUtil.merge() no longer creates unnecessary empty messages when a
message field is unset in both source message and destination message.
* Various performance optimizations.
Python
* Proto3 messages are now preserving unknown fields by default. Use
message.DiscardUnknownFields() to drop unknown fields.
* Add FieldDescriptor.file in generated code.
* Add descriptor pool FindOneofByName in pure python.
* Change unknown enum values into unknown field set .
* Add more Python dict/list compatibility for Struct/ListValue.
* Add utf-8 support for text_format.Merge()/Parse().
* Support numeric unknown enum values for proto3 JSON format.
* Add warning for Unexpected end-group tag in cpp extension.
PHP
* Proto3 messages are now preserving unknown fields.
* Provide well known type messages in runtime.
* Add prefix ‘PB’ to generated class of reserved names.
* Fixed all conformance tests for encode/decode json in php runtime. C
extension needs more work.
Objective-C
* Fixed some issues around copying of messages with unknown fields and then
mutating the unknown fields in the copy.
C#
* Added unknown field support in JsonParser.
* Fixed oneof message field merge.
* Simplify parsing messages from array slices.
Ruby
* Unknown fields are now preserved by default.
* Fixed several bugs for segment fault.
Javascript
* Decoder can handle both paced and unpacked data no matter how the proto is
defined.
* Decoder now accept long varint for 32 bit integers.
2017-08-14 version 3.4.0 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)
Planned Future Changes
* There are some changes that are not included in this release but are planned
@@ -92,7 +168,7 @@
* Note: AppEngine 2.5 is deprecated on June 2017 that AppEngine 2.5 will
never update protobuf runtime. Users who depend on AppEngine 2.5 should use
old protoc.
PHP
* Support PHP generic services. Specify file option php_generic_service=true
to enable generating service interface.
View
@@ -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.4.1'
s.version = '3.5.0'
s.summary = 'Protocol Buffers v.3 runtime library for Objective-C.'
s.homepage = 'https://github.com/google/protobuf'
s.license = '3-Clause BSD License'
@@ -83,7 +83,6 @@ copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\stubs\atomicops.h" in
copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\stubs\atomicops_internals_arm64_gcc.h" include\google\protobuf\stubs\atomicops_internals_arm64_gcc.h
copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\stubs\atomicops_internals_arm_gcc.h" include\google\protobuf\stubs\atomicops_internals_arm_gcc.h
copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\stubs\atomicops_internals_arm_qnx.h" include\google\protobuf\stubs\atomicops_internals_arm_qnx.h
copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\stubs\atomicops_internals_atomicword_compat.h" include\google\protobuf\stubs\atomicops_internals_atomicword_compat.h
copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\stubs\atomicops_internals_generic_c11_atomic.h" include\google\protobuf\stubs\atomicops_internals_generic_c11_atomic.h
copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\stubs\atomicops_internals_generic_gcc.h" include\google\protobuf\stubs\atomicops_internals_generic_gcc.h
copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\stubs\atomicops_internals_mips_gcc.h" include\google\protobuf\stubs\atomicops_internals_mips_gcc.h
View
@@ -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.4.1],[protobuf@googlegroups.com],[protobuf])
AC_INIT([Protocol Buffers],[3.5.0],[protobuf@googlegroups.com],[protobuf])
AM_MAINTAINER_MODE([enable])
@@ -1842,6 +1842,14 @@ bool ConformanceTestSuite::RunSuite(ConformanceTestRunner* runner,
"optionalInt64": null,
"optionalUint32": null,
"optionalUint64": null,
"optionalSint32": null,
"optionalSint64": null,
"optionalFixed32": null,
"optionalFixed64": null,
"optionalSfixed32": null,
"optionalSfixed64": null,
"optionalFloat": null,
"optionalDouble": null,
"optionalBool": null,
"optionalString": null,
"optionalBytes": null,
@@ -1851,6 +1859,14 @@ bool ConformanceTestSuite::RunSuite(ConformanceTestRunner* runner,
"repeatedInt64": null,
"repeatedUint32": null,
"repeatedUint64": null,
"repeatedSint32": null,
"repeatedSint64": null,
"repeatedFixed32": null,
"repeatedFixed64": null,
"repeatedSfixed32": null,
"repeatedSfixed64": null,
"repeatedFloat": null,
"repeatedDouble": null,
"repeatedBool": null,
"repeatedString": null,
"repeatedBytes": null,
@@ -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.4.1</version>
<version>3.5.0</version>
<authors>Google Inc.</authors>
<owners>protobuf-packages</owners>
<licenseUrl>https://github.com/google/protobuf/blob/master/LICENSE</licenseUrl>
View
@@ -6,7 +6,7 @@
<parent>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-parent</artifactId>
<version>3.4.1</version>
<version>3.5.0</version>
</parent>
<artifactId>protobuf-java</artifactId>
View
@@ -11,7 +11,7 @@
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-parent</artifactId>
<version>3.4.1</version>
<version>3.5.0</version>
<packaging>pom</packaging>
<name>Protocol Buffers [Parent]</name>
View
@@ -6,7 +6,7 @@
<parent>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-parent</artifactId>
<version>3.4.1</version>
<version>3.5.0</version>
</parent>
<artifactId>protobuf-java-util</artifactId>
View
@@ -1,6 +1,6 @@
{
"name": "google-protobuf",
"version": "3.4.1",
"version": "3.5.0",
"description": "Protocol Buffers for JavaScript",
"main": "google-protobuf.js",
"files": [
@@ -1614,3 +1614,12 @@ PHP_METHOD(Message, mergeFromJsonString) {
stackenv_uninit(&se);
}
}
PHP_METHOD(Message, discardUnknownFields) {
MessageHeader* msg = UNBOX(MessageHeader, getThis());
stringsink* unknown = DEREF(message_data(msg), 0, stringsink*);
if (unknown != NULL) {
stringsink_uninit(unknown);
DEREF(message_data(msg), 0, stringsink*) = NULL;
}
}
@@ -42,6 +42,7 @@ static void hex_to_binary(const char* hex, char** binary, int* binary_len);
static zend_function_entry message_methods[] = {
PHP_ME(Message, clear, NULL, ZEND_ACC_PUBLIC)
PHP_ME(Message, discardUnknownFields, NULL, ZEND_ACC_PUBLIC)
PHP_ME(Message, serializeToString, NULL, ZEND_ACC_PUBLIC)
PHP_ME(Message, mergeFromString, NULL, ZEND_ACC_PUBLIC)
PHP_ME(Message, serializeToJsonString, NULL, ZEND_ACC_PUBLIC)
@@ -10,11 +10,11 @@
<email>protobuf-opensource@google.com</email>
<active>yes</active>
</lead>
<date>2017-09-14</date>
<date>2017-11-15</date>
<time>11:02:07</time>
<version>
<release>3.4.1</release>
<api>3.4.1</api>
<release>3.5.0</release>
<api>3.5.0</api>
</version>
<stability>
<release>stable</release>
@@ -165,6 +165,22 @@ GA release.
<time>11:02:07</time>
<license uri="https://opensource.org/licenses/BSD-3-Clause">3-Clause BSD License</license>
<notes>
GA release.
</notes>
</release>
<release>
<version>
<release>3.5.0</release>
<api>3.5.0</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
<date>2017-11-15</date>
<time>11:02:07</time>
<license uri="https://opensource.org/licenses/BSD-3-Clause">3-Clause BSD License</license>
<notes>
GA release.
</notes>
</release>
@@ -37,7 +37,7 @@
#include "upb.h"
#define PHP_PROTOBUF_EXTNAME "protobuf"
#define PHP_PROTOBUF_VERSION "3.4.1"
#define PHP_PROTOBUF_VERSION "3.5.0"
#define MAX_LENGTH_OF_INT64 20
#define SIZEOF_INT64 8
@@ -608,48 +608,36 @@ typedef struct Api Api;
typedef struct BoolValue BoolValue;
typedef struct BytesValue BytesValue;
typedef struct Descriptor Descriptor;
typedef struct Descriptor Descriptor;
typedef struct DescriptorPool DescriptorPool;
typedef struct DoubleValue DoubleValue;
typedef struct Duration Duration;
typedef struct Enum Enum;
typedef struct EnumDescriptor EnumDescriptor;
typedef struct EnumDescriptor EnumDescriptor;
typedef struct EnumValue EnumValue;
typedef struct EnumValueDescriptor EnumValueDescriptor;
typedef struct Enum Enum;
typedef struct EnumValueDescriptor EnumValueDescriptor;
typedef struct Field Field;
typedef struct FieldDescriptor FieldDescriptor;
typedef struct FieldDescriptor FieldDescriptor;
typedef struct FieldMask FieldMask;
typedef struct EnumValue EnumValue;
typedef struct Field_Cardinality Field_Cardinality;
typedef struct FieldDescriptor FieldDescriptor;
typedef struct Field Field;
typedef struct Field_Kind Field_Kind;
typedef struct FieldMask FieldMask;
typedef struct FloatValue FloatValue;
typedef struct GPBEmpty GPBEmpty;
typedef struct Int32Value Int32Value;
typedef struct Int64Value Int64Value;
typedef struct InternalDescriptorPool InternalDescriptorPool;
typedef struct ListValue ListValue;
typedef struct Map Map;
typedef struct Map Map;
typedef struct MapIter MapIter;
typedef struct MapIter MapIter;
typedef struct Map Map;
typedef struct MessageField MessageField;
typedef struct MessageField MessageField;
typedef struct MessageHeader MessageHeader;
typedef struct MessageHeader MessageHeader;
typedef struct MessageLayout MessageLayout;
typedef struct MessageLayout MessageLayout;
typedef struct Method Method;
typedef struct Mixin Mixin;
typedef struct NullValue NullValue;
typedef struct Oneof Oneof;
typedef struct Oneof Oneof;
typedef struct Option Option;
typedef struct RepeatedField RepeatedField;
typedef struct RepeatedField RepeatedField;
typedef struct RepeatedFieldIter RepeatedFieldIter;
typedef struct RepeatedFieldIter RepeatedFieldIter;
typedef struct RepeatedField RepeatedField;
typedef struct SourceContext SourceContext;
typedef struct StringValue StringValue;
typedef struct Struct Struct;
@@ -969,6 +957,7 @@ PHP_METHOD(Message, serializeToString);
PHP_METHOD(Message, mergeFromString);
PHP_METHOD(Message, serializeToJsonString);
PHP_METHOD(Message, mergeFromJsonString);
PHP_METHOD(Message, discardUnknownFields);
// -----------------------------------------------------------------------------
// Type check / conversion.
@@ -4,7 +4,6 @@
namespace Google\Protobuf;
use Google\Protobuf\Internal\DescriptorPool;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\GPBUtil;
use Google\Protobuf\Internal\Message;
@@ -217,7 +216,7 @@ public function unpack()
substr($this->type_url, $url_prifix_len);
// Create message according to fully qualified name.
$pool = DescriptorPool::getGeneratedPool();
$pool = \Google\Protobuf\Internal\DescriptorPool::getGeneratedPool();
$desc = $pool->getDescriptorByProtoName( ".".$fully_qualifed_name);
if (is_null($desc)) {
throw new \Exception("Class ".$fully_qualifed_name
@@ -248,7 +247,7 @@ public function pack($msg)
$this->value = $msg->serializeToString();
// Set type url.
$pool = DescriptorPool::getGeneratedPool();
$pool = \Google\Protobuf\Internal\DescriptorPool::getGeneratedPool();
$desc = $pool->getDescriptorByClassName(get_class($msg));
$fully_qualifed_name = $desc->getFullName();
$this->type_url = GPBUtil::TYPE_URL_PREFIX.substr(
@@ -262,7 +261,7 @@ public function pack($msg)
*/
public function is($klass)
{
$pool = DescriptorPool::getGeneratedPool();
$pool = \Google\Protobuf\Internal\DescriptorPool::getGeneratedPool();
$desc = $pool->getDescriptorByClassName($klass);
$fully_qualifed_name = $desc->getFullName();
$type_url = GPBUtil::TYPE_URL_PREFIX.substr(
Oops, something went wrong.

0 comments on commit a27da09

Please sign in to comment.