Home | History | Annotate | Download | only in protobuf-3.0.0
      1 2016-07-27 version 3.0.0 (C++/Java/Python/Ruby/Objective-C/C#/JavaScript/Lite)
      2   General
      3   * This log only contains changes since the beta-4 release. Summarized change
      4     log since the last stable release (v2.6.1) can be found in the github
      5     release page.
      6 
      7   Compatibility Notice
      8   * v3.0.0 is the first API stable release of the v3.x series. We do not expect
      9     any future API breaking changes.
     10   * For C++, Java Lite and Objective-C, source level compatibility is
     11     guaranteed.  Upgrading from v3.0.0 to newer minor version releases will be
     12     source compatible. For example, if your code compiles against protobuf
     13     v3.0.0, it will continue to compile after you upgrade protobuf library to
     14     v3.1.0.
     15   * For other languages, both source level compatibility and binary level
     16     compatibility are guaranteed. For example, if you have a Java binary built
     17     against protobuf v3.0.0. After switching the protobuf runtime binary to
     18     v3.1.0, your built binary should continue to work.
     19   * Compatibility is only guaranteed for documented API and documented
     20     behaviors. If you are using undocumented API (e.g., use anything in the C++
     21     internal namespace), it can be broken by minor version releases in an
     22     undetermined manner.
     23 
     24   Ruby
     25   * When you assign a string field `a.string_field = "X"`, we now call
     26     #encode(UTF-8) on the string and freeze the copy. This saves you from
     27     needing to ensure the string is already encoded as UTF-8. It also prevents
     28     you from mutating the string after it has been assigned (this is how we
     29     ensure it stays valid UTF-8).
     30   * The generated file for `foo.proto` is now `foo_pb.rb` instead of just
     31     `foo.rb`. This makes it easier to see which imports/requires are from
     32     protobuf generated code, and also prevents conflicts with any `foo.rb` file
     33     you might have written directly in Ruby. It is a backward-incompatible
     34     change: you will need to update all of your `require` statements.
     35   * For package names like `foo_bar`, we now translate this to the Ruby module
     36     `FooBar`. This is more idiomatic Ruby than what we used to do (`Foo_bar`).
     37 
     38   JavaScript
     39   * Scalar fields like numbers and boolean now return defaults instead of
     40     `undefined` or `null` when they are unset. You can test for presence
     41     explicitly by calling `hasFoo()`, which we now generate for scalar fields.
     42 
     43   Java Lite
     44   * Java Lite is now implemented as a separate plugin, maintained in the
     45     `javalite` branch. Both lite runtime and protoc artifacts will be available
     46     in Maven.
     47 
     48   C#
     49   * Target platforms now .NET 4.5, selected portable subsets and .NET Core.
     50   * legacy_enum_values option is no longer supported.
     51 
     52 2016-07-15 version 3.0.0-beta-4 (C++/Java/Python/Ruby/Objective-C/C#/JavaScript)
     53   General
     54   * Added a deterministic serialization API for C++. The deterministic
     55     serialization guarantees that given a binary, equal messages will be
     56     serialized to the same bytes. This allows applications like MapReduce to
     57     group equal messages based on the serialized bytes. The deterministic
     58     serialization is, however, NOT canonical across languages; it is also
     59     unstable across different builds with schema changes due to unknown fields.
     60     Users who need canonical serialization, e.g. persistent storage in a
     61     canonical form, fingerprinting, etc, should define their own
     62     canonicalization specification and implement the serializer using reflection
     63     APIs rather than relying on this API.
     64   * Added OneofOptions. You can now define custom options for oneof groups.
     65       import "google/protobuf/descriptor.proto";
     66       extend google.protobuf.OneofOptions {
     67         optional int32 my_oneof_extension = 12345;
     68       }
     69       message Foo {
     70         oneof oneof_group {
     71           (my_oneof_extension) = 54321;
     72           ...
     73         }
     74       }
     75 
     76   C++ (beta)
     77   * Introduced a deterministic serialization API in
     78     CodedOutputStream::SetSerializationDeterministic(bool). See the notes about
     79     deterministic serialization in the General section.
     80   * Added google::protobuf::Map::swap() to swap two map fields.
     81   * Fixed a memory leak when calling Reflection::ReleaseMessage() on a message
     82     allocated on arena.
     83   * Improved error reporting when parsing text format protos.
     84   * JSON
     85       - Added a new parser option to ignore unknown fields when parsing JSON.
     86       - Added convenient methods for message to/from JSON conversion.
     87   * Various performance optimizations.
     88 
     89   Java (beta)
     90   * File option "java_generate_equals_and_hash" is now deprecated. equals() and
     91     hashCode() methods are generated by default.
     92   * Added a new JSON printer option "omittingInsignificantWhitespace" to produce
     93     a more compact JSON output. The printer will pretty-print by default.
     94   * Updated Java runtime to be compatible with 2.5.0/2.6.1 generated protos.
     95 
     96   Python (beta)
     97   * Added support to pretty print Any messages in text format.
     98   * Added a flag to ignore unknown fields when parsing JSON.
     99   * Bugfix: "@type" field of a JSON Any message is now correctly put before
    100     other fields.
    101 
    102   Objective-C (beta)
    103   * Updated the code to support compiling with more compiler warnings
    104     enabled. (Issue 1616)
    105   * Exposing more detailed errors for parsing failures. (PR 1623)
    106   * Small (breaking) change to the naming of some methods on the support classes
    107     for map<>. There were collisions with the system provided KVO support, so
    108     the names were changed to avoid those issues.  (PR 1699)
    109   * Fixed for proper Swift bridging of error handling during parsing. (PR 1712)
    110   * Complete support for generating sources that will go into a Framework and
    111     depend on generated sources from other Frameworks. (Issue 1457)
    112 
    113   C# (beta)
    114   * RepeatedField optimizations.
    115   * Support for .NET Core.
    116   * Minor bug fixes.
    117   * Ability to format a single value in JsonFormatter (advanced usage only).
    118   * Modifications to attributes applied to generated code.
    119 
    120   Javascript (alpha)
    121   * Maps now have a real map API instead of being treated as repeated fields.
    122   * Well-known types are now provided in the google-protobuf package, and the
    123     code generator knows to require() them from that package.
    124   * Bugfix: non-canonical varints are correctly decoded.
    125 
    126   Ruby (alpha)
    127   * Accessors for oneof fields now return default values instead of nil.
    128 
    129   Java Lite
    130   * Java lite support is removed from protocol compiler. It will be supported
    131     as a protocol compiler plugin in a separate code branch.
    132 
    133 2016-05-16 version 3.0.0-beta-3 (C++/Java/Python/Ruby/Nano/Objective-C/C#/JavaScript)
    134   General
    135   * Supported Proto3 lite-runtime in C++/Java for mobile platforms.
    136   * Any type now supports APIs to specify prefixes other than
    137     type.googleapis.com
    138   * Removed javanano_use_deprecated_package option; Nano will always has its own
    139     ".nano" package.
    140 
    141   C++ (Beta)
    142   * Improved hash maps.
    143       - Improved hash maps comments. In particular, please note that equal hash
    144         maps will not necessarily have the same iteration order and
    145         serialization.
    146       - Added a new hash maps implementation that will become the default in a
    147         later release.
    148   * Arenas
    149       - Several inlined methods in Arena were moved to out-of-line to improve
    150         build performance and code size.
    151       - Added SpaceAllocatedAndUsed() to report both space used and allocated
    152       - Added convenient class UnsafeArenaAllocatedRepeatedPtrFieldBackInserter
    153   * Any
    154       - Allow custom type URL prefixes in Any packing.
    155       - TextFormat now expand the Any type rather than printing bytes.
    156   * Performance optimizations and various bug fixes.
    157 
    158   Java (Beta)
    159   * Introduced an ExperimentalApi annotation. Annotated APIs are experimental
    160     and are subject to change in a backward incompatible way in future releases.
    161   * Introduced zero-copy serialization as an ExperimentalApi
    162       - Introduction of the `ByteOutput` interface. This is similar to
    163         `OutputStream` but provides semantics for lazy writing (i.e. no
    164         immediate copy required) of fields that are considered to be immutable.
    165       - `ByteString` now supports writing to a `ByteOutput`, which will directly
    166         expose the internals of the `ByteString` (i.e. `byte[]` or `ByteBuffer`)
    167         to the `ByteOutput` without copying.
    168       - `CodedOutputStream` now supports writing to a `ByteOutput`. `ByteString`
    169         instances that are too large to fit in the internal buffer will be
    170         (lazily) written to the `ByteOutput` directly.
    171       - This allows applications using large `ByteString` fields to avoid
    172         duplication of these fields entirely. Such an application can supply a
    173         `ByteOutput` that chains together the chunks received from
    174         `CodedOutputStream` before forwarding them onto the IO system.
    175   * Other related changes to `CodedOutputStream`
    176       - Additional use of `sun.misc.Unsafe` where possible to perform fast
    177         access to `byte[]` and `ByteBuffer` values and avoiding unnecessary
    178         range checking.
    179       - `ByteBuffer`-backed `CodedOutputStream` now writes directly to the
    180         `ByteBuffer` rather than to an intermediate array.
    181   * Improved lite-runtime.
    182       - Lite protos now implement deep equals/hashCode/toString
    183       - Significantly improved the performance of Builder#mergeFrom() and
    184         Builder#mergeDelimitedFrom()
    185   * Various bug fixes and small feature enhancement.
    186       - Fixed stack overflow when in hashCode() for infinite recursive oneofs.
    187       - Fixed the lazy field parsing in lite to merge rather than overwrite.
    188       - TextFormat now supports reporting line/column numbers on errors.
    189       - Updated to add appropriate @Override for better compiler errors.
    190 
    191   Python (Beta)
    192   * Added JSON format for Any, Struct, Value and ListValue
    193   * [ ] is now accepted for both repeated scalar fields and repeated message
    194     fields in text format parser.
    195   * Numerical field name is now supported in text format.
    196   * Added DiscardUnknownFields API for python protobuf message.
    197 
    198   Objective-C (Beta)
    199   * Proto comments now come over as HeaderDoc comments in the generated sources
    200     so Xcode can pick them up and display them.
    201   * The library headers have been updated to use HeaderDoc comments so Xcode can
    202     pick them up and display them.
    203   * The per message and per field overhead in both generated code and runtime
    204     object sizes was reduced.
    205   * Generated code now include deprecated annotations when the proto file
    206     included them.
    207 
    208   C# (Beta)
    209   In general: some changes are breaking, which require regenerating messages.
    210   Most user-written code will not be impacted *except* for the renaming of enum
    211   values.
    212 
    213   * Allow custom type URL prefixes in `Any` packing, and ignore them when
    214     unpacking
    215   * `protoc` is now in a separate NuGet package (Google.Protobuf.Tools)
    216   * New option: `internal_access` to generate internal classes
    217   * Enum values are now PascalCased, and if there's a prefix which matches the
    218     name of the enum, that is removed (so an enum `COLOR` with a value
    219     `COLOR_BLUE` would generate a value of just `Blue`). An option
    220     (`legacy_enum_values`) is temporarily available to disable this, but the
    221     option will be removed for GA.
    222   * `json_name` option is now honored
    223   * If group tags are encountered when parsing, they are validated more
    224     thoroughly (although we don't support actual groups)
    225   * NuGet dependencies are better specified
    226   * Breaking: `Preconditions` is renamed to `ProtoPreconditions`
    227   * Breaking: `GeneratedCodeInfo` is renamed to `GeneratedClrTypeInfo`
    228   * `JsonFormatter` now allows writing to a `TextWriter`
    229   * New interface, `ICustomDiagnosticMessage` to allow more compact
    230     representations from `ToString`
    231   * `CodedInputStream` and `CodedOutputStream` now implement `IDisposable`,
    232     which simply disposes of the streams they were constructed with
    233   * Map fields no longer support null values (in line with other languages)
    234   * Improvements in JSON formatting and parsing
    235 
    236   Javascript (Alpha)
    237   * Better support for "bytes" fields: bytes fields can be read as either a
    238     base64 string or UInt8Array (in environments where TypedArray is supported).
    239   * New support for CommonJS imports.  This should make it easier to use the
    240     JavaScript support in Node.js and tools like WebPack.  See js/README.md for
    241     more information.
    242   * Some significant internal refactoring to simplify and modularize the code.
    243 
    244   Ruby (Alpha)
    245   * JSON serialization now properly uses camelCased names, with a runtime option
    246     that will preserve original names from .proto files instead.
    247   * Well-known types are now included in the distribution.
    248   * Release now includes binary gems for Windows, Mac, and Linux instead of just
    249     source gems.
    250   * Bugfix for serializing oneofs.
    251 
    252   C++/Java Lite (Alpha)
    253     A new "lite" generator parameter was introduced in the protoc for C++ and
    254     Java for Proto3 syntax messages. Example usage:
    255 
    256      ./protoc --cpp_out=lite:$OUTPUT_PATH foo.proto
    257 
    258     The protoc will treat the current input and all the transitive dependencies
    259     as LITE. The same generator parameter must be used to generate the
    260     dependencies.
    261 
    262     In Proto3 syntax files, "optimized_for=LITE_RUNTIME" is no longer supported.
    263 
    264 
    265 2015-12-30 version 3.0.0-beta-2 (C++/Java/Python/Ruby/Nano/Objective-C/C#/JavaScript)
    266   General
    267   * Introduced a new language implementation: JavaScript.
    268   * Added a new field option "json_name". By default proto field names are
    269     converted to "lowerCamelCase" in proto3 JSON format. This option can be
    270     used to override this behavior and specify a different JSON name for the
    271     field.
    272   * Added conformance tests to ensure implementations are following proto3 JSON
    273     specification.
    274 
    275   C++ (Beta)
    276   * Various bug fixes and improvements to the JSON support utility:
    277       - Duplicate map keys in JSON are now rejected (i.e., translation will
    278         fail).
    279       - Fixed wire-format for google.protobuf.Value/ListValue.
    280       - Fixed precision loss when converting google.protobuf.Timestamp.
    281       - Fixed a bug when parsing invalid UTF-8 code points.
    282       - Fixed a memory leak.
    283       - Reduced call stack usage.
    284 
    285   Java (Beta)
    286   * Cleaned up some unused methods on CodedOutputStream.
    287   * Presized lists for packed fields during parsing in the lite runtime to
    288     reduce allocations and improve performance.
    289   * Improved the performance of unknown fields in the lite runtime.
    290   * Introduced UnsafeByteStrings to support zero-copy ByteString creation.
    291   * Various bug fixes and improvements to the JSON support utility:
    292       - Fixed a thread-safety bug.
    293       - Added a new option preservingProtoFieldNames to JsonFormat.
    294       - Added a new option includingDefaultValueFields to JsonFormat.
    295       - Updated the JSON utility to comply with proto3 JSON specification.
    296 
    297   Python (Beta)
    298   * Added proto3 JSON format utility. It includes support for all field types
    299     and a few well-known types except for Any and Struct.
    300   * Added runtime support for Any, Timestamp, Duration and FieldMask.
    301   * [ ] is now accepted for repeated scalar fields in text format parser.
    302   * Map fields now have proper O(1) performance for lookup/insert/delete
    303     when using the Python/C++ implementation. They were previously using O(n)
    304     search-based algorithms because the C++ reflection interface didn't
    305     support true map operations.
    306 
    307   Objective-C (Beta)
    308   * Various bug-fixes and code tweaks to pass more strict compiler warnings.
    309   * Now has conformance test coverage and is passing all tests.
    310 
    311   C# (Beta)
    312   * Various bug-fixes.
    313   * Code generation: Files generated in directories based on namespace.
    314   * Code generation: Include comments from .proto files in XML doc
    315     comments (naively)
    316   * Code generation: Change organization/naming of "reflection class" (access
    317     to file descriptor)
    318   * Code generation and library: Add Parser property to MessageDescriptor,
    319     and introduce a non-generic parser type.
    320   * Library: Added TypeRegistry to support JSON parsing/formatting of Any.
    321   * Library: Added Any.Pack/Unpack support.
    322   * Library: Implemented JSON parsing.
    323 
    324   Javascript (Alpha)
    325   * Added proto3 support for JavaScript. The runtime is written in pure
    326     JavaScript and works in browsers and in Node.js. To generate JavaScript
    327     code for your proto, invoke protoc with "--js_out". See js/README.md
    328     for more build instructions.
    329 
    330 2015-08-26 version 3.0.0-beta-1 (C++/Java/Python/Ruby/Nano/Objective-C/C#)
    331   About Beta
    332   * This is the first beta release of protobuf v3.0.0. Not all languages
    333     have reached beta stage. Languages not marked as beta are still in
    334     alpha (i.e., be prepared for API breaking changes).
    335 
    336   General
    337   * Proto3 JSON is supported in several languages (fully supported in C++
    338     and Java, partially supported in Ruby/C#). The JSON spec is defined in
    339     the proto3 language guide:
    340 
    341       https://developers.google.com/protocol-buffers/docs/proto3#json
    342 
    343     We will publish a more detailed spec to define the exact behavior of
    344     proto3-conformant JSON serializers and parsers. Until then, do not rely
    345     on specific behaviors of the implementation if its not documented in
    346     the above spec. More specifically, the behavior is not yet finalized for
    347     the following:
    348       - Parsing invalid JSON input (e.g., input with trailing commas).
    349       - Non-camelCase names in JSON input.
    350       - The same field appears multiple times in JSON input.
    351       - JSON arrays contain null values.
    352       - The message has unknown fields.
    353 
    354   * Proto3 now enforces strict UTF-8 checking. Parsing will fail if a string
    355     field contains non UTF-8 data.
    356 
    357   C++ (Beta)
    358   * Introduced new utility functions/classes in the google/protobuf/util
    359     directory:
    360       - MessageDifferencer: compare two proto messages and report their
    361                             differences.
    362       - JsonUtil: support converting protobuf binary format to/from JSON.
    363       - TimeUtil: utility functions to work with well-known types Timestamp
    364                   and Duration.
    365       - FieldMaskUtil: utility functions to work with FieldMask.
    366 
    367   * Performance optimization of arena construction and destruction.
    368   * Bug fixes for arena and maps support.
    369   * Changed to use cmake for Windows Visual Studio builds.
    370   * Added Bazel support.
    371 
    372   Java (Beta)
    373   * Introduced a new util package that will be distributed as a separate
    374     artifact in maven. It contains:
    375       - JsonFormat: convert proto messages to/from JSON.
    376       - TimeUtil: utility functions to work with Timestamp and Duration.
    377       - FieldMaskUtil: utility functions to work with FieldMask.
    378 
    379   * The static PARSER in each generated message is deprecated, and it will
    380     be removed in a future release. A static parser() getter is generated
    381     for each message type instead.
    382   * Performance optimizations for String fields serialization.
    383   * Performance optimizations for Lite runtime on Android:
    384       - Reduced allocations
    385       - Reduced method overhead after ProGuarding
    386       - Reduced code size after ProGuarding
    387 
    388   Python (Alpha)
    389   * Removed legacy Python 2.5 support.
    390   * Moved to a single Python 2.x/3.x-compatible codebase, instead of using 2to3.
    391   * Fixed build/tests on Python 2.6, 2.7, 3.3, and 3.4.
    392       - Pure-Python works on all four.
    393       - Python/C++ implementation works on all but 3.4, due to changes in the
    394         Python/C++ API in 3.4.
    395   * Some preliminary work has been done to allow for multiple DescriptorPools
    396     with Python/C++.
    397 
    398   Ruby (Alpha)
    399   * Many bugfixes:
    400       - fixed parsing/serialization of bytes, sint, sfixed types
    401       - other parser bugfixes
    402       - fixed memory leak affecting Ruby 2.2
    403 
    404   JavaNano (Alpha)
    405   * JavaNano generated code now will be put in a nano package by default to
    406     avoid conflicts with Java generated code.
    407 
    408   Objective-C (Alpha)
    409   * Added non-null markup to ObjC library. Requires SDK 8.4+ to build.
    410   * Many bugfixes:
    411       - Removed the class/enum filter.
    412       - Renamed some internal types to avoid conflicts with the well-known types
    413         protos.
    414       - Added missing support for parsing repeated primitive fields in packed or
    415         unpacked forms.
    416       - Added *Count for repeated and map<> fields to avoid auto-create when
    417         checking for them being set.
    418 
    419   C# (Alpha)
    420   * Namespace changed to Google.Protobuf (and NuGet package will be named
    421     correspondingly).
    422   * Target platforms now .NET 4.5 and selected portable subsets only.
    423   * Removed lite runtime.
    424   * Reimplementation to use mutable message types.
    425   * Null references used to represent "no value" for message type fields.
    426   * Proto3 semantics supported; proto2 files are prohibited for C# codegen.
    427     Most proto3 features supported:
    428       - JSON formatting (a.k.a. serialization to JSON), including well-known
    429         types (except for Any).
    430       - Wrapper types mapped to nullable value types (or string/ByteString
    431         allowing nullability). JSON parsing is not supported yet.
    432       - maps
    433       - oneof
    434       - enum unknown value preservation
    435 
    436 2015-05-25 version 3.0.0-alpha-3 (Objective-C/C#):
    437   General
    438   * Introduced two new language implementations (Objective-C, C#) to proto3.
    439   * Explicit "optional" keyword are disallowed in proto3 syntax, as fields are
    440     optional by default.
    441   * Group fields are no longer supported in proto3 syntax.
    442   * Changed repeated primitive fields to use packed serialization by default in
    443     proto3 (implemented for C++, Java, Python in this release).  The user can
    444     still disable packed serialization by setting packed to false for now.
    445   * Added well-known type protos (any.proto, empty.proto, timestamp.proto,
    446     duration.proto, etc.). Users can import and use these protos just like
    447     regular proto files. Additional runtime support will be added for them in
    448     future releases (in the form of utility helper functions, or having them
    449     replaced by language specific types in generated code).
    450   * Added a "reserved" keyword in both proto2 and proto3 syntax. User can use
    451     this keyword to declare reserved field numbers and names to prevent them
    452     from being reused by other fields in the same message.
    453 
    454     To reserve field numbers, add a reserved declaration in your message:
    455 
    456       message TestMessage {
    457         reserved 2, 15, 9 to 11, 3;
    458       }
    459 
    460     This reserves field numbers 2, 3, 9, 10, 11 and 15. If a user uses any of
    461     these as field numbers, the protocol buffer compiler will report an error.
    462 
    463     Field names can also be reserved:
    464 
    465       message TestMessage {
    466         reserved "foo", "bar";
    467       }
    468 
    469   * Various bug fixes since 3.0.0-alpha-2
    470 
    471   Objective-C
    472     Objective-C includes a code generator and a native objective-c runtime
    473     library.  By adding --objc_out to protoc, the code generator will generate
    474     a header(*.pbobjc.h) and an implementation file(*.pbobjc.m) for each proto
    475     file.
    476 
    477     In this first release, the generated interface provides: enums, messages,
    478     field support(single, repeated, map, oneof), proto2 and proto3 syntax
    479     support, parsing and serialization. Its  compatible with ARC and non-ARC
    480     usage. Besides, user can also access it via the swift bridging header.
    481 
    482     See objectivec/README.md for details.
    483 
    484   C#
    485     * C# protobufs are based on project
    486       https://github.com/jskeet/protobuf-csharp-port. The original project was
    487       frozen and all the new development will happen here.
    488     * Codegen plugin for C# was completely rewritten to C++ and is now an
    489       integral part of protoc.
    490     * Some refactorings and cleanup has been applied to the C# runtime library.
    491     * Only proto2 is supported in C# at the moment, proto3 support is in
    492       progress and will likely bring significant breaking changes to the API.
    493 
    494     See csharp/README.md for details.
    495 
    496   C++
    497     * Added runtime support for Any type. To use Any in your proto file, first
    498       import the definition of Any:
    499 
    500         // foo.proto
    501         import "google/protobuf/any.proto";
    502         message Foo {
    503           google.protobuf.Any any_field = 1;
    504         }
    505         message Bar {
    506           int32 value = 1;
    507         }
    508 
    509       Then in C++ you can access the Any field using PackFrom()/UnpackTo()
    510       methods:
    511 
    512         Foo foo;
    513         Bar bar = ...;
    514         foo.mutable_any_field()->PackFrom(bar);
    515         ...
    516         if (foo.any_field().IsType<Bar>()) {
    517           foo.any_field().UnpackTo(&bar);
    518           ...
    519         }
    520     * In text format, entries of a map field will be sorted by key.
    521 
    522   Java
    523     * Continued optimizations on the lite runtime to improve performance for
    524       Android.
    525 
    526   Python
    527     * Added map support.
    528       - maps now have a dict-like interface (msg.map_field[key] = value)
    529       - existing code that modifies maps via the repeated field interface
    530         will need to be updated.
    531 
    532   Ruby
    533     * Improvements to RepeatedField's emulation of the Ruby Array API.
    534     * Various speedups and internal cleanups.
    535 
    536 2015-02-26 version 3.0.0-alpha-2 (Python/Ruby/JavaNano):
    537   General
    538   * Introduced three new language implementations (Ruby, JavaNano, and
    539     Python) to proto3.
    540   * Various bug fixes since 3.0.0-alpha-1
    541 
    542   Python:
    543     Python has received several updates, most notably support for proto3
    544     semantics in any .proto file that declares syntax="proto3".
    545     Messages declared in proto3 files no longer represent field presence
    546     for scalar fields (number, enums, booleans, or strings).  You can
    547     no longer call HasField() for such fields, and they are serialized
    548     based on whether they have a non-zero/empty/false value.
    549 
    550     One other notable change is in the C++-accelerated implementation.
    551     Descriptor objects (which describe the protobuf schema and allow
    552     reflection over it) are no longer duplicated between the Python
    553     and C++ layers.  The Python descriptors are now simple wrappers
    554     around the C++ descriptors.  This change should significantly
    555     reduce the memory usage of programs that use a lot of message
    556     types.
    557 
    558   Ruby:
    559     We have added proto3 support for Ruby via a native C extension.
    560 
    561     The Ruby extension itself is included in the ruby/ directory, and details on
    562     building and installing the extension are in ruby/README.md. The extension
    563     will also be published as a Ruby gem. Code generator support is included as
    564     part of `protoc` with the `--ruby_out` flag.
    565 
    566     The Ruby extension implements a user-friendly DSL to define message types
    567     (also generated by the code generator from `.proto` files).  Once a message
    568     type is defined, the user may create instances of the message that behave in
    569     ways idiomatic to Ruby. For example:
    570 
    571     - Message fields are present as ordinary Ruby properties (getter method
    572       `foo` and setter method `foo=`).
    573     - Repeated field elements are stored in a container that acts like a native
    574       Ruby array, and map elements are stored in a container that acts like a
    575       native Ruby hashmap.
    576     - The usual well-known methods, such as `#to_s`, `#dup`, and the like, are
    577       present.
    578 
    579     Unlike several existing third-party Ruby extensions for protobuf, this
    580     extension is built on a "strongly-typed" philosophy: message fields and
    581     array/map containers will throw exceptions eagerly when values of the
    582     incorrect type are inserted.
    583 
    584     See ruby/README.md for details.
    585 
    586   JavaNano:
    587     JavaNano is a special code generator and runtime library designed especially
    588     for resource-restricted systems, like Android. It is very resource-friendly
    589     in both the amount of code and the runtime overhead. Here is an an overview
    590     of JavaNano features compared with the official Java protobuf:
    591 
    592     - No descriptors or message builders.
    593     - All messages are mutable; fields are public Java fields.
    594     - For optional fields only, encapsulation behind setter/getter/hazzer/
    595       clearer functions is opt-in, which provide proper 'has' state support.
    596     - For proto2, if not opted in, has state (field presence) is not available.
    597       Serialization outputs all fields not equal to their defaults.
    598       The behavior is consistent with proto3 semantics.
    599     - Required fields (proto2 only) are always serialized.
    600     - Enum constants are integers; protection against invalid values only
    601       when parsing from the wire.
    602     - Enum constants can be generated into container interfaces bearing
    603       the enum's name (so the referencing code is in Java style).
    604     - CodedInputByteBufferNano can only take byte[] (not InputStream).
    605     - Similarly CodedOutputByteBufferNano can only write to byte[].
    606     - Repeated fields are in arrays, not ArrayList or Vector. Null array
    607       elements are allowed and silently ignored.
    608     - Full support for serializing/deserializing repeated packed fields.
    609     - Support  extensions (in proto2).
    610     - Unset messages/groups are null, not an immutable empty default
    611       instance.
    612     - toByteArray(...) and mergeFrom(...) are now static functions of
    613       MessageNano.
    614     - The 'bytes' type translates to the Java type byte[].
    615 
    616     See javanano/README.txt for details.
    617 
    618 2014-12-01 version 3.0.0-alpha-1 (C++/Java):
    619 
    620   General
    621   * Introduced Protocol Buffers language version 3 (aka proto3).
    622 
    623     When protobuf was initially opensourced it implemented Protocol Buffers
    624     language version 2 (aka proto2), which is why the version number
    625     started from v2.0.0. From v3.0.0, a new language version (proto3) is
    626     introduced while the old version (proto2) will continue to be supported.
    627 
    628     The main intent of introducing proto3 is to clean up protobuf before
    629     pushing the language as the foundation of Google's new API platform.
    630     In proto3, the language is simplified, both for ease of use and  to
    631     make it available in a wider range of programming languages. At the
    632     same time a few features are added to better support common idioms
    633     found in APIs.
    634 
    635     The following are the main new features in language version 3:
    636 
    637       1. Removal of field presence logic for primitive value fields, removal
    638          of required fields, and removal of default values. This makes proto3
    639          significantly easier to implement with open struct representations,
    640          as in languages like Android Java, Objective C, or Go.
    641       2. Removal of unknown fields.
    642       3. Removal of extensions, which are instead replaced by a new standard
    643          type called Any.
    644       4. Fix semantics for unknown enum values.
    645       5. Addition of maps.
    646       6. Addition of a small set of standard types for representation of time,
    647          dynamic data, etc.
    648       7. A well-defined encoding in JSON as an alternative to binary proto
    649          encoding.
    650 
    651     This release (v3.0.0-alpha-1) includes partial proto3 support for C++ and
    652     Java. Items 6 (well-known types) and 7 (JSON format) in the above feature
    653     list are not implemented.
    654 
    655     A new notion "syntax" is introduced to specify whether a .proto file
    656     uses proto2 or proto3:
    657 
    658       // foo.proto
    659       syntax = "proto3";
    660       message Bar {...}
    661 
    662     If omitted, the protocol compiler will generate a warning and "proto2" will
    663     be used as the default. This warning will be turned into an error in a
    664     future release.
    665 
    666     We recommend that new Protocol Buffers users use proto3. However, we do not
    667     generally recommend that existing users migrate from proto2 from proto3 due
    668     to API incompatibility, and we will continue to support proto2 for a long
    669     time.
    670 
    671   * Added support for map fields (implemented in C++/Java for both proto2 and
    672     proto3).
    673 
    674     Map fields can be declared using the following syntax:
    675 
    676       message Foo {
    677         map<string, string> values = 1;
    678       }
    679 
    680     Data of a map field will be stored in memory as an unordered map and it
    681     can be accessed through generated accessors.
    682 
    683   C++
    684   * Added arena allocation support (for both proto2 and proto3).
    685 
    686     Profiling shows memory allocation and deallocation constitutes a significant
    687     fraction of CPU-time spent in protobuf code and arena allocation is a
    688     technique introduced to reduce this cost. With arena allocation, new
    689     objects will be allocated from a large piece of preallocated memory and
    690     deallocation of these objects is almost free. Early adoption shows 20% to
    691     50% improvement in some Google binaries.
    692 
    693     To enable arena support, add the following option to your .proto file:
    694 
    695       option cc_enable_arenas = true;
    696 
    697     Protocol compiler will generate additional code to make the generated
    698     message classes work with arenas. This does not change the existing API
    699     of protobuf messages and does not affect wire format. Your existing code
    700     should continue to work after adding this option. In the future we will
    701     make this option enabled by default.
    702 
    703     To actually take advantage of arena allocation, you need to use the arena
    704     APIs when creating messages. A quick example of using the arena API:
    705 
    706       {
    707         google::protobuf::Arena arena;
    708         // Allocate a protobuf message in the arena.
    709         MyMessage* message = Arena::CreateMessage<MyMessage>(&arena);
    710         // All submessages will be allocated in the same arena.
    711         if (!message->ParseFromString(data)) {
    712           // Deal with malformed input data.
    713         }
    714         // Must not delete the message here. It will be deleted automatically
    715         // when the arena is destroyed.
    716       }
    717 
    718     Currently arena does not work with map fields. Enabling arena in a .proto
    719     file containing map fields will result in compile errors in the generated
    720     code. This will be addressed in a future release.
    721 
    722 2014-10-20 version 2.6.1:
    723 
    724   C++
    725   * Added atomicops support for Solaris.
    726   * Released memory allocated by InitializeDefaultRepeatedFields() and
    727     GetEmptyString(). Some memory sanitizers reported them as memory leaks.
    728 
    729   Java
    730   * Updated DynamicMessage.setField() to handle repeated enum values
    731     correctly.
    732   * Fixed a bug that caused NullPointerException to be thrown when
    733     converting manually constructed FileDescriptorProto to
    734     FileDescriptor.
    735 
    736   Python
    737   * Fixed WhichOneof() to work with de-serialized protobuf messages.
    738   * Fixed a missing file problem of Python C++ implementation.
    739 
    740 2014-08-15 version 2.6.0:
    741 
    742   General
    743   * Added oneofs(unions) feature. Fields in the same oneof will share
    744     memory and at most one field can be set at the same time. Use the
    745     oneof keyword to define a oneof like:
    746       message SampleMessage {
    747         oneof test_oneof {
    748           string name = 4;
    749           YourMessage sub_message = 9;
    750         }
    751       }
    752   * Files, services, enums, messages, methods and enum values can be marked
    753     as deprecated now.
    754   * Added Support for list values, including lists of messages, when
    755     parsing text-formatted protos in C++ and Java.
    756       For example:  foo: [1, 2, 3]
    757 
    758   C++
    759   * Enhanced customization on TestFormat printing.
    760   * Added SwapFields() in reflection API to swap a subset of fields.
    761     Added SetAllocatedMessage() in reflection API.
    762   * Repeated primitive extensions are now packable. The
    763     [packed=true] option only affects serializers. Therefore, it is
    764     possible to switch a repeated extension field to packed format
    765     without breaking backwards-compatibility.
    766   * Various speed optimizations.
    767 
    768   Java
    769   * writeTo() method in ByteString can now write a substring to an
    770     output stream. Added endWith() method for ByteString.
    771   * ByteString and ByteBuffer are now supported in CodedInputStream
    772     and CodedOutputStream.
    773   * java_generate_equals_and_hash can now be used with the LITE_RUNTIME.
    774 
    775   Python
    776   * A new C++-backed extension module (aka "cpp api v2") that replaces the
    777     old ("cpp api v1") one.  Much faster than the pure Python code.  This one
    778     resolves many bugs and is recommended for general use over the
    779     pure Python when possible.
    780   * Descriptors now have enum_types_by_name and extension_types_by_name dict
    781     attributes.
    782   * Support for Python 3.
    783 
    784 2013-02-27 version 2.5.0:
    785 
    786   General
    787   * New notion "import public" that allows a proto file to forward the content
    788     it imports to its importers. For example,
    789       // foo.proto
    790       import public "bar.proto";
    791       import "baz.proto";
    792 
    793       // qux.proto
    794       import "foo.proto";
    795       // Stuff defined in bar.proto may be used in this file, but stuff from
    796       // baz.proto may NOT be used without importing it explicitly.
    797     This is useful for moving proto files. To move a proto file, just leave
    798     a single "import public" in the old proto file.
    799   * New enum option "allow_alias" that specifies whether different symbols can
    800     be assigned the same numeric value. Default value is "true". Setting it to
    801     false causes the compiler to reject enum definitions where multiple symbols
    802     have the same numeric value.
    803     Note: We plan to flip the default value to "false" in a future release.
    804     Projects using enum aliases should set the option to "true" in their .proto
    805     files.
    806 
    807   C++
    808   * New generated method set_allocated_foo(Type* foo) for message and string
    809     fields. This method allows you to set the field to a pre-allocated object
    810     and the containing message takes the ownership of that object.
    811   * Added SetAllocatedExtension() and ReleaseExtension() to extensions API.
    812   * Custom options are now formatted correctly when descriptors are printed in
    813     text format.
    814   * Various speed optimizations.
    815 
    816   Java
    817   * Comments in proto files are now collected and put into generated code as
    818     comments for corresponding classes and data members.
    819   * Added Parser to parse directly into messages without a Builder. For
    820     example,
    821       Foo foo = Foo.PARSER.ParseFrom(input);
    822     Using Parser is ~25% faster than using Builder to parse messages.
    823   * Added getters/setters to access the underlying ByteString of a string field
    824     directly.
    825   * ByteString now supports more operations: substring(), prepend(), and
    826     append(). The implementation of ByteString uses a binary tree structure
    827     to support these operations efficiently.
    828   * New method findInitializationErrors() that lists all missing required
    829     fields.
    830   * Various code size and speed optimizations.
    831 
    832   Python
    833   * Added support for dynamic message creation. DescriptorDatabase,
    834     DescriptorPool, and MessageFactory work like their C++ counterparts to
    835     simplify Descriptor construction from *DescriptorProtos, and MessageFactory
    836     provides a message instance from a Descriptor.
    837   * Added pickle support for protobuf messages.
    838   * Unknown fields are now preserved after parsing.
    839   * Fixed bug where custom options were not correctly populated. Custom
    840     options can be accessed now.
    841   * Added EnumTypeWrapper that provides better accessibility to enum types.
    842   * Added ParseMessage(descriptor, bytes) to generate a new Message instance
    843     from a descriptor and a byte string.
    844 
    845 2011-05-01 version 2.4.1:
    846 
    847   C++
    848   * Fixed the friendship problem for old compilers to make the library now gcc 3
    849     compatible again.
    850   * Fixed vcprojects/extract_includes.bat to extract compiler/plugin.h.
    851 
    852   Java
    853   * Removed usages of JDK 1.6 only features to make the library now JDK 1.5
    854     compatible again.
    855   * Fixed a bug about negative enum values.
    856   * serialVersionUID is now defined in generated messages for java serializing.
    857   * Fixed protoc to use java.lang.Object, which makes "Object" now a valid
    858     message name again.
    859 
    860   Python
    861   * Experimental C++ implementation now requires C++ protobuf library installed.
    862     See the README.txt in the python directory for details.
    863 
    864 2011-02-02 version 2.4.0:
    865 
    866   General
    867   * The RPC (cc|java|py)_generic_services default value is now false instead of
    868     true.
    869   * Custom options can have aggregate types. For example,
    870       message MyOption {
    871         optional string comment = 1;
    872         optional string author = 2;
    873       }
    874       extend google.protobuf.FieldOptions {
    875         optional MyOption myoption = 12345;
    876       }
    877     This option can now be set as follows:
    878       message SomeType {
    879         optional int32 field = 1 [(myoption) = { comment:'x' author:'y' }];
    880       }
    881 
    882   C++
    883   * Various speed and code size optimizations.
    884   * Added a release_foo() method on string and message fields.
    885   * Fixed gzip_output_stream sub-stream handling.
    886 
    887   Java
    888   * Builders now maintain sub-builders for sub-messages. Use getFooBuilder() to
    889     get the builder for the sub-message "foo". This allows you to repeatedly
    890     modify deeply-nested sub-messages without rebuilding them.
    891   * Builder.build() no longer invalidates the Builder for generated messages
    892     (You may continue to modify it and then build another message).
    893   * Code generator will generate efficient equals() and hashCode()
    894     implementations if new option java_generate_equals_and_hash is enabled.
    895     (Otherwise, reflection-based implementations are used.)
    896   * Generated messages now implement Serializable.
    897   * Fields with [deprecated=true] will be marked with @Deprecated in Java.
    898   * Added lazy conversion of UTF-8 encoded strings to String objects to improve
    899     performance.
    900   * Various optimizations.
    901   * Enum value can be accessed directly, instead of calling getNumber() on the
    902     enum member.
    903   * For each enum value, an integer constant is also generated with the suffix
    904     _VALUE.
    905 
    906   Python
    907   * Added an experimental  C++ implementation for Python messages via a Python
    908     extension. Implementation type is controlled by an environment variable
    909     PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION (valid values: "cpp" and "python")
    910     The default value is currently "python" but will be changed to "cpp" in
    911     future release.
    912   * Improved performance on message instantiation significantly.
    913     Most of the work on message instantiation is done just once per message
    914     class, instead of once per message instance.
    915   * Improved performance on text message parsing.
    916   * Allow add() to forward keyword arguments to the concrete class.
    917       E.g. instead of
    918         item = repeated_field.add()
    919         item.foo = bar
    920         item.baz = quux
    921       You can do:
    922         repeated_field.add(foo=bar, baz=quux)
    923   * Added a sort() interface to the BaseContainer.
    924   * Added an extend() method to repeated composite fields.
    925   * Added UTF8 debug string support.
    926 
    927 2010-01-08 version 2.3.0:
    928 
    929   General
    930   * Parsers for repeated numeric fields now always accept both packed and
    931     unpacked input.  The [packed=true] option only affects serializers.
    932     Therefore, it is possible to switch a field to packed format without
    933     breaking backwards-compatibility -- as long as all parties are using
    934     protobuf 2.3.0 or above, at least.
    935   * The generic RPC service code generated by the C++, Java, and Python
    936     generators can be disabled via file options:
    937       option cc_generic_services = false;
    938       option java_generic_services = false;
    939       option py_generic_services = false;
    940     This allows plugins to generate alternative code, possibly specific to some
    941     particular RPC implementation.
    942 
    943   protoc
    944   * Now supports a plugin system for code generators.  Plugins can generate
    945     code for new languages or inject additional code into the output of other
    946     code generators.  Plugins are just binaries which accept a protocol buffer
    947     on stdin and write a protocol buffer to stdout, so they may be written in
    948     any language.  See src/google/protobuf/compiler/plugin.proto.
    949     **WARNING**:  Plugins are experimental.  The interface may change in a
    950     future version.
    951   * If the output location ends in .zip or .jar, protoc will write its output
    952     to a zip/jar archive instead of a directory.  For example:
    953       protoc --java_out=myproto_srcs.jar --python_out=myproto.zip myproto.proto
    954     Currently the archive contents are not compressed, though this could change
    955     in the future.
    956   * inf, -inf, and nan can now be used as default values for float and double
    957     fields.
    958 
    959   C++
    960   * Various speed and code size optimizations.
    961   * DynamicMessageFactory is now fully thread-safe.
    962   * Message::Utf8DebugString() method is like DebugString() but avoids escaping
    963     UTF-8 bytes.
    964   * Compiled-in message types can now contain dynamic extensions, through use
    965     of CodedInputStream::SetExtensionRegistry().
    966   * Now compiles shared libraries (DLLs) by default on Cygwin and MinGW, to
    967     match other platforms.  Use --disable-shared to avoid this.
    968 
    969   Java
    970   * parseDelimitedFrom() and mergeDelimitedFrom() now detect EOF and return
    971     false/null instead of throwing an exception.
    972   * Fixed some initialization ordering bugs.
    973   * Fixes for OpenJDK 7.
    974 
    975   Python
    976   * 10-25 times faster than 2.2.0, still pure-Python.
    977   * Calling a mutating method on a sub-message always instantiates the message
    978     in its parent even if the mutating method doesn't actually mutate anything
    979     (e.g. parsing from an empty string).
    980   * Expanded descriptors a bit.
    981 
    982 2009-08-11 version 2.2.0:
    983 
    984   C++
    985   * Lite mode:  The "optimize_for = LITE_RUNTIME" option causes the compiler
    986     to generate code which only depends libprotobuf-lite, which is much smaller
    987     than libprotobuf but lacks descriptors, reflection, and some other features.
    988   * Fixed bug where Message.Swap(Message) was only implemented for
    989     optimize_for_speed.  Swap now properly implemented in both modes
    990     (Issue 91).
    991   * Added RemoveLast and SwapElements(index1, index2) to Reflection
    992     interface for repeated elements.
    993   * Added Swap(Message) to Reflection interface.
    994   * Floating-point literals in generated code that are intended to be
    995     single-precision now explicitly have 'f' suffix to avoid pedantic warnings
    996     produced by some compilers.
    997   * The [deprecated=true] option now causes the C++ code generator to generate
    998     a GCC-style deprecation annotation (no-op on other compilers).
    999   * google::protobuf::GetEnumDescriptor<SomeGeneratedEnumType>() returns the
   1000     EnumDescriptor for that type -- useful for templates which cannot call
   1001     SomeGeneratedEnumType_descriptor().
   1002   * Various optimizations and obscure bug fixes.
   1003 
   1004   Java
   1005   * Lite mode:  The "optimize_for = LITE_RUNTIME" option causes the compiler
   1006     to generate code which only depends libprotobuf-lite, which is much smaller
   1007     than libprotobuf but lacks descriptors, reflection, and some other features.
   1008   * Lots of style cleanups.
   1009 
   1010   Python
   1011   * Fixed endianness bug with floats and doubles.
   1012   * Text format parsing support.
   1013   * Fix bug with parsing packed repeated fields in embedded messages.
   1014   * Ability to initialize fields by passing keyword args to constructor.
   1015   * Support iterators in extend and __setslice__ for containers.
   1016 
   1017 2009-05-13 version 2.1.0:
   1018 
   1019   General
   1020   * Repeated fields of primitive types (types other that string, group, and
   1021     nested messages) may now use the option [packed = true] to get a more
   1022     efficient encoding.  In the new encoding, the entire list is written
   1023     as a single byte blob using the "length-delimited" wire type.  Within
   1024     this blob, the individual values are encoded the same way they would
   1025     be normally except without a tag before each value (thus, they are
   1026     tightly "packed").
   1027   * For each field, the generated code contains an integer constant assigned
   1028     to the field number.  For example, the .proto file:
   1029       message Foo { optional int bar_baz = 123; }
   1030     would generate the following constants, all with the integer value 123:
   1031       C++:     Foo::kBarBazFieldNumber
   1032       Java:    Foo.BAR_BAZ_FIELD_NUMBER
   1033       Python:  Foo.BAR_BAZ_FIELD_NUMBER
   1034     Constants are also generated for extensions, with the same naming scheme.
   1035     These constants may be used as switch cases.
   1036   * Updated bundled Google Test to version 1.3.0.  Google Test is now bundled
   1037     in its verbatim form as a nested autoconf package, so you can drop in any
   1038     other version of Google Test if needed.
   1039   * optimize_for = SPEED is now the default, by popular demand.  Use
   1040     optimize_for = CODE_SIZE if code size is more important in your app.
   1041   * It is now an error to define a default value for a repeated field.
   1042     Previously, this was silently ignored (it had no effect on the generated
   1043     code).
   1044   * Fields can now be marked deprecated like:
   1045       optional int32 foo = 1 [deprecated = true];
   1046     Currently this does not have any actual effect, but in the future the code
   1047     generators may generate deprecation annotations in each language.
   1048   * Cross-compiling should now be possible using the --with-protoc option to
   1049     configure.  See README.txt for more info.
   1050 
   1051   protoc
   1052   * --error_format=msvs option causes errors to be printed in Visual Studio
   1053     format, which should allow them to be clicked on in the build log to go
   1054     directly to the error location.
   1055   * The type name resolver will no longer resolve type names to fields.  For
   1056     example, this now works:
   1057       message Foo {}
   1058       message Bar {
   1059         optional int32 Foo = 1;
   1060         optional Foo baz = 2;
   1061       }
   1062     Previously, the type of "baz" would resolve to "Bar.Foo", and you'd get
   1063     an error because Bar.Foo is a field, not a type.  Now the type of "baz"
   1064     resolves to the message type Foo.  This change is unlikely to make a
   1065     difference to anyone who follows the Protocol Buffers style guide.
   1066 
   1067   C++
   1068   * Several optimizations, including but not limited to:
   1069     - Serialization, especially to flat arrays, is 10%-50% faster, possibly
   1070       more for small objects.
   1071     - Several descriptor operations which previously required locking no longer
   1072       do.
   1073     - Descriptors are now constructed lazily on first use, rather than at
   1074       process startup time.  This should save memory in programs which do not
   1075       use descriptors or reflection.
   1076     - UnknownFieldSet completely redesigned to be more efficient (especially in
   1077       terms of memory usage).
   1078     - Various optimizations to reduce code size (though the serialization speed
   1079       optimizations increased code size).
   1080   * Message interface has method ParseFromBoundedZeroCopyStream() which parses
   1081     a limited number of bytes from an input stream rather than parsing until
   1082     EOF.
   1083   * GzipInputStream and GzipOutputStream support reading/writing gzip- or
   1084     zlib-compressed streams if zlib is available.
   1085     (google/protobuf/io/gzip_stream.h)
   1086   * DescriptorPool::FindAllExtensions() and corresponding
   1087     DescriptorDatabase::FindAllExtensions() can be used to enumerate all
   1088     extensions of a given type.
   1089   * For each enum type Foo, protoc will generate functions:
   1090       const string& Foo_Name(Foo value);
   1091       bool Foo_Parse(const string& name, Foo* result);
   1092     The former returns the name of the enum constant corresponding to the given
   1093     value while the latter finds the value corresponding to a name.
   1094   * RepeatedField and RepeatedPtrField now have back-insertion iterators.
   1095   * String fields now have setters that take a char* and a size, in addition
   1096     to the existing ones that took char* or const string&.
   1097   * DescriptorPool::AllowUnknownDependencies() may be used to tell
   1098     DescriptorPool to create placeholder descriptors for unknown entities
   1099     referenced in a FileDescriptorProto.  This can allow you to parse a .proto
   1100     file without having access to other .proto files that it imports, for
   1101     example.
   1102   * Updated gtest to latest version.  The gtest package is now included as a
   1103     nested autoconf package, so it should be able to drop new versions into the
   1104     "gtest" subdirectory without modification.
   1105 
   1106   Java
   1107   * Fixed bug where Message.mergeFrom(Message) failed to merge extensions.
   1108   * Message interface has new method toBuilder() which is equivalent to
   1109     newBuilderForType().mergeFrom(this).
   1110   * All enums now implement the ProtocolMessageEnum interface.
   1111   * Setting a field to null now throws NullPointerException.
   1112   * Fixed tendency for TextFormat's parsing to overflow the stack when
   1113     parsing large string values.  The underlying problem is with Java's
   1114     regex implementation (which unfortunately uses recursive backtracking
   1115     rather than building an NFA).  Worked around by making use of possessive
   1116     quantifiers.
   1117   * Generated service classes now also generate pure interfaces.  For a service
   1118     Foo, Foo.Interface is a pure interface containing all of the service's
   1119     defined methods.  Foo.newReflectiveService() can be called to wrap an
   1120     instance of this interface in a class that implements the generic
   1121     RpcService interface, which provides reflection support that is usually
   1122     needed by RPC server implementations.
   1123   * RPC interfaces now support blocking operation in addition to non-blocking.
   1124     The protocol compiler generates separate blocking and non-blocking stubs
   1125     which operate against separate blocking and non-blocking RPC interfaces.
   1126     RPC implementations will have to implement the new interfaces in order to
   1127     support blocking mode.
   1128   * New I/O methods parseDelimitedFrom(), mergeDelimitedFrom(), and
   1129     writeDelimitedTo() read and write "delimited" messages from/to a stream,
   1130     meaning that the message size precedes the data.  This way, you can write
   1131     multiple messages to a stream without having to worry about delimiting
   1132     them yourself.
   1133   * Throw a more descriptive exception when build() is double-called.
   1134   * Add a method to query whether CodedInputStream is at the end of the input
   1135     stream.
   1136   * Add a method to reset a CodedInputStream's size counter; useful when
   1137     reading many messages with the same stream.
   1138   * equals() and hashCode() now account for unknown fields.
   1139 
   1140   Python
   1141   * Added slicing support for repeated scalar fields. Added slice retrieval and
   1142     removal of repeated composite fields.
   1143   * Updated RPC interfaces to allow for blocking operation.  A client may
   1144     now pass None for a callback when making an RPC, in which case the
   1145     call will block until the response is received, and the response
   1146     object will be returned directly to the caller.  This interface change
   1147     cannot be used in practice until RPC implementations are updated to
   1148     implement it.
   1149   * Changes to input_stream.py should make protobuf compatible with appengine.
   1150 
   1151 2008-11-25 version 2.0.3:
   1152 
   1153   protoc
   1154   * Enum values may now have custom options, using syntax similar to field
   1155     options.
   1156   * Fixed bug where .proto files which use custom options but don't actually
   1157     define them (i.e. they import another .proto file defining the options)
   1158     had to explicitly import descriptor.proto.
   1159   * Adjacent string literals in .proto files will now be concatenated, like in
   1160     C.
   1161   * If an input file is a Windows absolute path (e.g. "C:\foo\bar.proto") and
   1162     the import path only contains "." (or contains "." but does not contain
   1163     the file), protoc incorrectly thought that the file was under ".", because
   1164     it thought that the path was relative (since it didn't start with a slash).
   1165     This has been fixed.
   1166 
   1167   C++
   1168   * Generated message classes now have a Swap() method which efficiently swaps
   1169     the contents of two objects.
   1170   * All message classes now have a SpaceUsed() method which returns an estimate
   1171     of the number of bytes of allocated memory currently owned by the object.
   1172     This is particularly useful when you are reusing a single message object
   1173     to improve performance but want to make sure it doesn't bloat up too large.
   1174   * New method Message::SerializeAsString() returns a string containing the
   1175     serialized data.  May be more convenient than calling
   1176     SerializeToString(string*).
   1177   * In debug mode, log error messages when string-type fields are found to
   1178     contain bytes that are not valid UTF-8.
   1179   * Fixed bug where a message with multiple extension ranges couldn't parse
   1180     extensions.
   1181   * Fixed bug where MergeFrom(const Message&) didn't do anything if invoked on
   1182     a message that contained no fields (but possibly contained extensions).
   1183   * Fixed ShortDebugString() to not be O(n^2).  Durr.
   1184   * Fixed crash in TextFormat parsing if the first token in the input caused a
   1185     tokenization error.
   1186   * Fixed obscure bugs in zero_copy_stream_impl.cc.
   1187   * Added support for HP C++ on Tru64.
   1188   * Only build tests on "make check", not "make".
   1189   * Fixed alignment issue that caused crashes when using DynamicMessage on
   1190     64-bit Sparc machines.
   1191   * Simplify template usage to work with MSVC 2003.
   1192   * Work around GCC 4.3.x x86_64 compiler bug that caused crashes on startup.
   1193     (This affected Fedora 9 in particular.)
   1194   * Now works on "Solaris 10 using recent Sun Studio".
   1195 
   1196   Java
   1197   * New overload of mergeFrom() which parses a slice of a byte array instead
   1198     of the whole thing.
   1199   * New method ByteString.asReadOnlyByteBuffer() does what it sounds like.
   1200   * Improved performance of isInitialized() when optimizing for code size.
   1201 
   1202   Python
   1203   * Corrected ListFields() signature in Message base class to match what
   1204     subclasses actually implement.
   1205   * Some minor refactoring.
   1206   * Don't pass self as first argument to superclass constructor (no longer
   1207     allowed in Python 2.6).
   1208 
   1209 2008-09-29 version 2.0.2:
   1210 
   1211   General
   1212   * License changed from Apache 2.0 to New BSD.
   1213   * It is now possible to define custom "options", which are basically
   1214     annotations which may be placed on definitions in a .proto file.
   1215     For example, you might define a field option called "foo" like so:
   1216       import "google/protobuf/descriptor.proto"
   1217       extend google.protobuf.FieldOptions {
   1218         optional string foo = 12345;
   1219       }
   1220     Then you annotate a field using the "foo" option:
   1221       message MyMessage {
   1222         optional int32 some_field = 1 [(foo) = "bar"]
   1223       }
   1224     The value of this option is then visible via the message's
   1225     Descriptor:
   1226       const FieldDescriptor* field =
   1227         MyMessage::descriptor()->FindFieldByName("some_field");
   1228       assert(field->options().GetExtension(foo) == "bar");
   1229     This feature has been implemented and tested in C++ and Java.
   1230     Other languages may or may not need to do extra work to support
   1231     custom options, depending on how they construct descriptors.
   1232 
   1233   C++
   1234   * Fixed some GCC warnings that only occur when using -pedantic.
   1235   * Improved static initialization code, making ordering more
   1236     predictable among other things.
   1237   * TextFormat will no longer accept messages which contain multiple
   1238     instances of a singular field.  Previously, the latter instance
   1239     would overwrite the former.
   1240   * Now works on systems that don't have hash_map.
   1241 
   1242   Java
   1243   * Print @Override annotation in generated code where appropriate.
   1244 
   1245   Python
   1246   * Strings now use the "unicode" type rather than the "str" type.
   1247     String fields may still be assigned ASCII "str" values; they will
   1248     automatically be converted.
   1249   * Adding a property to an object representing a repeated field now
   1250     raises an exception.  For example:
   1251       # No longer works (and never should have).
   1252       message.some_repeated_field.foo = 1
   1253 
   1254   Windows
   1255   * We now build static libraries rather than DLLs by default on MSVC.
   1256     See vsprojects/readme.txt for more information.
   1257 
   1258 2008-08-15 version 2.0.1:
   1259 
   1260   protoc
   1261   * New flags --encode and --decode can be used to convert between protobuf text
   1262     format and binary format from the command-line.
   1263   * New flag --descriptor_set_out can be used to write FileDescriptorProtos for
   1264     all parsed files directly into a single output file.  This is particularly
   1265     useful if you wish to parse .proto files from programs written in languages
   1266     other than C++: just run protoc as a background process and have it output
   1267     a FileDescriptorList, then parse that natively.
   1268   * Improved error message when an enum value's name conflicts with another
   1269     symbol defined in the enum type's scope, e.g. if two enum types declared
   1270     in the same scope have values with the same name.  This is disallowed for
   1271     compatibility with C++, but this wasn't clear from the error.
   1272   * Fixed absolute output paths on Windows.
   1273   * Allow trailing slashes in --proto_path mappings.
   1274 
   1275   C++
   1276   * Reflection objects are now per-class rather than per-instance.  To make this
   1277     possible, the Reflection interface had to be changed such that all methods
   1278     take the Message instance as a parameter.  This change improves performance
   1279     significantly in memory-bandwidth-limited use cases, since it makes the
   1280     message objects smaller.  Note that source-incompatible interface changes
   1281     like this will not be made again after the library leaves beta.
   1282   * Heuristically detect sub-messages when printing unknown fields.
   1283   * Fix static initialization ordering bug that caused crashes at startup when
   1284     compiling on Mac with static linking.
   1285   * Fixed TokenizerTest when compiling with -DNDEBUG on Linux.
   1286   * Fixed incorrect definition of kint32min.
   1287   * Fix bytes type setter to work with byte sequences with embedded NULLs.
   1288   * Other irrelevant tweaks.
   1289 
   1290   Java
   1291   * Fixed UnknownFieldSet's parsing of varints larger than 32 bits.
   1292   * Fixed TextFormat's parsing of "inf" and "nan".
   1293   * Fixed TextFormat's parsing of comments.
   1294   * Added info to Java POM that will be required when we upload the
   1295     package to a Maven repo.
   1296 
   1297   Python
   1298   * MergeFrom(message) and CopyFrom(message) are now implemented.
   1299   * SerializeToString() raises an exception if the message is missing required
   1300     fields.
   1301   * Code organization improvements.
   1302   * Fixed doc comments for RpcController and RpcChannel, which had somehow been
   1303     swapped.
   1304   * Fixed text_format_test on Windows where floating-point exponents sometimes
   1305     contain extra zeros.
   1306   * Fix Python service CallMethod() implementation.
   1307 
   1308   Other
   1309   * Improved readmes.
   1310   * VIM syntax highlighting improvements.
   1311 
   1312 2008-07-07 version 2.0.0:
   1313 
   1314   * First public release.
   1315