Skip to content

Commit

Permalink
Sync from Piper @314226556
Browse files Browse the repository at this point in the history
PROTOBUF_SYNC_PIPER
  • Loading branch information
haberman committed Jun 1, 2020
2 parents 0a737d8 + e492e5a commit 183cdec
Show file tree
Hide file tree
Showing 87 changed files with 662 additions and 2,573 deletions.
30 changes: 20 additions & 10 deletions BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -966,6 +966,16 @@ alias(
objc_library(
name = "protobuf_objc",
hdrs = [
"objectivec/GPBAny.pbobjc.h",
"objectivec/GPBApi.pbobjc.h",
"objectivec/GPBDuration.pbobjc.h",
"objectivec/GPBEmpty.pbobjc.h",
"objectivec/GPBFieldMask.pbobjc.h",
"objectivec/GPBSourceContext.pbobjc.h",
"objectivec/GPBStruct.pbobjc.h",
"objectivec/GPBTimestamp.pbobjc.h",
"objectivec/GPBType.pbobjc.h",
"objectivec/GPBWrappers.pbobjc.h",
"objectivec/GPBArray.h",
"objectivec/GPBBootstrap.h",
"objectivec/GPBCodedInputStream.h",
Expand Down Expand Up @@ -1014,6 +1024,16 @@ objc_library(
"objectivec",
],
non_arc_srcs = [
"objectivec/GPBAny.pbobjc.m",
"objectivec/GPBApi.pbobjc.m",
"objectivec/GPBDuration.pbobjc.m",
"objectivec/GPBEmpty.pbobjc.m",
"objectivec/GPBFieldMask.pbobjc.m",
"objectivec/GPBSourceContext.pbobjc.m",
"objectivec/GPBStruct.pbobjc.m",
"objectivec/GPBTimestamp.pbobjc.m",
"objectivec/GPBType.pbobjc.m",
"objectivec/GPBWrappers.pbobjc.m",
"objectivec/GPBArray.m",
"objectivec/GPBCodedInputStream.m",
"objectivec/GPBCodedOutputStream.m",
Expand All @@ -1028,16 +1048,6 @@ objc_library(
"objectivec/GPBUtilities.m",
"objectivec/GPBWellKnownTypes.m",
"objectivec/GPBWireFormat.m",
"objectivec/google/protobuf/Any.pbobjc.m",
"objectivec/google/protobuf/Api.pbobjc.m",
"objectivec/google/protobuf/Duration.pbobjc.m",
"objectivec/google/protobuf/Empty.pbobjc.m",
"objectivec/google/protobuf/FieldMask.pbobjc.m",
"objectivec/google/protobuf/SourceContext.pbobjc.m",
"objectivec/google/protobuf/Struct.pbobjc.m",
"objectivec/google/protobuf/Timestamp.pbobjc.m",
"objectivec/google/protobuf/Type.pbobjc.m",
"objectivec/google/protobuf/Wrappers.pbobjc.m",
],
visibility = ["//visibility:public"],
)
Expand Down
25 changes: 25 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,28 @@
Unreleased Changes

C++:
* Enabled heterogeneous lookup for std::string keys in maps.
* Improved the randomness of map ordering.

Python:
* Improved the error message when AttributeError is returned from __getattr__
in EnumTypeWrapper.

2020-05-26 version 3.12.2 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)

C++
* Simplified the template export macros to fix the build for mingw32. (#7539)

Objective-C
* Fix for the :protobuf_objc target in the Bazel BUILD file. (#7538)

2020-05-20 version 3.12.1 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)

Ruby
* Re-add binary gems for Ruby 2.3 and 2.4. These are EOL upstream, however
many people still use them and dropping support will require more
coordination.

2020-05-12 version 3.12.0 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)

Protocol Compiler
Expand Down
7 changes: 6 additions & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ csharp_EXTRA_DIST= \
csharp/protos/unittest_import.proto \
csharp/protos/unittest_issues.proto \
csharp/protos/unittest_proto3.proto \
csharp/protos/unittest_selfreferential_options.proto \
csharp/protos/unittest.proto \
csharp/src/AddressBook/AddPerson.cs \
csharp/src/AddressBook/Addressbook.cs \
Expand Down Expand Up @@ -153,6 +154,7 @@ csharp_EXTRA_DIST= \
csharp/src/Google.Protobuf.Test.TestProtos/UnittestIssues.cs \
csharp/src/Google.Protobuf.Test.TestProtos/UnittestProto3.cs \
csharp/src/Google.Protobuf.Test.TestProtos/UnittestProto3Optional.cs \
csharp/src/Google.Protobuf.Test.TestProtos/UnittestSelfreferentialOptions.cs \
csharp/src/Google.Protobuf.Test.TestProtos/UnittestWellKnownTypes.cs \
csharp/src/Google.Protobuf.Test.TestProtos/Unittest.cs \
csharp/src/Google.Protobuf.Test/WellKnownTypes/AnyTest.cs \
Expand Down Expand Up @@ -260,7 +262,6 @@ csharp_EXTRA_DIST= \
csharp/src/Google.Protobuf/UnknownFieldSet.cs

java_EXTRA_DIST= \
java/BUILD \
java/README.md \
java/bom/pom.xml \
java/core/BUILD \
Expand Down Expand Up @@ -1205,6 +1206,10 @@ js_EXTRA_DIST= \
js/data.proto \
js/debug.js \
js/debug_test.js \
js/experimental/runtime/kernel/message_set.js \
js/experimental/runtime/kernel/message_set_test.js \
js/experimental/runtime/kernel/tag.js \
js/experimental/runtime/kernel/tag_test.js \
js/gulpfile.js \
js/jasmine.json \
js/map.js \
Expand Down
2 changes: 1 addition & 1 deletion Protobuf-C++.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'Protobuf-C++'
s.version = '3.11.4'
s.version = '3.12.2'
s.summary = 'Protocol Buffers v3 runtime library for C++.'
s.homepage = 'https://github.com/google/protobuf'
s.license = '3-Clause BSD License'
Expand Down
2 changes: 1 addition & 1 deletion 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.12.0'
s.version = '3.12.2'
s.summary = 'Protocol Buffers v.3 runtime library for Objective-C.'
s.homepage = 'https://github.com/protocolbuffers/protobuf'
s.license = '3-Clause BSD License'
Expand Down
33 changes: 30 additions & 3 deletions cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ if (CMAKE_CXX_COMPILER_ID MATCHES Intel)
endif()

# Options
if(WITH_PROTOC)
set(protobuf_PROTOC_EXE ${WITH_PROTOC} CACHE FILEPATH "Protocol Buffer Compiler executable" FORCE)
endif()
option(protobuf_BUILD_TESTS "Build tests" ON)
option(protobuf_BUILD_CONFORMANCE "Build conformance tests" OFF)
option(protobuf_BUILD_EXAMPLES "Build examples" OFF)
Expand All @@ -58,6 +61,12 @@ mark_as_advanced(protobuf_DEBUG_POSTFIX)
# User options
include(protobuf-options.cmake)

# Overrides for option dependencies
if (protobuf_BUILD_PROTOC_BINARIES OR protobuf_BUILD_TESTS)
set(protobuf_BUILD_LIBPROTOC ON)
else()
set(protobuf_BUILD_LIBPROTOC OFF)
endif ()
# Path to main configure script
set(protobuf_CONFIGURE_SCRIPT "../configure.ac")

Expand Down Expand Up @@ -242,11 +251,29 @@ endif (protobuf_UNICODE)

include(libprotobuf-lite.cmake)
include(libprotobuf.cmake)
if (protobuf_BUILD_PROTOC_BINARIES)
if (protobuf_BUILD_LIBPROTOC)
include(libprotoc.cmake)
endif (protobuf_BUILD_LIBPROTOC)
if (protobuf_BUILD_PROTOC_BINARIES)
include(protoc.cmake)
if (NOT DEFINED protobuf_PROTOC_EXE)
set(protobuf_PROTOC_EXE protoc)
endif (NOT DEFINED protobuf_PROTOC_EXE)
endif (protobuf_BUILD_PROTOC_BINARIES)

# Ensure we have a protoc executable if we need one
if (protobuf_BUILD_TESTS OR protobuf_BUILD_CONFORMANCE OR protobuf_BUILD_EXAMPLES)
if (NOT DEFINED protobuf_PROTOC_EXE)
find_program(protobuf_PROTOC_EXE protoc)
if (NOT protobuf_PROTOC_EXE)
message(FATAL "Build requires 'protoc' but binary not found and not building protoc.")
endif ()
endif ()
if(protobuf_VERBOSE)
message(STATUS "Using protoc : ${protobuf_PROTOC_EXE}")
endif(protobuf_VERBOSE)
endif ()

if (protobuf_BUILD_TESTS)
include(tests.cmake)
endif (protobuf_BUILD_TESTS)
Expand All @@ -262,5 +289,5 @@ if (protobuf_BUILD_EXAMPLES)
endif (protobuf_BUILD_EXAMPLES)

if(protobuf_VERBOSE)
message(STATUS "Protocol Buffers Configuring done")
endif()
message(STATUS "Protocol Buffers Configuring done")
endif(protobuf_VERBOSE)
10 changes: 5 additions & 5 deletions cmake/conformance.cmake
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@

add_custom_command(
OUTPUT ${protobuf_source_dir}/conformance/conformance.pb.cc
DEPENDS protoc ${protobuf_source_dir}/conformance/conformance.proto
COMMAND protoc ${protobuf_source_dir}/conformance/conformance.proto
DEPENDS ${protobuf_PROTOC_EXE} ${protobuf_source_dir}/conformance/conformance.proto
COMMAND ${protobuf_PROTOC_EXE} ${protobuf_source_dir}/conformance/conformance.proto
--proto_path=${protobuf_source_dir}/conformance
--cpp_out=${protobuf_source_dir}/conformance
)

add_custom_command(
OUTPUT ${protobuf_source_dir}/src/google/protobuf/test_messages_proto3.pb.cc
${protobuf_source_dir}/src/google/protobuf/test_messages_proto2.pb.cc
DEPENDS protoc ${protobuf_source_dir}/src/google/protobuf/test_messages_proto3.proto
protoc ${protobuf_source_dir}/src/google/protobuf/test_messages_proto2.proto
COMMAND protoc ${protobuf_source_dir}/src/google/protobuf/test_messages_proto3.proto
DEPENDS ${protobuf_PROTOC_EXE} ${protobuf_source_dir}/src/google/protobuf/test_messages_proto3.proto
${protobuf_PROTOC_EXE} ${protobuf_source_dir}/src/google/protobuf/test_messages_proto2.proto
COMMAND ${protobuf_PROTOC_EXE} ${protobuf_source_dir}/src/google/protobuf/test_messages_proto3.proto
${protobuf_source_dir}/src/google/protobuf/test_messages_proto2.proto
--proto_path=${protobuf_source_dir}/src
--cpp_out=${protobuf_source_dir}/src
Expand Down
4 changes: 2 additions & 2 deletions cmake/tests.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ macro(compile_proto_file filename)
get_filename_component(basename ${filename} NAME_WE)
add_custom_command(
OUTPUT ${protobuf_source_dir}/src/${dirname}/${basename}.pb.cc
DEPENDS protoc ${protobuf_source_dir}/src/${dirname}/${basename}.proto
COMMAND protoc ${protobuf_source_dir}/src/${dirname}/${basename}.proto
DEPENDS ${protobuf_PROTOC_EXE} ${protobuf_source_dir}/src/${dirname}/${basename}.proto
COMMAND ${protobuf_PROTOC_EXE} ${protobuf_source_dir}/src/${dirname}/${basename}.proto
--proto_path=${protobuf_source_dir}/src
--cpp_out=${protobuf_source_dir}/src
--experimental_allow_proto3_optional
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.11.4],[protobuf@googlegroups.com],[protobuf])
AC_INIT([Protocol Buffers],[3.12.2],[protobuf@googlegroups.com],[protobuf])

AM_MAINTAINER_MODE([enable])

Expand Down
1 change: 0 additions & 1 deletion conformance/failure_list_python.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,3 @@ Required.Proto3.JsonInput.DoubleFieldTooSmall
Required.Proto3.JsonInput.FloatFieldTooLarge
Required.Proto3.JsonInput.FloatFieldTooSmall
Required.Proto3.JsonInput.RepeatedFieldWrongElementTypeExpectingIntegersGotBool
Required.Proto3.JsonInput.TimestampJsonInputLowercaseT
1 change: 0 additions & 1 deletion conformance/failure_list_python_cpp.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,3 @@ Required.Proto3.JsonInput.DoubleFieldTooSmall
Required.Proto3.JsonInput.FloatFieldTooLarge
Required.Proto3.JsonInput.FloatFieldTooSmall
Required.Proto3.JsonInput.RepeatedFieldWrongElementTypeExpectingIntegersGotBool
Required.Proto3.JsonInput.TimestampJsonInputLowercaseT
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.12.0</version>
<version>3.12.2</version>
<authors>Google Inc.</authors>
<owners>protobuf-packages</owners>
<licenseUrl>https://github.com/protocolbuffers/protobuf/blob/master/LICENSE</licenseUrl>
Expand Down
4 changes: 2 additions & 2 deletions csharp/src/Google.Protobuf/Google.Protobuf.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<Description>C# runtime library for Protocol Buffers - Google's data interchange format.</Description>
<Copyright>Copyright 2015, Google Inc.</Copyright>
<AssemblyTitle>Google Protocol Buffers</AssemblyTitle>
<VersionPrefix>3.12.0</VersionPrefix>
<VersionPrefix>3.12.2</VersionPrefix>
<!-- C# 7.2 is required for Span/BufferWriter/ReadOnlySequence -->
<LangVersion>7.2</LangVersion>
<Authors>Google Inc.</Authors>
Expand All @@ -31,7 +31,7 @@

<ItemGroup>
<PackageReference Include="System.Memory" Version="4.5.2"/>
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" Version="1.0.0-beta2-18618-05"/>
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" Version="1.0.0"/>
<!-- Needed for the net45 build to work on Unix. See https://github.com/dotnet/designs/pull/33 -->
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" PrivateAssets="All" Version="1.0.0"/>
</ItemGroup>
Expand Down
3 changes: 2 additions & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"sdk": {
"version": "3.0.100"
"version": "3.0.100",
"rollForward": "latestMinor"
}
}
2 changes: 1 addition & 1 deletion java/bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-bom</artifactId>
<version>3.12.0</version>
<version>3.12.2</version>
<packaging>pom</packaging>

<name>Protocol Buffers [BOM]</name>
Expand Down
2 changes: 1 addition & 1 deletion java/core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-parent</artifactId>
<version>3.12.0</version>
<version>3.12.2</version>
</parent>

<artifactId>protobuf-java</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion java/lite/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-parent</artifactId>
<version>3.12.0</version>
<version>3.12.2</version>
</parent>

<artifactId>protobuf-javalite</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-parent</artifactId>
<version>3.12.0</version>
<version>3.12.2</version>
<packaging>pom</packaging>

<name>Protocol Buffers [Parent]</name>
Expand Down
2 changes: 1 addition & 1 deletion java/util/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-parent</artifactId>
<version>3.12.0</version>
<version>3.12.2</version>
</parent>

<artifactId>protobuf-java-util</artifactId>
Expand Down
6 changes: 3 additions & 3 deletions js/message.js
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ jspb.Message.EMPTY_LIST_SENTINEL_ = goog.DEBUG && Object.freeze ?
*/
jspb.Message.isArray_ = function(o) {
return jspb.Message.ASSUME_LOCAL_ARRAYS ? o instanceof Array :
goog.isArray(o);
Array.isArray(o);
};

/**
Expand Down Expand Up @@ -1433,7 +1433,7 @@ jspb.Message.prototype.syncMapFields_ = function() {
if (this.wrappers_) {
for (var fieldNumber in this.wrappers_) {
var val = this.wrappers_[fieldNumber];
if (goog.isArray(val)) {
if (Array.isArray(val)) {
for (var i = 0; i < val.length; i++) {
if (val[i]) {
val[i].toArray();
Expand Down Expand Up @@ -1823,7 +1823,7 @@ jspb.Message.copyInto = function(fromMessage, toMessage) {
*/
jspb.Message.clone_ = function(obj) {
var o;
if (goog.isArray(obj)) {
if (Array.isArray(obj)) {
// Allocate array of correct size.
var clonedArray = new Array(obj.length);
// Use array iteration where possible because it is faster than for-in.
Expand Down
2 changes: 1 addition & 1 deletion js/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "google-protobuf",
"version": "3.11.4",
"version": "3.12.2",
"description": "Protocol Buffers for JavaScript",
"main": "google-protobuf.js",
"files": [
Expand Down
3 changes: 3 additions & 0 deletions kokoro/linux/bazel/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ trap print_test_logs EXIT
bazel test --copt=-Werror --host_copt=-Werror \
//:build_files_updated_unittest \
//java/... \
//:protoc \
//:protobuf \
//:protobuf_python \
//:protobuf_test \
@com_google_protobuf//:cc_proto_blacklist_test
trap - EXIT
Expand Down
Loading

0 comments on commit 183cdec

Please sign in to comment.