Skip to content

Commit ba4e547

Browse files
authored
Merge pull request protocolbuffers#3529 from pherl/merge3.4.x
Merge 3.4.x into master
2 parents 472f700 + 139775c commit ba4e547

File tree

310 files changed

+21088
-8336
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

310 files changed

+21088
-8336
lines changed

BUILD

+2-4
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ cc_library(
9797
"src/google/protobuf/arena.cc",
9898
"src/google/protobuf/arenastring.cc",
9999
"src/google/protobuf/extension_set.cc",
100+
"src/google/protobuf/generated_message_table_driven_lite.cc",
100101
"src/google/protobuf/generated_message_util.cc",
101102
"src/google/protobuf/io/coded_stream.cc",
102103
"src/google/protobuf/io/zero_copy_stream.cc",
@@ -161,7 +162,6 @@ cc_library(
161162
"src/google/protobuf/service.cc",
162163
"src/google/protobuf/source_context.pb.cc",
163164
"src/google/protobuf/struct.pb.cc",
164-
"src/google/protobuf/stubs/io_win32.cc",
165165
"src/google/protobuf/stubs/mathlimits.cc",
166166
"src/google/protobuf/stubs/substitute.cc",
167167
"src/google/protobuf/text_format.cc",
@@ -229,7 +229,6 @@ RELATIVE_WELL_KNOWN_PROTOS = [
229229
"google/protobuf/any.proto",
230230
"google/protobuf/api.proto",
231231
"google/protobuf/compiler/plugin.proto",
232-
"google/protobuf/compiler/profile.proto",
233232
"google/protobuf/descriptor.proto",
234233
"google/protobuf/duration.proto",
235234
"google/protobuf/empty.proto",
@@ -374,7 +373,6 @@ cc_library(
374373
"src/google/protobuf/compiler/php/php_generator.cc",
375374
"src/google/protobuf/compiler/plugin.cc",
376375
"src/google/protobuf/compiler/plugin.pb.cc",
377-
"src/google/protobuf/compiler/profile.pb.cc",
378376
"src/google/protobuf/compiler/python/python_generator.cc",
379377
"src/google/protobuf/compiler/ruby/ruby_generator.cc",
380378
"src/google/protobuf/compiler/subprocess.cc",
@@ -473,7 +471,6 @@ COMMON_TEST_SRCS = [
473471
# AUTOGEN(common_test_srcs)
474472
"src/google/protobuf/arena_test_util.cc",
475473
"src/google/protobuf/map_test_util.cc",
476-
"src/google/protobuf/stubs/io_win32.cc",
477474
"src/google/protobuf/test_util.cc",
478475
"src/google/protobuf/testing/file.cc",
479476
"src/google/protobuf/testing/googletest.cc",
@@ -513,6 +510,7 @@ cc_test(
513510
"src/google/protobuf/arenastring_unittest.cc",
514511
"src/google/protobuf/compiler/command_line_interface_unittest.cc",
515512
"src/google/protobuf/compiler/cpp/cpp_bootstrap_unittest.cc",
513+
"src/google/protobuf/compiler/cpp/cpp_move_unittest.cc",
516514
"src/google/protobuf/compiler/cpp/cpp_plugin_unittest.cc",
517515
"src/google/protobuf/compiler/cpp/cpp_unittest.cc",
518516
"src/google/protobuf/compiler/cpp/metadata_test.cc",

CHANGES.txt

+132
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,135 @@
1+
2017-08-14 version 3.4.0 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)
2+
Planned Future Changes
3+
* There are some changes that are not included in this release but are planned
4+
for the near future
5+
- Preserve unknown fields in proto3: We are going to bring unknown fields
6+
back into proto3. In this release, some languages start to support
7+
preserving unknown fields in proto3, controlled by flags/options. Some
8+
languages also introduce explicit APIs to drop unknown fields for
9+
migration. Please read the change log sections by languages for details.
10+
For general timeline and plan:
11+
12+
https://docs.google.com/document/d/1KMRX-G91Aa-Y2FkEaHeeviLRRNblgIahbsk4wA14gRk/view
13+
14+
For issues and discussions:
15+
16+
https://github.com/google/protobuf/issues/272
17+
18+
- Make C++ implementation C++11 only: we plan to require C++11 to build
19+
protobuf code starting from 3.5.0 or 3.6.0 release, after unknown fields
20+
semantic changes are finished. Please join this
21+
github issue:
22+
23+
https://github.com/google/protobuf/issues/2780
24+
25+
to provide your feedback.
26+
27+
General
28+
* Extension ranges now accept options and are customizable.
29+
* "reserve" keyword now supports “max” in field number ranges,
30+
e.g. reserve 1000 to max;
31+
32+
C++
33+
* Proto3 messages are now able to preserve unknown fields. The default
34+
behavior is still to drop unknowns, which will be flipped in a future
35+
release. If you rely on unknowns fields being dropped. Please use
36+
Message::DiscardUnknownFields() explicitly.
37+
* Packable proto3 fields are now packed by default in serialization.
38+
* Following C++11 features are introduced when C++11 is available:
39+
- move-constructor and move-assignment are introduced to messages
40+
- Repeated fields constructor now takes std::initializer_list
41+
- rvalue setters are introduced for string fields
42+
* Experimental Table-Driven parsing and serialization available to test. To
43+
enable it, pass in table_driven_parsing table_driven_serialization protoc
44+
generator flags for C++
45+
46+
$ protoc --cpp_out=table_driven_parsing,table_driven_serialization:./ \
47+
test.proto
48+
49+
* lite generator parameter supported by the generator. Once set, all generated
50+
files, use lite runtime regardless of the optimizer_for setting in the
51+
.proto file.
52+
* Various optimizations to make C++ code more performant on PowerPC platform
53+
* Fixed maps data corruption when the maps are modified by both reflection API
54+
and generated API.
55+
* Deterministic serialization on maps reflection now uses stable sort.
56+
* file() accessors are introduced to various *Descriptor classes to make
57+
writing template function easier.
58+
* ByteSize() and SpaceUsed() are deprecated.Use ByteSizeLong() and
59+
SpaceUsedLong() instead
60+
* Consistent hash function is used for maps in DEBUG and NDEBUG build.
61+
* "using namespace std" is removed from stubs/common.h
62+
* Various performance optimizations and bug fixes
63+
64+
Java
65+
* Introduced new parser API DiscardUnknownFieldsParser in preparation of
66+
proto3 unknown fields preservation change. Users who want to drop unknown
67+
fields should migrate to use this new parser API. For example:
68+
69+
Parser<Foo> parser = DiscardUnknownFieldsParser.wrap(Foo.parser());
70+
Foo foo = parser.parseFrom(input);
71+
72+
* Introduced new TextFormat API printUnicodeFieldValue() that prints field
73+
value without escaping unicode characters.
74+
* Added Durations.compare(Duration, Duration) and
75+
Timestamps.compare(Timestamp, Timestamp).
76+
* JsonFormat now accepts base64url encoded bytes fields.
77+
* Optimized CodedInputStream to do less copies when parsing large bytes
78+
fields.
79+
* Optimized TextFormat to allocate less memory when printing.
80+
81+
Python
82+
* SerializeToString API is changed to SerializeToString(self, **kwargs),
83+
deterministic parameter is accepted for deterministic serialization.
84+
* Added sort_keys parameter in json format to make the output deterministic.
85+
* Added indent parameter in json format.
86+
* Added extension support in json format.
87+
* Added __repr__ support for repeated field in cpp implementation.
88+
* Added file in FieldDescriptor.
89+
* Added pretty-print filter to text format.
90+
* Services and method descriptors are always printed even if generic_service
91+
option is turned off.
92+
* Note: AppEngine 2.5 is deprecated on June 2017 that AppEngine 2.5 will
93+
never update protobuf runtime. Users who depend on AppEngine 2.5 should use
94+
old protoc.
95+
96+
PHP
97+
* Support PHP generic services. Specify file option php_generic_service=true
98+
to enable generating service interface.
99+
* Message, repeated and map fields setters take value instead of reference.
100+
* Added map iterator in c extension.
101+
* Support json  encode/decode.
102+
* Added more type info in getter/setter phpdoc
103+
* Fixed the problem that c extension and php implementation cannot be used
104+
together.
105+
* Added file option php_namespace to use custom php namespace instead of
106+
package.
107+
* Added fluent setter.
108+
* Added descriptor API in runtime for custom encode/decode.
109+
* Various bug fixes.
110+
111+
Objective-C
112+
* Fix for GPBExtensionRegistry copying and add tests.
113+
* Optimize GPBDictionary.m codegen to reduce size of overall library by 46K
114+
per architecture.
115+
* Fix some cases of reading of 64bit map values.
116+
* Properly error on a tag with field number zero.
117+
* Preserve unknown fields in proto3 syntax files.
118+
* Document the exceptions on some of the writing apis.
119+
120+
C#
121+
* Implemented IReadOnlyDictionary<K,V> in MapField<K,V>
122+
* Added TryUnpack method for Any message in addition to Unpack.
123+
* Converted C# projects to MSBuild (csproj) format.
124+
125+
Ruby
126+
* Several bug fixes.
127+
128+
Javascript
129+
* Added support of field option js_type. Now one can specify the JS type of a
130+
64-bit integer field to be string in the generated code by adding option
131+
[jstype = JS_STRING] on the field.
132+
1133
2017-04-05 version 3.3.0 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)
2134
Planned Future Changes
3135
* There are some changes that are not included in this release but are

Makefile.am

+26-1
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@ java_EXTRA_DIST=
207207
java/core/src/main/java/com/google/protobuf/ByteString.java \
208208
java/core/src/main/java/com/google/protobuf/CodedInputStream.java \
209209
java/core/src/main/java/com/google/protobuf/CodedOutputStream.java \
210+
java/core/src/main/java/com/google/protobuf/DiscardUnknownFieldsParser.java \
210211
java/core/src/main/java/com/google/protobuf/Descriptors.java \
211212
java/core/src/main/java/com/google/protobuf/DoubleArrayList.java \
212213
java/core/src/main/java/com/google/protobuf/DynamicMessage.java \
@@ -281,6 +282,7 @@ java_EXTRA_DIST=
281282
java/core/src/test/java/com/google/protobuf/CodedOutputStreamTest.java \
282283
java/core/src/test/java/com/google/protobuf/DeprecatedFieldTest.java \
283284
java/core/src/test/java/com/google/protobuf/DescriptorsTest.java \
285+
java/core/src/test/java/com/google/protobuf/DiscardUnknownFieldsTest.java \
284286
java/core/src/test/java/com/google/protobuf/DoubleArrayListTest.java \
285287
java/core/src/test/java/com/google/protobuf/DynamicMessageTest.java \
286288
java/core/src/test/java/com/google/protobuf/EnumTest.java \
@@ -317,6 +319,7 @@ java_EXTRA_DIST=
317319
java/core/src/test/java/com/google/protobuf/SingleFieldBuilderV3Test.java \
318320
java/core/src/test/java/com/google/protobuf/SmallSortedMapTest.java \
319321
java/core/src/test/java/com/google/protobuf/TestBadIdentifiers.java \
322+
java/core/src/test/java/com/google/protobuf/TestBadIdentifiersLite.java \
320323
java/core/src/test/java/com/google/protobuf/TestUtil.java \
321324
java/core/src/test/java/com/google/protobuf/TestUtilLite.java \
322325
java/core/src/test/java/com/google/protobuf/TextFormatParseInfoTreeTest.java \
@@ -756,6 +759,7 @@ python_EXTRA_DIST= \
756759
python/google/protobuf/json_format.py \
757760
python/google/protobuf/message.py \
758761
python/google/protobuf/message_factory.py \
762+
python/google/protobuf/python_protobuf.h \
759763
python/google/protobuf/proto_builder.py \
760764
python/google/protobuf/pyext/README \
761765
python/google/protobuf/pyext/__init__.py \
@@ -785,13 +789,13 @@ python_EXTRA_DIST= \
785789
python/google/protobuf/pyext/repeated_scalar_container.h \
786790
python/google/protobuf/pyext/safe_numerics.h \
787791
python/google/protobuf/pyext/scoped_pyobject_ptr.h \
788-
python/google/protobuf/python_protobuf.h \
789792
python/google/protobuf/reflection.py \
790793
python/google/protobuf/service.py \
791794
python/google/protobuf/service_reflection.py \
792795
python/google/protobuf/symbol_database.py \
793796
python/google/protobuf/text_encoding.py \
794797
python/google/protobuf/text_format.py \
798+
python/release.sh \
795799
python/mox.py \
796800
python/setup.cfg \
797801
python/setup.py \
@@ -911,6 +915,27 @@ js_EXTRA_DIST= \
911915
js/compatibility_tests/v3.0.0/testempty.proto \
912916
js/compatibility_tests/v3.0.0/test.proto \
913917
js/compatibility_tests/v3.0.0/test.sh \
918+
js/compatibility_tests/v3.1.0/testempty.proto \
919+
js/compatibility_tests/v3.1.0/testbinary.proto \
920+
js/compatibility_tests/v3.1.0/test5.proto \
921+
js/compatibility_tests/v3.1.0/test4.proto \
922+
js/compatibility_tests/v3.1.0/test3.proto \
923+
js/compatibility_tests/v3.1.0/test2.proto \
924+
js/compatibility_tests/v3.1.0/test.proto \
925+
js/compatibility_tests/v3.1.0/proto3_test.proto \
926+
js/compatibility_tests/v3.1.0/proto3_test.js \
927+
js/compatibility_tests/v3.1.0/message_test.js \
928+
js/compatibility_tests/v3.1.0/maps_test.js \
929+
js/compatibility_tests/v3.1.0/debug_test.js \
930+
js/compatibility_tests/v3.1.0/data.proto \
931+
js/compatibility_tests/v3.1.0/commonjs/test7/test7.proto \
932+
js/compatibility_tests/v3.1.0/commonjs/test6/test6.proto \
933+
js/compatibility_tests/v3.1.0/binary/writer_test.js \
934+
js/compatibility_tests/v3.1.0/binary/utils_test.js \
935+
js/compatibility_tests/v3.1.0/binary/reader_test.js \
936+
js/compatibility_tests/v3.1.0/binary/proto_test.js \
937+
js/compatibility_tests/v3.1.0/binary/decoder_test.js \
938+
js/compatibility_tests/v3.1.0/binary/arith_test.js \
914939
js/data.proto \
915940
js/debug.js \
916941
js/debug_test.js \

Protobuf.podspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# dependent projects use the :git notation to refer to the library.
66
Pod::Spec.new do |s|
77
s.name = 'Protobuf'
8-
s.version = '3.3.2'
8+
s.version = '3.4.0'
99
s.summary = 'Protocol Buffers v.3 runtime library for Objective-C.'
1010
s.homepage = 'https://github.com/google/protobuf'
1111
s.license = '3-Clause BSD License'

cmake/extract_includes.bat.in

+1-3
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\any.h" include\google
1818
copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\any.pb.h" include\google\protobuf\any.pb.h
1919
copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\api.pb.h" include\google\protobuf\api.pb.h
2020
copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\arena.h" include\google\protobuf\arena.h
21+
copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\arena_impl.h" include\google\protobuf\arena_impl.h
2122
copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\arenastring.h" include\google\protobuf\arenastring.h
2223
copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\compiler\code_generator.h" include\google\protobuf\compiler\code_generator.h
2324
copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\compiler\command_line_interface.h" include\google\protobuf\compiler\command_line_interface.h
@@ -36,7 +37,6 @@ copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\compiler\parser.h" in
3637
copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\compiler\php\php_generator.h" include\google\protobuf\compiler\php\php_generator.h
3738
copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\compiler\plugin.h" include\google\protobuf\compiler\plugin.h
3839
copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\compiler\plugin.pb.h" include\google\protobuf\compiler\plugin.pb.h
39-
copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\compiler\profile.pb.h" include\google\protobuf\compiler\profile.pb.h
4040
copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\compiler\python\python_generator.h" include\google\protobuf\compiler\python\python_generator.h
4141
copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\compiler\ruby\ruby_generator.h" include\google\protobuf\compiler\ruby\ruby_generator.h
4242
copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\descriptor.h" include\google\protobuf\descriptor.h
@@ -52,7 +52,6 @@ copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\generated_enum_util.h
5252
copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\generated_message_reflection.h" include\google\protobuf\generated_message_reflection.h
5353
copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\generated_message_table_driven.h" include\google\protobuf\generated_message_table_driven.h
5454
copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\generated_message_util.h" include\google\protobuf\generated_message_util.h
55-
copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\generated_message_table_driven.h" include\google\protobuf\generated_message_table_driven.h
5655
copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\has_bits.h" include\google\protobuf\has_bits.h
5756
copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\io\coded_stream.h" include\google\protobuf\io\coded_stream.h
5857
copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\io\gzip_stream.h" include\google\protobuf\io\gzip_stream.h
@@ -100,7 +99,6 @@ copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\stubs\casts.h" includ
10099
copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\stubs\common.h" include\google\protobuf\stubs\common.h
101100
copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\stubs\fastmem.h" include\google\protobuf\stubs\fastmem.h
102101
copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\stubs\hash.h" include\google\protobuf\stubs\hash.h
103-
copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\stubs\io_win32.h" include\google\protobuf\stubs\io_win32.h
104102
copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\stubs\logging.h" include\google\protobuf\stubs\logging.h
105103
copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\stubs\macros.h" include\google\protobuf\stubs\macros.h
106104
copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\stubs\mutex.h" include\google\protobuf\stubs\mutex.h

cmake/libprotobuf-lite.cmake

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ set(libprotobuf_lite_files
22
${protobuf_source_dir}/src/google/protobuf/arena.cc
33
${protobuf_source_dir}/src/google/protobuf/arenastring.cc
44
${protobuf_source_dir}/src/google/protobuf/extension_set.cc
5+
${protobuf_source_dir}/src/google/protobuf/generated_message_table_driven_lite.cc
56
${protobuf_source_dir}/src/google/protobuf/generated_message_util.cc
67
${protobuf_source_dir}/src/google/protobuf/io/coded_stream.cc
78
${protobuf_source_dir}/src/google/protobuf/io/zero_copy_stream.cc

0 commit comments

Comments
 (0)