From 1349fb8b14936afc20ec348e1c6a9e7f8efd66a0 Mon Sep 17 00:00:00 2001 From: Feng Xiao Date: Fri, 15 Jul 2016 12:19:15 -0700 Subject: [PATCH 1/3] Added 3.0.0-beta-4 changelog. Change-Id: I997012e7e9b58d9ec8b2f59429d71c98d81aa40d --- CHANGES.txt | 80 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 3459cccfa9cf..f3524b866b41 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,83 @@ +2016-07-15 version 3.0.0-beta-4 (C++/Java/Python/Ruby/Objective-C/C#/JavaScript) + General + * Added a deterministic serialization API for C++ and Java. The deterministic + serialization guarantees that given a binary, equal messages will be + serialized to the same bytes. This allows applications like MapReduce to + group equal messages based on the serialized bytes. The deterministic + serialization is, however, NOT canonical across languages; it is also + unstable across different builds with schema changes due to unknown fields. + Users who need canonical serialization, e.g. persistent storage in a + canonical form, fingerprinting, etc, should define their own + canonicalization specification and implement the serializer using reflection + APIs rather than relying on this API. + * Added OneofOptions. You can now define custom options for oneof groups. + import "google/protobuf/descriptor.proto"; + extend google.protobuf.OneofOptions { + optional int32 my_oneof_extension = 12345; + } + message Foo { + oneof oneof_group { + (my_oneof_extension) = 54321; + ... + } + } + + C++ (beta) + * Introduced a deterministic serialization API in + CodedOutputStream::SetSerializationDeterministic(bool). See the notes about + deterministic serialization in the General section. + * Added google::protobuf::Map::swap() to swap two map fields. + * Fixed a memory leak when calling Reflection::ReleaseMessage() on a message + allocated on arena. + * Improved error reporting when parsing text format protos. + * JSON + - Added a new parser option to ignore unknown fields when parsing JSON. + - Added convenient methods for message to/from JSON conversion. + * Various performance optimizations. + + Java (beta) + * Introduced a deterministic serialization API in + CodedOutputStream#useDeterministicSerialization(). See the notes about + deterministic serialization in the General section. + * File option "java_generate_equals_and_hash" is now deprecated. equals() and + hashCode() methods are generated by default. + * Added a new JSON printer option "omittingInsignificantWhitespace" to produce + a more compact JSON output. The printer will pretty-print by default. + * Updated Java runtime to be compatible with 2.5.0/2.6.1 generated protos. + + Python (beta) + * Added support to pretty print Any messages in text format. + * Added a flag to ignore unknown fields when parsing JSON. + * Bugfix: "@type" field of a JSON Any message is now correctly put before + other fields. + + Objective-C (beta) + * Updated the code to support compiling with more compiler warnings + enabled. (Issue 1616) + * Exposing more detailed errors for parsing failures. (PR 1623) + * Small (breaking) change to the naming of some methods on the support classes + for map<>. There were collisions with the system provided KVO support, so + the names were changed to avoid those issues. (PR 1699) + * Fixed for proper Swift bridging of error handling during parsing. (PR 1712) + * Complete support for generating sources that will go into a Framework and + depend on generated sources from other Frameworks. (Issue 1457) + + C# (beta) + * RepeatedField optimizations. + * Support for .NET Core. + * Minor bug fixes. + * Ability to format a single value in JsonFormatter (advanced usage only). + * Modifications to attributes applied to generated code. + + Javascript (alpha) + * Maps now have a real map API instead of being treated as repeated fields. + * Well-known types are now provided in the google-protobuf package, and the + code generator knows to require() them from that package. + * Bugfix: non-canonical varints are correctly decoded. + + Ruby (alpha) + * Accessors for oneof fields now return default values instead of nil. + 2016-05-16 version 3.0.0-beta-3 (C++/Java/Python/Ruby/Nano/Objective-C/C#/JavaScript) General * Supported Proto3 lite-runtime in C++/Java for mobile platforms. From 3d9726f919cbbc403538c5a09649c6bf38561fef Mon Sep 17 00:00:00 2001 From: Feng Xiao Date: Fri, 15 Jul 2016 15:26:44 -0700 Subject: [PATCH 2/3] Mention Java lite in the changelog. Change-Id: Ic07a7c664930209974244c66885d672288982610 --- CHANGES.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index f3524b866b41..5c73be15371d 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -78,6 +78,10 @@ Ruby (alpha) * Accessors for oneof fields now return default values instead of nil. + Java Lite + * Java lite support is removed from protocol compiler. It will be supported + as a protocol compiler plugin in a separate code branch. + 2016-05-16 version 3.0.0-beta-3 (C++/Java/Python/Ruby/Nano/Objective-C/C#/JavaScript) General * Supported Proto3 lite-runtime in C++/Java for mobile platforms. From 82b43d1f41d6c374ebdd942dd86602736c2218e8 Mon Sep 17 00:00:00 2001 From: Feng Xiao Date: Mon, 18 Jul 2016 10:36:04 -0700 Subject: [PATCH 3/3] Remove Java deterministic API. Change-Id: I43f7e04a53d1445dfa86db310bdb18ceb446398c --- CHANGES.txt | 5 +---- .../src/main/java/com/google/protobuf/CodedOutputStream.java | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 5c73be15371d..04fa418efe60 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,6 +1,6 @@ 2016-07-15 version 3.0.0-beta-4 (C++/Java/Python/Ruby/Objective-C/C#/JavaScript) General - * Added a deterministic serialization API for C++ and Java. The deterministic + * Added a deterministic serialization API for C++. The deterministic serialization guarantees that given a binary, equal messages will be serialized to the same bytes. This allows applications like MapReduce to group equal messages based on the serialized bytes. The deterministic @@ -36,9 +36,6 @@ * Various performance optimizations. Java (beta) - * Introduced a deterministic serialization API in - CodedOutputStream#useDeterministicSerialization(). See the notes about - deterministic serialization in the General section. * File option "java_generate_equals_and_hash" is now deprecated. equals() and hashCode() methods are generated by default. * Added a new JSON printer option "omittingInsignificantWhitespace" to produce diff --git a/java/core/src/main/java/com/google/protobuf/CodedOutputStream.java b/java/core/src/main/java/com/google/protobuf/CodedOutputStream.java index 4f5a9b770e5b..e5515285de94 100644 --- a/java/core/src/main/java/com/google/protobuf/CodedOutputStream.java +++ b/java/core/src/main/java/com/google/protobuf/CodedOutputStream.java @@ -173,7 +173,7 @@ public static CodedOutputStream newInstance(ByteBuffer byteBuffer) { * maps are sorted on the lexicographical order of the UTF8 encoded keys. * */ - public final void useDeterministicSerialization() { + void useDeterministicSerialization() { serializationDeterministic = true; }