Skip to content

Commit

Permalink
Updated protobuf to 3.3.0.
Browse files Browse the repository at this point in the history
2017-04-05 version 3.3.0 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)
  Planned Future Changes
  * There are some changes that are not included in this release but are
    planned for the near future:
      - Preserve unknown fields in proto3: please read this doc:

          https://docs.google.com/document/d/1KMRX-G91Aa-Y2FkEaHeeviLRRNblgIahbsk4wA14gRk/view

        for the timeline and follow up this github issue:

          protocolbuffers/protobuf#272

        for discussion.
      - Make C++ implementation C++11 only: we plan to require C++11 to build
        protobuf code starting from 3.4.0 or 3.5.0 release. Please join this
        github issue:

          protocolbuffers/protobuf#2780

        to provide your feedback.

  C++
  * Fixed map fields serialization of DynamicMessage to correctly serialize
    both key and value regardless of their presence.
  * Parser now rejects field number 0 correctly.
  * New API Message::SpaceUsedLong() that’s equivalent to
    Message::SpaceUsed() but returns the value in size_t.
  * JSON support
    - New flag always_print_enums_as_ints in JsonPrintOptions.
    - New flag preserve_proto_field_names in JsonPrintOptions. It will instruct
      the JSON printer to use the original field name declared in the .proto
      file instead of converting them to lowerCamelCase when printing JSON.
    - JsonPrintOptions.always_print_primtive_fields now works for oneof message
      fields.
    - Fixed a bug that doesn’t allow different fields to set the same json_name
      value.
    - Fixed a performance bug that causes excessive memory copy when printing
      large messages.
  * Various performance optimizations.

  Java
  * Map field setters eagerly validate inputs and throw NullPointerExceptions
    as appropriate.
  * Added ByteBuffer overloads to the generated parsing methods and the Parser
    interface.
  * proto3 enum's getNumber() method now throws on UNRECOGNIZED values.
  * Output of JsonFormat is now locale independent.

  Python
  * Added FindServiceByName() in the pure-Python DescriptorPool. This works only
    for descriptors added with DescriptorPool.Add(). Generated descriptor_pool
    does not support this yet.
  * Added a descriptor_pool parameter for parsing Any in text_format.Parse().
  * descriptor_pool.FindFileContainingSymbol() now is able to find nested
    extensions.
  * Extending empty [] to repeated field now sets parent message presence.

  PHP
  * Added file option php_class_prefix. The prefix will be prepended to all
    generated classes defined in the file.
  * When encoding, negative int32 values are sign-extended to int64.
  * Repeated/Map field setter accepts a regular PHP array. Type checking is
    done on the array elements.
  * encode/decode are renamed to serializeToString/mergeFromString.
  * Added mergeFrom, clear method on Message.
  * Fixed a bug that oneof accessor didn’t return the field name that is
    actually set.
  * C extension now works with php7.
  * This is the first GA release of PHP. We guarantee that old generated code
    can always work with new runtime and new generated code.

  Objective-C
  * Fixed help for GPBTimestamp for dates before the epoch that contain
    fractional seconds.
  * Added GPBMessageDropUnknownFieldsRecursively() to remove unknowns from a
    message and any sub messages.
  * Addressed a threading race in extension registration/lookup.
  * Increased the max message parsing depth to 100 to match the other languages.
  * Removed some use of dispatch_once in favor of atomic compare/set since it
    needs to be heap based.
  * Fixes for new Xcode 8.3 warnings.

  C#
  * Fixed MapField.Values.CopyTo, which would throw an exception unnecessarily
    if provided exactly the right size of array to copy to.
  * Fixed enum JSON formatting when multiple names mapped to the same numeric
    value.
  * Added JSON formatting option to format enums as integers.
  * Modified RepeatedField<T> to implement IReadOnlyList<T>.
  * Introduced the start of custom option handling; it's not as pleasant as it
    might be, but the information is at least present. We expect to extend code
    generation to improve this in the future.
  * Introduced ByteString.FromStream and ByteString.FromStreamAsync to
    efficiently create a ByteString from a stream.
  * Added whole-message deprecation, which decorates the class with [Obsolete].

  Ruby
  * Fixed Message#to_h for messages with map fields.
  * Fixed memcpy() in binary gems to work for old glibc, without breaking the
    build for non-glibc libc’s like musl.

  Javascript
  * Added compatibility tests for version 3.0.0.
  * Added conformance tests.
  * Fixed serialization of extensions: we need to emit a value even if it is
    falsy (like the number 0).
  * Use closurebuilder.py in favor of calcdeps.py for compiling JavaScript.
  • Loading branch information
