OLD | NEW |
1 2012-09-19 version 2.5.0: | 1 2015-08-26 version 3.0.0-beta-1 (C++/Java/Python/Ruby/Nano/Objective-C/C#/JavaSr
ipt) |
| 2 General |
| 3 * Intorduced a new language implementaion: 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. Addtional 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 intergral 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 impelmented. |
| 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 mesaages, 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: |
2 | 517 |
3 General | 518 General |
4 * New notion "import public" that allows a proto file to forward the content | 519 * New notion "import public" that allows a proto file to forward the content |
5 it imports to its importers. For example, | 520 it imports to its importers. For example, |
6 // foo.proto | 521 // foo.proto |
7 import public "bar.proto"; | 522 import public "bar.proto"; |
8 import "baz.proto"; | 523 import "baz.proto"; |
9 | 524 |
10 // qux.proto | 525 // qux.proto |
11 import "foo.proto"; | 526 import "foo.proto"; |
12 // Stuff defined in bar.proto may be used in this file, but stuff from | 527 // Stuff defined in bar.proto may be used in this file, but stuff from |
13 // baz.proto may NOT be used without importing it explicitly. | 528 // baz.proto may NOT be used without importing it explicitly. |
14 This is useful for moving proto files. To move a proto file, just leave | 529 This is useful for moving proto files. To move a proto file, just leave |
15 a single "import public" in the old proto file. | 530 a single "import public" in the old proto file. |
16 * New enum option "allow_alias" that specifies whether different symbols can | 531 * New enum option "allow_alias" that specifies whether different symbols can |
17 be assigned the same numeric value. Default value is "true". Setting it to | 532 be assigned the same numeric value. Default value is "true". Setting it to |
18 false causes the compiler to reject enum definitions where multiple symbols | 533 false causes the compiler to reject enum definitions where multiple symbols |
19 have the same numeric value. | 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. |
20 | 538 |
21 C++ | 539 C++ |
22 * New generated method set_allocated_foo(Type* foo) for message and string | 540 * New generated method set_allocated_foo(Type* foo) for message and string |
23 fields. This method allows you to set the field to a pre-allocated object | 541 fields. This method allows you to set the field to a pre-allocated object |
24 and the containing message takes the ownership of that object. | 542 and the containing message takes the ownership of that object. |
25 * Added SetAllocatedExtension() and ReleaseExtension() to extensions API. | 543 * Added SetAllocatedExtension() and ReleaseExtension() to extensions API. |
26 * Custom options are now formatted correctly when descriptors are printed in | 544 * Custom options are now formatted correctly when descriptors are printed in |
27 text format. | 545 text format. |
28 * Various speed optimizations. | 546 * Various speed optimizations. |
29 | 547 |
30 Java | 548 Java |
31 * Comments in proto files are now collected and put into generated code as | 549 * Comments in proto files are now collected and put into generated code as |
32 comments for corresponding classes and data members. | 550 comments for corresponding classes and data members. |
33 * Added Parser to parse directly into messages without a Builder. For | 551 * Added Parser to parse directly into messages without a Builder. For |
34 example, | 552 example, |
35 Foo foo = Foo.getParser().ParseFrom(input); | 553 Foo foo = Foo.PARSER.ParseFrom(input); |
36 Using Parser is ~25% faster than using Builder to parse messages. | 554 Using Parser is ~25% faster than using Builder to parse messages. |
37 * Added getters/setters to access the underlying ByteString of a string field | 555 * Added getters/setters to access the underlying ByteString of a string field |
38 directly. | 556 directly. |
39 * ByteString now supports more operations: substring(), prepend(), and | 557 * ByteString now supports more operations: substring(), prepend(), and |
40 append(). The implementation of ByteString uses a binary tree structure | 558 append(). The implementation of ByteString uses a binary tree structure |
41 to support these operations efficiently. | 559 to support these operations efficiently. |
42 * New method findInitializationErrors() that lists all missing required | 560 * New method findInitializationErrors() that lists all missing required |
43 fields. | 561 fields. |
44 * Various code size and speed optimizations. | 562 * Various code size and speed optimizations. |
45 | 563 |
(...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
519 contain extra zeros. | 1037 contain extra zeros. |
520 * Fix Python service CallMethod() implementation. | 1038 * Fix Python service CallMethod() implementation. |
521 | 1039 |
522 Other | 1040 Other |
523 * Improved readmes. | 1041 * Improved readmes. |
524 * VIM syntax highlighting improvements. | 1042 * VIM syntax highlighting improvements. |
525 | 1043 |
526 2008-07-07 version 2.0.0: | 1044 2008-07-07 version 2.0.0: |
527 | 1045 |
528 * First public release. | 1046 * First public release. |
OLD | NEW |