Skip to content
This repository was archived by the owner on Jan 11, 2024. It is now read-only.

Commit 0acead4

Browse files
committed
Update protobuf to latest master at a64497c and apply @laszlocsomor's latest changes from protocolbuffers/protobuf#2969 on top of it.
Change-Id: Ie49c5dcac06e370c5ab3863dc061513531ec8c0d
1 parent de48883 commit 0acead4

File tree

380 files changed

+22232
-7098
lines changed

Some content is hidden

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

380 files changed

+22232
-7098
lines changed
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
sudo: required
2+
dist: trusty
3+
# Note: travis currently does not support listing more than one language so
4+
# this cheats and claims to only be cpp. If they add multiple language
5+
# support, this should probably get updated to install steps and/or
6+
# rvm/gemfile/jdk/etc. entries rather than manually doing the work.
7+
language: cpp
8+
os:
9+
- osx
10+
# The Objective C build needs Xcode 7.0 or later.
11+
osx_image: xcode8.1
12+
script:
13+
- ./tests.sh $CONFIG
14+
env:
15+
- CONFIG=cpp
16+
- CONFIG=cpp_distcheck
17+
- CONFIG=golang
18+
- CONFIG=java_jdk7
19+
- CONFIG=java_oracle7
20+
- CONFIG=javanano_jdk7
21+
- CONFIG=javanano_oracle7
22+
- CONFIG=javascript
23+
# iOS build log was starting to choke travis UI, so split to cover the
24+
# Xcode Debug and Release Configurations independently.
25+
- CONFIG=objectivec_ios_debug
26+
- CONFIG=objectivec_ios_release
27+
- CONFIG=objectivec_osx
28+
- CONFIG=objectivec_cocoapods_integration
29+
- CONFIG=python
30+
- CONFIG=python_cpp
31+
- CONFIG=ruby21
32+
- CONFIG=ruby22
33+
- CONFIG=jruby
34+
- CONFIG=php5.6_mac
35+
- CONFIG=php7.0_mac
36+
matrix:
37+
exclude:
38+
# It's nontrivial to programmatically install a new JDK from the command
39+
# line on OS X, so we rely on testing on Linux for Java code.
40+
- os: osx
41+
env: CONFIG=java_jdk7
42+
- os: osx
43+
env: CONFIG=java_oracle7
44+
- os: osx
45+
env: CONFIG=javanano_jdk7
46+
- os: osx
47+
env: CONFIG=javanano_oracle7
48+
# Requires installing golang, currently travis.sh is doing that with apt-get
49+
# which doesn't work on OS X.
50+
- os: osx
51+
env: CONFIG=golang
52+
include:
53+
# The dotnet environment requires Ubuntu 14.04 or 16.04. This
54+
# configuration is effectively an "extra" one, outside the
55+
# autogenerated matrix.
56+
- os: linux
57+
env: CONFIG=csharp
58+
dist: trusty
59+
# This test is kept on travis because it doesn't play nicely with other
60+
# tests on jenkins running in parallel.
61+
- os: linux
62+
env: CONFIG=cpp_distcheck
63+
# The Java compatibility test currently only runs on Linux because it will
64+
# fetch pre-built Linux protoc binaries in the test.
65+
- os: linux
66+
env: CONFIG=java_compatibility
67+
# The Python compatibility test currently only runs on Linux because it will
68+
# fetch pre-built Linux protoc binaries in the test.
69+
- os: linux
70+
env: CONFIG=python_compatibility
71+
allow_failures:
72+
# These currently do not work on OS X but are being worked on by @haberman.
73+
- os: osx
74+
env: CONFIG=ruby22
75+
- os: osx
76+
env: CONFIG=jruby
77+
# https://github.com/google/protobuf/issues/1253 - Started failing when
78+
# we moved to an OS X image that is 10.11.
79+
- os: osx
80+
env: CONFIG=python_cpp
81+
# Mark the iOS test as flakey as xcodebuild some times fails to start the
82+
# iOS Simulator.
83+
- os: osx
84+
env: CONFIG=objectivec_ios_debug
85+
- os: osx
86+
env: CONFIG=objectivec_ios_release
87+
notifications:
88+
email: false

third_party/protobuf/3.2.0/BUILD