wiz committed May 2, 2017
1 parent 217268a commit 1c18e46
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 10 deletions.
4 changes: 2 additions & 2 deletions devel/protobuf/Makefile.common
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# $NetBSD: Makefile.common,v 1.6 2017/02/07 13:50:31 wiz Exp $
# $NetBSD: Makefile.common,v 1.7 2017/05/02 10:49:30 wiz Exp $
#
# used by devel/protobuf/Makefile
# used by devel/py-protobuf/Makefile

PROTOBUFVER= 3.2.0
PROTOBUFVER= 3.3.0

MASTER_SITES= ${MASTER_SITE_GITHUB:=google/}
GITHUB_PROJECT= protobuf
Expand Down
8 changes: 6 additions & 2 deletions devel/protobuf/PLIST
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@comment $NetBSD: PLIST,v 1.6 2017/02/07 13:50:31 wiz Exp $
@comment $NetBSD: PLIST,v 1.7 2017/05/02 10:49:30 wiz Exp $
bin/protoc
include/google/protobuf/any.h
include/google/protobuf/any.pb.h
Expand All @@ -25,6 +25,8 @@ include/google/protobuf/compiler/php/php_generator.h
include/google/protobuf/compiler/plugin.h
include/google/protobuf/compiler/plugin.pb.h
include/google/protobuf/compiler/plugin.proto
include/google/protobuf/compiler/profile.pb.h
include/google/protobuf/compiler/profile.proto
include/google/protobuf/compiler/python/python_generator.h
include/google/protobuf/compiler/ruby/ruby_generator.h
include/google/protobuf/descriptor.h
Expand All @@ -42,6 +44,7 @@ include/google/protobuf/field_mask.proto
include/google/protobuf/generated_enum_reflection.h
include/google/protobuf/generated_enum_util.h
include/google/protobuf/generated_message_reflection.h
include/google/protobuf/generated_message_table_driven.h
include/google/protobuf/generated_message_util.h
include/google/protobuf/has_bits.h
include/google/protobuf/io/coded_stream.h
Expand All @@ -62,6 +65,7 @@ include/google/protobuf/map_type_handler.h
include/google/protobuf/message.h
include/google/protobuf/message_lite.h
include/google/protobuf/metadata.h
include/google/protobuf/metadata_lite.h
include/google/protobuf/reflection.h
include/google/protobuf/reflection_ops.h
include/google/protobuf/repeated_field.h
Expand All @@ -78,7 +82,6 @@ include/google/protobuf/stubs/atomicops_internals_arm_qnx.h
include/google/protobuf/stubs/atomicops_internals_atomicword_compat.h
include/google/protobuf/stubs/atomicops_internals_generic_c11_atomic.h
include/google/protobuf/stubs/atomicops_internals_generic_gcc.h
include/google/protobuf/stubs/atomicops_internals_macosx.h
include/google/protobuf/stubs/atomicops_internals_mips_gcc.h
include/google/protobuf/stubs/atomicops_internals_power.h
include/google/protobuf/stubs/atomicops_internals_ppc_gcc.h
Expand Down Expand Up @@ -112,6 +115,7 @@ include/google/protobuf/timestamp.proto
include/google/protobuf/type.pb.h
include/google/protobuf/type.proto
include/google/protobuf/unknown_field_set.h
include/google/protobuf/util/delimited_message_util.h
include/google/protobuf/util/field_comparator.h
include/google/protobuf/util/field_mask_util.h
include/google/protobuf/util/json_util.h
Expand Down
13 changes: 7 additions & 6 deletions devel/protobuf/distinfo
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
$NetBSD: distinfo,v 1.13 2017/02/07 13:50:31 wiz Exp $
$NetBSD: distinfo,v 1.14 2017/05/02 10:49:30 wiz Exp $

