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