Lines changed: 97 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ filegroup(
2626

2727
java_import(
2828
name = "protobuf_java_util",
29-
jars = ["protobuf-java-util-3.2.0.jar"],
29+
jars = ["libprotobuf_java_util.jar"],
3030
exports = [
3131
"//third_party:gson",
3232
],
@@ -35,21 +35,21 @@ java_import(
3535

3636
java_import(
3737
name = "protobuf_java",
38-
jars = ["protobuf-java-3.2.0.jar"],
38+
jars = ["libprotobuf_java.jar"],
3939
visibility = ["//visibility:public"],
4040
)
4141

4242
# For bootstrapping JavaBuilder
4343
filegroup(
4444
name = "protobuf-jars",
45-
srcs = ["protobuf-java-3.2.0.jar"],
45+
srcs = ["libprotobuf_java.jar"],
4646
visibility = ["//visibility:public"],
4747
)
4848

4949
################################################################################
5050
# The below build rules are a copy of the upstream protobuf BUILD file with
51-
# Java support removed.
52-
################################################################################
51+
# # Java support removed.
52+
# ################################################################################
5353

5454
################################################################################
5555
# Protobuf Runtime Library
@@ -255,6 +255,7 @@ RELATIVE_WELL_KNOWN_PROTOS = [
255255
"google/protobuf/any.proto",
256256
"google/protobuf/api.proto",
257257
"google/protobuf/compiler/plugin.proto",
258+
"google/protobuf/compiler/profile.proto",
258259
"google/protobuf/descriptor.proto",
259260
"google/protobuf/duration.proto",
260261
"google/protobuf/empty.proto",
@@ -399,6 +400,7 @@ cc_library(
399400
"src/google/protobuf/compiler/php/php_generator.cc",
400401
"src/google/protobuf/compiler/plugin.cc",
401402
"src/google/protobuf/compiler/plugin.pb.cc",
403+
"src/google/protobuf/compiler/profile.pb.cc",
402404
"src/google/protobuf/compiler/python/python_generator.cc",
403405
"src/google/protobuf/compiler/ruby/ruby_generator.cc",
404406
"src/google/protobuf/compiler/subprocess.cc",
@@ -450,6 +452,9 @@ RELATIVE_TEST_PROTOS = [
450452
"google/protobuf/unittest_enormous_descriptor.proto",
451453
"google/protobuf/unittest_import.proto",
452454
"google/protobuf/unittest_import_public.proto",
455+
"google/protobuf/unittest_lazy_dependencies.proto",
456+
"google/protobuf/unittest_lazy_dependencies_custom_option.proto",
457+
"google/protobuf/unittest_lazy_dependencies_enum.proto",
453458
"google/protobuf/unittest_lite_imports_nonlite.proto",
454459
"google/protobuf/unittest_mset.proto",
455460
"google/protobuf/unittest_mset_wire_format.proto",
@@ -494,6 +499,7 @@ COMMON_TEST_SRCS = [
494499
# AUTOGEN(common_test_srcs)
495500
"src/google/protobuf/arena_test_util.cc",
496501
"src/google/protobuf/map_test_util.cc",
502+
"src/google/protobuf/stubs/io_win32.cc",
497503
"src/google/protobuf/test_util.cc",
498504
"src/google/protobuf/testing/file.cc",
499505
"src/google/protobuf/testing/googletest.cc",
@@ -536,6 +542,7 @@ cc_test(
536542
"src/google/protobuf/compiler/cpp/cpp_plugin_unittest.cc",
537543
"src/google/protobuf/compiler/cpp/cpp_unittest.cc",
538544
"src/google/protobuf/compiler/cpp/metadata_test.cc",
545+
"src/google/protobuf/compiler/csharp/csharp_bootstrap_unittest.cc",
539546
"src/google/protobuf/compiler/csharp/csharp_generator_unittest.cc",
540547
"src/google/protobuf/compiler/importer_unittest.cc",
541548
"src/google/protobuf/compiler/java/java_doc_comment_unittest.cc",
@@ -603,6 +610,10 @@ cc_test(
603610
":test_plugin",
604611
] + glob([
605612
"src/google/protobuf/**/*",
613+
# Files for csharp_bootstrap_unittest.cc.
614+
"conformance/**/*",
615+
"csharp/src/**/*",
616+
"examples/**/*",
606617
]),
607618
includes = [
608619
"src/",
@@ -833,3 +844,84 @@ proto_lang_toolchain(
833844
runtime = ":protobuf_java",
834845
visibility = ["//visibility:public"],
835846
)
847+
848+
OBJC_HDRS = [
849+
"objectivec/GPBArray.h",
850+
"objectivec/GPBBootstrap.h",
851+
"objectivec/GPBCodedInputStream.h",
852+
"objectivec/GPBCodedOutputStream.h",
853+
"objectivec/GPBDescriptor.h",
854+
"objectivec/GPBDictionary.h",
855+
"objectivec/GPBExtensionInternals.h",
856+
"objectivec/GPBExtensionRegistry.h",
857+
"objectivec/GPBMessage.h",
858+
"objectivec/GPBProtocolBuffers.h",
859+
"objectivec/GPBProtocolBuffers_RuntimeSupport.h",
860+
"objectivec/GPBRootObject.h",
861+
"objectivec/GPBRuntimeTypes.h",
862+
"objectivec/GPBUnknownField.h",
863+
"objectivec/GPBUnknownFieldSet.h",
864+
"objectivec/GPBUtilities.h",
865+
"objectivec/GPBWellKnownTypes.h",
866+
"objectivec/GPBWireFormat.h",
867+
"objectivec/google/protobuf/Any.pbobjc.h",
868+
"objectivec/google/protobuf/Api.pbobjc.h",
869+
"objectivec/google/protobuf/Duration.pbobjc.h",
870+
"objectivec/google/protobuf/Empty.pbobjc.h",
871+
"objectivec/google/protobuf/FieldMask.pbobjc.h",
872+
"objectivec/google/protobuf/SourceContext.pbobjc.h",
873+
"objectivec/google/protobuf/Struct.pbobjc.h",
874+
"objectivec/google/protobuf/Timestamp.pbobjc.h",
875+
"objectivec/google/protobuf/Type.pbobjc.h",
876+
"objectivec/google/protobuf/Wrappers.pbobjc.h",
877+
]
878+
879+
OBJC_PRIVATE_HDRS = [
880+
"objectivec/GPBArray_PackagePrivate.h",
881+
"objectivec/GPBCodedInputStream_PackagePrivate.h",
882+
"objectivec/GPBCodedOutputStream_PackagePrivate.h",
883+
"objectivec/GPBDescriptor_PackagePrivate.h",
884+
"objectivec/GPBDictionary_PackagePrivate.h",
885+
"objectivec/GPBMessage_PackagePrivate.h",
886+
"objectivec/GPBRootObject_PackagePrivate.h",
887+
"objectivec/GPBUnknownFieldSet_PackagePrivate.h",
888+
"objectivec/GPBUnknownField_PackagePrivate.h",
889+
"objectivec/GPBUtilities_PackagePrivate.h",
890+
]
891+
892+
OBJC_SRCS = [
893+
"objectivec/GPBArray.m",
894+
"objectivec/GPBCodedInputStream.m",
895+
"objectivec/GPBCodedOutputStream.m",
896+
"objectivec/GPBDescriptor.m",
897+
"objectivec/GPBDictionary.m",
898+
"objectivec/GPBExtensionInternals.m",
899+
"objectivec/GPBExtensionRegistry.m",
900+
"objectivec/GPBMessage.m",
901+
"objectivec/GPBRootObject.m",
902+
"objectivec/GPBUnknownField.m",
903+
"objectivec/GPBUnknownFieldSet.m",
904+
"objectivec/GPBUtilities.m",
905+
"objectivec/GPBWellKnownTypes.m",
906+
"objectivec/GPBWireFormat.m",
907+
"objectivec/google/protobuf/Any.pbobjc.m",
908+
"objectivec/google/protobuf/Api.pbobjc.m",
909+
"objectivec/google/protobuf/Duration.pbobjc.m",
910+
"objectivec/google/protobuf/Empty.pbobjc.m",
911+
"objectivec/google/protobuf/FieldMask.pbobjc.m",
912+
"objectivec/google/protobuf/SourceContext.pbobjc.m",
913+
"objectivec/google/protobuf/Struct.pbobjc.m",
914+
"objectivec/google/protobuf/Timestamp.pbobjc.m",
915+
"objectivec/google/protobuf/Type.pbobjc.m",
916+
"objectivec/google/protobuf/Wrappers.pbobjc.m",
917+
]
918+
919+
objc_library(
920+
name = "objectivec",
921+
hdrs = OBJC_HDRS + OBJC_PRIVATE_HDRS,
922+
includes = [
923+
"objectivec",
924+
],
925+
non_arc_srcs = OBJC_SRCS,
926+
visibility = ["//visibility:public"],
927+
)

third_party/protobuf/3.2.0/CHANGES.txt

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,111 @@
1+
2017-04-05 version 3.3.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
4+
planned for the near future:
5+
- Preserve unknown fields in proto3: please read this doc:
6+
7+
https://docs.google.com/document/d/1KMRX-G91Aa-Y2FkEaHeeviLRRNblgIahbsk4wA14gRk/view
8+
9+
for the timeline and follow up this github issue:
10+
11+
https://github.com/google/protobuf/issues/272
12+
13+
for discussion.
14+
- Make C++ implementation C++11 only: we plan to require C++11 to build
15+
protobuf code starting from 3.4.0 or 3.5.0 release. Please join this
16+
github issue:
17+
18+
https://github.com/google/protobuf/issues/2780
19+
20+
to provide your feedback.
21+
22+
C++
23+
* Fixed map fields serialization of DynamicMessage to correctly serialize
24+
both key and value regardless of their presence.
25+
* Parser now rejects field number 0 correctly.
26+
* New API Message::SpaceUsedLong() that’s equivalent to
27+
Message::SpaceUsed() but returns the value in size_t.
28+
* JSON support
29+
- New flag always_print_enums_as_ints in JsonPrintOptions.
30+
- New flag preserve_proto_field_names in JsonPrintOptions. It will instruct
31+
the JSON printer to use the original field name declared in the .proto
32+
file instead of converting them to lowerCamelCase when printing JSON.
33+
- JsonPrintOptions.always_print_primtive_fields now works for oneof message
34+
fields.
35+
- Fixed a bug that doesn’t allow different fields to set the same json_name
36+
value.
37+
- Fixed a performance bug that causes excessive memory copy when printing
38+
large messages.
39+
* Various performance optimizations.
40+
41+
Java
42+
* Map field setters eagerly validate inputs and throw NullPointerExceptions
43+
as appropriate.
44+
* Added ByteBuffer overloads to the generated parsing methods and the Parser
45+
interface.
46+
* proto3 enum's getNumber() method now throws on UNRECOGNIZED values.
47+
* Output of JsonFormat is now locale independent.
48+
49+
Python
50+
* Added FindServiceByName() in the pure-Python DescriptorPool. This works only
51+
for descriptors added with DescriptorPool.Add(). Generated descriptor_pool
52+
does not support this yet.
53+
* Added a descriptor_pool parameter for parsing Any in text_format.Parse().
54+
* descriptor_pool.FindFileContainingSymbol() now is able to find nested
55+
extensions.
56+
* Extending empty [] to repeated field now sets parent message presence.
57+
58+
PHP
59+
* Added file option php_class_prefix. The prefix will be prepended to all
60+
generated classes defined in the file.
61+
* When encoding, negative int32 values are sign-extended to int64.
62+
* Repeated/Map field setter accepts a regular PHP array. Type checking is
63+
done on the array elements.
64+
* encode/decode are renamed to serializeToString/mergeFromString.
65+
* Added mergeFrom, clear method on Message.
66+
* Fixed a bug that oneof accessor didn’t return the field name that is
67+
actually set.
68+
* C extension now works with php7.
69+
* This is the first GA release of PHP. We guarantee that old generated code
70+
can always work with new runtime and new generated code.
71+
72+
Objective-C
73+
* Fixed help for GPBTimestamp for dates before the epoch that contain
74+
fractional seconds.
75+
* Added GPBMessageDropUnknownFieldsRecursively() to remove unknowns from a
76+
message and any sub messages.
77+
* Addressed a threading race in extension registration/lookup.
78+
* Increased the max message parsing depth to 100 to match the other languages.
79+
* Removed some use of dispatch_once in favor of atomic compare/set since it
80+
needs to be heap based.
81+
* Fixes for new Xcode 8.3 warnings.
82+
83+
C#
84+
* Fixed MapField.Values.CopyTo, which would throw an exception unnecessarily
85+
if provided exactly the right size of array to copy to.
86+
* Fixed enum JSON formatting when multiple names mapped to the same numeric
87+
value.
88+
* Added JSON formatting option to format enums as integers.
89+
* Modified RepeatedField<T> to implement IReadOnlyList<T>.
90+
* Introduced the start of custom option handling; it's not as pleasant as it
91+
might be, but the information is at least present. We expect to extend code
92+
generation to improve this in the future.
93+
* Introduced ByteString.FromStream and ByteString.FromStreamAsync to
94+
efficiently create a ByteString from a stream.
95+
* Added whole-message deprecation, which decorates the class with [Obsolete].
96+
97+
Ruby
98+
* Fixed Message#to_h for messages with map fields.
99+
* Fixed memcpy() in binary gems to work for old glibc, without breaking the
100+
build for non-glibc libc’s like musl.
101+
102+
Javascript
103+
* Added compatibility tests for version 3.0.0.
104+
* Added conformance tests.
105+
* Fixed serialization of extensions: we need to emit a value even if it is
106+
falsy (like the number 0).
107+
* Use closurebuilder.py in favor of calcdeps.py for compiling JavaScript.
108+
1109
2017-01-23 version 3.2.0 (C++/Java/Python/PHP/Ruby/Objective-C/C#/JavaScript/Lite)
2110
General
3111
* Added protoc version number to protoc plugin protocol. It can be used by

0 commit comments

Comments
 (0)