SHA1 (protobuf-cpp-3.2.0.tar.gz) = 7518aef2471e7398ebd0d85a53836d6a076222d5
RMD160 (protobuf-cpp-3.2.0.tar.gz) = f83bddecef7c2b545ea342d1acac568fa5454242
SHA512 (protobuf-cpp-3.2.0.tar.gz) = dd005f5e862ff24bb233b9eaed1d7f44c42f1cc8c647c0839fe2ecc2d91178845195d79776cfa2e31d224c16eed11b05ad824b66b743e685334057d8180f17aa
Size (protobuf-cpp-3.2.0.tar.gz) = 4148324 bytes
SHA1 (protobuf-cpp-3.3.0.tar.gz) = 886010a222d5d52bba137ce35da369949d0e8913
RMD160 (protobuf-cpp-3.3.0.tar.gz) = fd8611a77b5d70295ae925e3b66ff3091af3b109
SHA512 (protobuf-cpp-3.3.0.tar.gz) = 3fbee5ebaf8aa83793af87ce593fb2511057e26251ff7276c0cb108edd8c4699cbe376e30679f23953900219d89cd13f5bf5232eb717e6ce6e702ed48dadfaa8
Size (protobuf-cpp-3.3.0.tar.gz) = 4214662 bytes
SHA1 (patch-configure) = 5faf2311cc163d49e2beacb030845ffe14d3b9a2
SHA1 (patch-configure.ac) = f6556f2f82e728459da7d7b090ccdfbd7be1411a
SHA1 (patch-gmock_configure) = 49a4c9301ad4c1973ee7058213df50a7833161f0
SHA1 (patch-gmock_configure.ac) = cfd7b7c87eff4b06ce6ecb34dec046561bbdc113
SHA1 (patch-src_google_protobuf_compiler_plugin.pb.h) = e13704e04858e747e5c3e52fd3d399458face3f0
SHA1 (patch-src_google_protobuf_message__lite.cc) = 8f2ffe07b2710de5365148153978ad6d9939f522
SHA1 (patch-src_google_protobuf_stubs_atomicops.h) = 9ec851134da674980a49302e9582a432a47f7974
SHA1 (patch-src_google_protobuf_stubs_atomicops__internals__arm__gcc.h) = d60c554be8ff7fc9370bb036eef9101f9a6433e3
13 changes: 13 additions & 0 deletions devel/protobuf/patches/patch-configure
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
$NetBSD: patch-configure,v 1.1 2017/05/02 10:49:30 wiz Exp $

--- configure.orig 2017-04-06 00:37:52.000000000 +0000
+++ configure
@@ -18003,7 +18003,7 @@ fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LDFLAGS=$save_LDFLAGS
- if test "$have_ld_version_script" == "yes"; then
+ if test "$have_ld_version_script" = "yes"; then
HAVE_LD_VERSION_SCRIPT_TRUE=
HAVE_LD_VERSION_SCRIPT_FALSE='#'
else
13 changes: 13 additions & 0 deletions devel/protobuf/patches/patch-configure.ac
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
$NetBSD: patch-configure.ac,v 1.1 2017/05/02 10:49:30 wiz Exp $

--- configure.ac.orig 2017-04-06 00:15:19.000000000 +0000
+++ configure.ac
@@ -110,7 +110,7 @@ AC_LINK_IFELSE(
[have_ld_version_script=yes; AC_MSG_RESULT(yes)],
[have_ld_version_script=no; AC_MSG_RESULT(no)])
LDFLAGS=$save_LDFLAGS
-AM_CONDITIONAL([HAVE_LD_VERSION_SCRIPT], [test "$have_ld_version_script" == "yes"])
+AM_CONDITIONAL([HAVE_LD_VERSION_SCRIPT], [test "$have_ld_version_script" = "yes"])

# Checks for header files.
AC_HEADER_STDC

0 comments on commit 1c18e46

Please sign in to comment.