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