Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge 3.2.x branch into master #2648

Merged
merged 36 commits into from
Jan 31, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
199d82f
Down-integrate internal changes to github.
TeBoring Dec 20, 2016
9cb253f
Down-integrate internal changes to github.
TeBoring Dec 20, 2016
a9cdd80
Update conformance test failure list.
TeBoring Dec 20, 2016
cf50240
Explicitly import used class in nano test to avoid random test fail.
TeBoring Dec 21, 2016
e02ff1a
Update _GNUC_VER to use the correct implementation of atomic operation
TeBoring Dec 21, 2016
c7cbf5f
maps_test.js: check whether Symbol is defined before using it (#2524)
Dec 21, 2016
f424c71
Added well_known_types_embed.cc to CLEANFILES so that it gets cleaned up
acozzette Dec 20, 2016
2d8a544
Updated Makefile.am to fix out-of-tree builds
acozzette Dec 20, 2016
2f38ce1
Added Bazel genrule for generating well_known_types_embed.cc
acozzette Dec 20, 2016
117f771
Update _GNUC_VER to use the correct implementation of atomic operatio…
TeBoring Dec 22, 2016
e230283
Add new js file in extra dist.
TeBoring Dec 27, 2016
f5cc1a5
Bump version number to 3.2.0
TeBoring Dec 28, 2016
da9fea1
Fixed issue with autoloading - Invalid paths (#2538)
NicklasWallgren Dec 28, 2016
911e84e
Merge pull request #2550 from TeBoring/3.2.x
xfxyjwf Dec 30, 2016
c871ce6
PHP fix int64 decoding (#2516)
Sufir Jan 8, 2017
d1fde36
Fix int64 decoding on 32-bit machines.
TeBoring Jan 8, 2017
a24ddc5
Fix warning in compiler/js/embed.cc
jbrianceau Dec 27, 2016
46dee43
Fix include in auto-generated well_known_types_embed.cc
jbrianceau Dec 23, 2016
77e434d
Fixed cross compilations with the Autotools build
acozzette Jan 3, 2017
64cbfab
Minor fix for autocreated object repeated fields and maps.
thomasvl Jan 4, 2017
83fb8c7
Fix generation of extending nested messages in JavaScript (#2439)
MarcusLongmuir Jan 7, 2017
e259b51
Fix generated code when there is no namespace but there is enum defin…
TeBoring Jan 10, 2017
60d4f8a
Decoding unknown field should succeed.
TeBoring Jan 10, 2017
531ebd9
Add embed.cc in src/Makefile.am to fix dist check.
TeBoring Jan 10, 2017
790fc93
Fixed "make distcheck" for the Autotools build
acozzette Jan 6, 2017
4447637
Remove redundent embed.cc from src/Makefile.am
TeBoring Jan 10, 2017
5750146
Update version number to 3.2.0-rc.1 (#2578)
TeBoring Jan 11, 2017
3e51b3d
Change protoc-artifacts version to 3.2.0-rc.1
TeBoring Jan 12, 2017
6eeb5c7
Update version number to 3.2.0rc2
TeBoring Jan 18, 2017
b22c6b0
Update change logs for 3.2.0 release.
TeBoring Jan 20, 2017
be83f46
Update php README
TeBoring Jan 20, 2017
d966879
Update upb, fixes some bugs (including a hash table problem). (#2611)
haberman Jan 23, 2017
d1f0939
Reverting deployment target to 7.0 (#2618)
davidair Jan 24, 2017
2c8346a
Fix typo that breaks builds on big-endian (#2632)
opoplawski Jan 26, 2017
593e917
Bump version number to 3.2.0
TeBoring Jan 27, 2017
1d02c51
Merge 3.2.x branch into master.
TeBoring Jan 31, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 77 additions & 5 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,75 @@
2017-01-23 version 3.2.0 (C++/Java/Python/PHP/Ruby/Objective-C/C#/JavaScript/Lite)
General
* Added protoc version number to protoc plugin protocol. It can be used by
protoc plugin to detect which version of protoc is used with the plugin and
mitigate known problems in certain version of protoc.

C++
* The default parsing byte size limit has been raised from 64MB to 2GB.
* Added rvalue setters for non-arena string fields.
* Enabled debug logging for Android.
* Fixed a double-free problem when using Reflection::SetAllocatedMessage()
with extension fields.
* Fixed several deterministic serialization bugs:
* MessageLite::SerializeAsString() now respects the global deterministic
serialization flag.
* Extension fields are serialized deterministically as well. Fixed protocol
compiler to correctly report importing-self as an error.
* Fixed FileDescriptor::DebugString() to print custom options correctly.
* Various performance/codesize optimizations and cleanups.

Java
* The default parsing byte size limit has been raised from 64MB to 2GB.
* Added recursion limit when parsing JSON.
* Fixed a bug that enumType.getDescriptor().getOptions() doesn't have custom
options.
* Fixed generated code to support field numbers up to 2^29-1.

Python
* You can now assign NumPy scalars/arrays (np.int32, np.int64) to protobuf
fields, and assigning other numeric types has been optimized for
performance.
* Pure-Python: message types are now garbage-collectable.
* Python/C++: a lot of internal cleanup/refactoring.

PHP (Alpha)
* For 64-bit integers type (int64/uint64/sfixed64/fixed64/sint64), use PHP
integer on 64-bit environment and PHP string on 32-bit environment.
* PHP generated code also conforms to PSR-4 now.
* Fixed ZTS build for c extension.
* Fixed c extension build on Mac.
* Fixed c extension build on 32-bit linux.
* Fixed the bug that message without namespace is not found in the descriptor
pool. (#2240)
* Fixed the bug that repeated field is not iterable in c extension.
* Message names Empty will be converted to GPBEmpty in generated code.
* Added phpdoc in generated files.
* The released API is almost stable. Unless there is large problem, we won't
change it. See
https://developers.google.com/protocol-buffers/docs/reference/php-generated
for more details.

Objective-C
* Added support for push/pop of the stream limit on CodedInputStream for
anyone doing manual parsing.

C#
* No changes.

Ruby
* Message objects now support #respond_to? for field getters/setters.
* You can now compare “message == non_message_object” and it will return false
instead of throwing an exception.
* JRuby: fixed #hashCode to properly reflect the values in the message.

Javascript
* Deserialization of repeated fields no longer has quadratic performance
behavior.
* UTF-8 encoding/decoding now properly supports high codepoints.
* Added convenience methods for some well-known types: Any, Struct, and
Timestamp. These make it easier to convert data between native JavaScript
types and the well-known protobuf types.

2016-09-23 version 3.1.0 (C++/Java/Python/PHP/Ruby/Objective-C/C#/JavaScript/Lite)
General
* Proto3 support in PHP (alpha).
Expand Down Expand Up @@ -40,23 +112,23 @@
APIs and share the same generated code. Users don’t need to re-generate
code for the same proto definition when they want to switch the
implementation later. The pure PHP package is included in the php/src
directory, and the c extension is included in the php/ext directory.
directory, and the c extension is included in the php/ext directory.

Both implementations provide idiomatic PHP APIs:
* All messages and enums are defined as PHP classes.
* All message fields can only be accessed via getter/setter.
* Both repeated field elements and map elements are stored in containers
that act like a normal PHP array.

Unlike several existing third-party PHP implementations for protobuf, our
implementations are built on a "strongly-typed" philosophy: message fields
and array/map containers will throw exceptions eagerly when values of the
incorrect type (not including those that can be type converted, e.g.,
double <-> integer <-> numeric string) are inserted.

Currently, pure PHP runtime supports php5.5, 5.6 and 7 on linux. C
extension runtime supports php5.5 and 5.6 on linux.

See php/README.md for more details about installment. See
https://developers.google.com/protocol-buffers/docs/phptutorial for more
details about APIs.
Expand Down
1 change: 1 addition & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -825,6 +825,7 @@ js_EXTRA_DIST= \
js/binary/decoder.js \
js/binary/decoder_test.js \
js/binary/encoder.js \
js/binary/message_test.js \
js/binary/proto_test.js \
js/binary/reader.js \
js/binary/reader_test.js \
Expand Down
4 changes: 2 additions & 2 deletions Protobuf.podspec
Original file line number Diff line number Diff line change
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.1.0'
s.version = '3.2.0'
s.summary = 'Protocol Buffers v.3 runtime library for Objective-C.'
s.homepage = 'https://github.com/google/protobuf'
s.license = 'New BSD'
Expand Down Expand Up @@ -34,7 +34,7 @@ Pod::Spec.new do |s|
s.user_target_xcconfig = { 'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=1' }
s.pod_target_xcconfig = { 'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=1' }

s.ios.deployment_target = '7.1'
s.ios.deployment_target = '7.0'
s.osx.deployment_target = '10.9'
s.watchos.deployment_target = '2.0'
s.requires_arc = false
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
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.1.0],[protobuf@googlegroups.com],[protobuf])
AC_INIT([Protocol Buffers],[3.2.0],[protobuf@googlegroups.com],[protobuf])

AM_MAINTAINER_MODE([enable])

Expand Down
2 changes: 1 addition & 1 deletion csharp/Google.Protobuf.Tools.nuspec
Original file line number Diff line number Diff line change
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.1.0</version>
<version>3.2.0</version>
<authors>Google Inc.</authors>
<owners>protobuf-packages</owners>
<licenseUrl>https://github.com/google/protobuf/blob/master/LICENSE</licenseUrl>
Expand Down
3 changes: 3 additions & 0 deletions csharp/src/Google.Protobuf/Reflection/Descriptor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1766,6 +1766,9 @@ internal enum Type {
[pbr::OriginalName("TYPE_STRING")] String = 9,
/// <summary>
/// Tag-delimited aggregate.
/// Group type is deprecated and not supported in proto3. However, Proto3
/// implementations should still be able to parse the group wire format and
/// treat group fields as unknown fields.
/// </summary>
[pbr::OriginalName("TYPE_GROUP")] Group = 10,
/// <summary>
Expand Down
10 changes: 8 additions & 2 deletions csharp/src/Google.Protobuf/WellKnownTypes/Type.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1311,7 +1311,10 @@ public Option Clone() {
public const int NameFieldNumber = 1;
private string name_ = "";
/// <summary>
/// The option's name. For example, `"java_package"`.
/// The option's name. For protobuf built-in options (options defined in
/// descriptor.proto), this is the short name. For example, `"map_entry"`.
/// For custom options, it should be the fully-qualified name. For example,
/// `"google.api.http"`.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string Name {
Expand All @@ -1325,7 +1328,10 @@ public string Name {
public const int ValueFieldNumber = 2;
private global::Google.Protobuf.WellKnownTypes.Any value_;
/// <summary>
/// The option's value. For example, `"com.google.protobuf"`.
/// The option's value packed in an Any message. If the value is a primitive,
/// the corresponding wrapper type defined in google/protobuf/wrappers.proto
/// should be used. If the value is an enum, it should be stored as an int32
/// value using the google.protobuf.Int32Value type.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public global::Google.Protobuf.WellKnownTypes.Any Value {
Expand Down
2 changes: 1 addition & 1 deletion csharp/src/Google.Protobuf/project.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "3.1.0",
"version": "3.2.0",
"title": "Google Protocol Buffers",
"description": "See project site for more info.",
"authors": [ "Google Inc." ],
Expand Down
2 changes: 1 addition & 1 deletion java/core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-parent</artifactId>
<version>3.1.0</version>
<version>3.2.0</version>
</parent>

<artifactId>protobuf-java</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ public abstract class AbstractMessageLite<
BuilderType extends AbstractMessageLite.Builder<MessageType, BuilderType>>
implements MessageLite {
protected int memoizedHashCode = 0;

@Override
public ByteString toByteString() {
try {
Expand Down
1 change: 1 addition & 0 deletions java/core/src/main/java/com/google/protobuf/FieldSet.java
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ public Iterator<Map.Entry<FieldDescriptorType, Object>> iterator() {
return fields.entrySet().iterator();
}


/**
* Useful for implementing
* {@link Message#hasField(Descriptors.FieldDescriptor)}.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public void mergeFrom(MapFieldLite<K, V> other) {

@Override public void clear() {
ensureMutable();
clear();
super.clear();
}

@Override public V put(K key, V value) {
Expand Down
21 changes: 12 additions & 9 deletions java/core/src/main/java/com/google/protobuf/SmallSortedMap.java
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ public Iterable<Map.Entry<K, V>> getOverflowEntries() {
overflowEntries.entrySet();
}


@Override
public int size() {
return entryList.size() + overflowEntries.size();
Expand Down Expand Up @@ -356,6 +357,7 @@ public Set<Map.Entry<K, V>> entrySet() {
return lazyEntrySet;
}


/**
* @throws UnsupportedOperationException if {@link #makeImmutable()} has
* has been called.
Expand Down Expand Up @@ -525,6 +527,7 @@ public void clear() {
}
}


/**
* Iterator implementation that switches from the entry array to the overflow
* entries appropriately.
Expand Down Expand Up @@ -617,43 +620,43 @@ static <T> Iterable<T> iterable() {
return (Iterable<T>) ITERABLE;
}
}

@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}

if (!(o instanceof SmallSortedMap)) {
return super.equals(o);
}

SmallSortedMap<?, ?> other = (SmallSortedMap<?, ?>) o;
final int size = size();
if (size != other.size()) {
return false;
}

// Best effort try to avoid allocating an entry set.
final int numArrayEntries = getNumArrayEntries();
if (numArrayEntries != other.getNumArrayEntries()) {
return entrySet().equals(other.entrySet());
}

for (int i = 0; i < numArrayEntries; i++) {
if (!getArrayEntryAt(i).equals(other.getArrayEntryAt(i))) {
return false;
}
}

if (numArrayEntries != size) {
return overflowEntries.equals(other.overflowEntries);
}


return true;
}

@Override
public int hashCode() {
int h = 0;
Expand Down
Loading