jieluo@google.com | 1eba9d9 | 2014-08-25 20:17:53 +0000 | [diff] [blame] | 1 | 2014-08-15 version 2.6.0: |
| 2 | |
| 3 | General |
| 4 | * Added oneofs(unions) feature. Fields in the same oneof will share |
| 5 | memory and at most one field can be set at the same time. Use the |
| 6 | oneof keyword to define a oneof like: |
| 7 | message SampleMessage { |
| 8 | oneof test_oneof { |
| 9 | string name = 4; |
| 10 | YourMessage sub_message = 9; |
| 11 | } |
| 12 | } |
| 13 | * Files, services, enums, messages, methods and enum values can be marked |
| 14 | as deprecated now. |
| 15 | * Added Support for list values, including lists of mesaages, when |
| 16 | parsing text-formatted protos in C++ and Java. |
| 17 | For example: foo: [1, 2, 3] |
| 18 | |
| 19 | C++ |
| 20 | * Enhanced customization on TestFormat printing. |
| 21 | * Added SwapFields() in reflection API to swap a subset of fields. |
| 22 | Added SetAllocatedMessage() in reflection API. |
| 23 | * Repeated primitive extensions are now packable. The |
| 24 | [packed=true] option only affects serializers. Therefore, it is |
| 25 | possible to switch a repeated extension field to packed format |
| 26 | without breaking backwards-compatibility. |
| 27 | * Various speed optimizations. |
| 28 | |
| 29 | Java |
| 30 | * writeTo() method in ByteString can now write a substring to an |
| 31 | output stream. Added endWith() method for ByteString. |
| 32 | * ByteString and ByteBuffer are now supported in CodedInputStream |
| 33 | and CodedOutputStream. |
| 34 | * java_generate_equals_and_hash can now be used with the LITE_RUNTIME. |
| 35 | |
| 36 | Python |
| 37 | * A new C++-backed extension module (aka "cpp api v2") that replaces the |
| 38 | old ("cpp api v1") one. Much faster than the pure Python code. This one |
| 39 | resolves many bugs and is recommended for general use over the |
| 40 | pure Python when possible. |
| 41 | * Descriptors now have enum_types_by_name and extension_types_by_name dict |
| 42 | attributes. |
| 43 | * Support for Python 3. |
| 44 | |
xiaofeng@google.com | 2c9392f | 2013-02-28 06:12:28 +0000 | [diff] [blame] | 45 | 2013-02-27 version 2.5.0: |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 46 | |
| 47 | General |
| 48 | * New notion "import public" that allows a proto file to forward the content |
| 49 | it imports to its importers. For example, |
| 50 | // foo.proto |
| 51 | import public "bar.proto"; |
| 52 | import "baz.proto"; |
| 53 | |
| 54 | // qux.proto |
| 55 | import "foo.proto"; |
| 56 | // Stuff defined in bar.proto may be used in this file, but stuff from |
| 57 | // baz.proto may NOT be used without importing it explicitly. |
| 58 | This is useful for moving proto files. To move a proto file, just leave |
| 59 | a single "import public" in the old proto file. |
| 60 | * New enum option "allow_alias" that specifies whether different symbols can |
| 61 | be assigned the same numeric value. Default value is "true". Setting it to |
| 62 | false causes the compiler to reject enum definitions where multiple symbols |
| 63 | have the same numeric value. |
xiaofeng@google.com | 7f4c9e8 | 2013-03-05 01:51:21 +0000 | [diff] [blame] | 64 | Note: We plan to flip the default value to "false" in a future release. |
| 65 | Projects using enum aliases should set the option to "true" in their .proto |
| 66 | files. |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 67 | |
| 68 | C++ |
| 69 | * New generated method set_allocated_foo(Type* foo) for message and string |
| 70 | fields. This method allows you to set the field to a pre-allocated object |
| 71 | and the containing message takes the ownership of that object. |
| 72 | * Added SetAllocatedExtension() and ReleaseExtension() to extensions API. |
| 73 | * Custom options are now formatted correctly when descriptors are printed in |
| 74 | text format. |
| 75 | * Various speed optimizations. |
| 76 | |
| 77 | Java |
| 78 | * Comments in proto files are now collected and put into generated code as |
| 79 | comments for corresponding classes and data members. |
| 80 | * Added Parser to parse directly into messages without a Builder. For |
| 81 | example, |
xiaofeng@google.com | 2c9392f | 2013-02-28 06:12:28 +0000 | [diff] [blame] | 82 | Foo foo = Foo.PARSER.ParseFrom(input); |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 83 | Using Parser is ~25% faster than using Builder to parse messages. |
| 84 | * Added getters/setters to access the underlying ByteString of a string field |
| 85 | directly. |
| 86 | * ByteString now supports more operations: substring(), prepend(), and |
| 87 | append(). The implementation of ByteString uses a binary tree structure |
| 88 | to support these operations efficiently. |
| 89 | * New method findInitializationErrors() that lists all missing required |
| 90 | fields. |
| 91 | * Various code size and speed optimizations. |
| 92 | |
| 93 | Python |
| 94 | * Added support for dynamic message creation. DescriptorDatabase, |
| 95 | DescriptorPool, and MessageFactory work like their C++ couterparts to |
| 96 | simplify Descriptor construction from *DescriptorProtos, and MessageFactory |
| 97 | provides a message instance from a Descriptor. |
| 98 | * Added pickle support for protobuf messages. |
| 99 | * Unknown fields are now preserved after parsing. |
| 100 | * Fixed bug where custom options were not correctly populated. Custom |
| 101 | options can be accessed now. |
| 102 | * Added EnumTypeWrapper that provides better accessibility to enum types. |
| 103 | * Added ParseMessage(descriptor, bytes) to generate a new Message instance |
| 104 | from a descriptor and a byte string. |
| 105 | |
liujisi@google.com | 5d99632 | 2011-04-30 15:29:09 +0000 | [diff] [blame] | 106 | 2011-05-01 version 2.4.1: |
| 107 | |
| 108 | C++ |
| 109 | * Fixed the frendship problem for old compilers to make the library now gcc 3 |
| 110 | compatible again. |
| 111 | * Fixed vcprojects/extract_includes.bat to extract compiler/plugin.h. |
| 112 | |
| 113 | Java |
| 114 | * Removed usages of JDK 1.6 only features to make the library now JDK 1.5 |
| 115 | compatible again. |
| 116 | * Fixed a bug about negative enum values. |
| 117 | * serialVersionUID is now defined in generated messages for java serializing. |
| 118 | * Fixed protoc to use java.lang.Object, which makes "Object" now a valid |
| 119 | message name again. |
| 120 | |
| 121 | Python |
| 122 | * Experimental C++ implementation now requires C++ protobuf library installed. |
| 123 | See the README.txt in the python directory for details. |
| 124 | |
liujisi@google.com | 7a26147 | 2011-02-02 14:04:22 +0000 | [diff] [blame] | 125 | 2011-02-02 version 2.4.0: |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 126 | |
| 127 | General |
| 128 | * The RPC (cc|java|py)_generic_services default value is now false instead of |
| 129 | true. |
| 130 | * Custom options can have aggregate types. For example, |
| 131 | message MyOption { |
| 132 | optional string comment = 1; |
| 133 | optional string author = 2; |
| 134 | } |
| 135 | extend google.protobuf.FieldOptions { |
| 136 | optional MyOption myoption = 12345; |
| 137 | } |
| 138 | This option can now be set as follows: |
| 139 | message SomeType { |
| 140 | optional int32 field = 1 [(myoption) = { comment:'x' author:'y' }]; |
| 141 | } |
| 142 | |
| 143 | C++ |
| 144 | * Various speed and code size optimizations. |
| 145 | * Added a release_foo() method on string and message fields. |
| 146 | * Fixed gzip_output_stream sub-stream handling. |
| 147 | |
| 148 | Java |
| 149 | * Builders now maintain sub-builders for sub-messages. Use getFooBuilder() to |
| 150 | get the builder for the sub-message "foo". This allows you to repeatedly |
| 151 | modify deeply-nested sub-messages without rebuilding them. |
| 152 | * Builder.build() no longer invalidates the Builder for generated messages |
| 153 | (You may continue to modify it and then build another message). |
| 154 | * Code generator will generate efficient equals() and hashCode() |
| 155 | implementations if new option java_generate_equals_and_hash is enabled. |
| 156 | (Otherwise, reflection-based implementations are used.) |
| 157 | * Generated messages now implement Serializable. |
| 158 | * Fields with [deprecated=true] will be marked with @Deprecated in Java. |
| 159 | * Added lazy conversion of UTF-8 encoded strings to String objects to improve |
| 160 | performance. |
| 161 | * Various optimizations. |
| 162 | * Enum value can be accessed directly, instead of calling getNumber() on the |
| 163 | enum member. |
| 164 | * For each enum value, an integer constant is also generated with the suffix |
| 165 | _VALUE. |
| 166 | |
| 167 | Python |
| 168 | * Added an experimental C++ implementation for Python messages via a Python |
| 169 | extension. Implementation type is controlled by an environment variable |
| 170 | PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION (valid values: "cpp" and "python") |
| 171 | The default value is currently "python" but will be changed to "cpp" in |
| 172 | future release. |
| 173 | * Improved performance on message instantiation significantly. |
| 174 | Most of the work on message instantiation is done just once per message |
| 175 | class, instead of once per message instance. |
| 176 | * Improved performance on text message parsing. |
| 177 | * Allow add() to forward keyword arguments to the concrete class. |
| 178 | E.g. instead of |
| 179 | item = repeated_field.add() |
| 180 | item.foo = bar |
| 181 | item.baz = quux |
| 182 | You can do: |
| 183 | repeated_field.add(foo=bar, baz=quux) |
| 184 | * Added a sort() interface to the BaseContainer. |
| 185 | * Added an extend() method to repeated composite fields. |
| 186 | * Added UTF8 debug string support. |
| 187 | |
temporal | d4e38c7 | 2010-01-09 07:35:50 +0000 | [diff] [blame] | 188 | 2010-01-08 version 2.3.0: |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 189 | |
| 190 | General |
| 191 | * Parsers for repeated numeric fields now always accept both packed and |
| 192 | unpacked input. The [packed=true] option only affects serializers. |
| 193 | Therefore, it is possible to switch a field to packed format without |
| 194 | breaking backwards-compatibility -- as long as all parties are using |
| 195 | protobuf 2.3.0 or above, at least. |
| 196 | * The generic RPC service code generated by the C++, Java, and Python |
| 197 | generators can be disabled via file options: |
| 198 | option cc_generic_services = false; |
| 199 | option java_generic_services = false; |
| 200 | option py_generic_services = false; |
| 201 | This allows plugins to generate alternative code, possibly specific to some |
| 202 | particular RPC implementation. |
| 203 | |
| 204 | protoc |
| 205 | * Now supports a plugin system for code generators. Plugins can generate |
| 206 | code for new languages or inject additional code into the output of other |
| 207 | code generators. Plugins are just binaries which accept a protocol buffer |
| 208 | on stdin and write a protocol buffer to stdout, so they may be written in |
| 209 | any language. See src/google/protobuf/compiler/plugin.proto. |
kenton@google.com | 7f4938b | 2009-12-22 22:57:39 +0000 | [diff] [blame] | 210 | **WARNING**: Plugins are experimental. The interface may change in a |
| 211 | future version. |
kenton@google.com | 0225b35 | 2010-01-04 22:07:09 +0000 | [diff] [blame] | 212 | * If the output location ends in .zip or .jar, protoc will write its output |
| 213 | to a zip/jar archive instead of a directory. For example: |
| 214 | protoc --java_out=myproto_srcs.jar --python_out=myproto.zip myproto.proto |
| 215 | Currently the archive contents are not compressed, though this could change |
| 216 | in the future. |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 217 | * inf, -inf, and nan can now be used as default values for float and double |
| 218 | fields. |
| 219 | |
| 220 | C++ |
| 221 | * Various speed and code size optimizations. |
| 222 | * DynamicMessageFactory is now fully thread-safe. |
| 223 | * Message::Utf8DebugString() method is like DebugString() but avoids escaping |
| 224 | UTF-8 bytes. |
| 225 | * Compiled-in message types can now contain dynamic extensions, through use |
| 226 | of CodedInputStream::SetExtensionRegistry(). |
kenton@google.com | c0ee4d2 | 2009-12-22 02:05:33 +0000 | [diff] [blame] | 227 | * Now compiles shared libraries (DLLs) by default on Cygwin and MinGW, to |
| 228 | match other platforms. Use --disable-shared to avoid this. |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 229 | |
| 230 | Java |
| 231 | * parseDelimitedFrom() and mergeDelimitedFrom() now detect EOF and return |
| 232 | false/null instead of throwing an exception. |
| 233 | * Fixed some initialization ordering bugs. |
| 234 | * Fixes for OpenJDK 7. |
| 235 | |
| 236 | Python |
| 237 | * 10-25 times faster than 2.2.0, still pure-Python. |
| 238 | * Calling a mutating method on a sub-message always instantiates the message |
| 239 | in its parent even if the mutating method doesn't actually mutate anything |
| 240 | (e.g. parsing from an empty string). |
| 241 | * Expanded descriptors a bit. |
| 242 | |
kenton@google.com | 201b9be | 2009-08-12 00:23:05 +0000 | [diff] [blame] | 243 | 2009-08-11 version 2.2.0: |
kenton@google.com | ceb561d | 2009-06-25 19:05:36 +0000 | [diff] [blame] | 244 | |
| 245 | C++ |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 246 | * Lite mode: The "optimize_for = LITE_RUNTIME" option causes the compiler |
| 247 | to generate code which only depends libprotobuf-lite, which is much smaller |
| 248 | than libprotobuf but lacks descriptors, reflection, and some other features. |
kenton@google.com | ceb561d | 2009-06-25 19:05:36 +0000 | [diff] [blame] | 249 | * Fixed bug where Message.Swap(Message) was only implemented for |
| 250 | optimize_for_speed. Swap now properly implemented in both modes |
| 251 | (Issue 91). |
| 252 | * Added RemoveLast and SwapElements(index1, index2) to Reflection |
| 253 | interface for repeated elements. |
| 254 | * Added Swap(Message) to Reflection interface. |
kenton@google.com | d2fd063 | 2009-07-24 01:00:35 +0000 | [diff] [blame] | 255 | * Floating-point literals in generated code that are intended to be |
| 256 | single-precision now explicitly have 'f' suffix to avoid pedantic warnings |
| 257 | produced by some compilers. |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 258 | * The [deprecated=true] option now causes the C++ code generator to generate |
| 259 | a GCC-style deprecation annotation (no-op on other compilers). |
| 260 | * google::protobuf::GetEnumDescriptor<SomeGeneratedEnumType>() returns the |
| 261 | EnumDescriptor for that type -- useful for templates which cannot call |
| 262 | SomeGeneratedEnumType_descriptor(). |
| 263 | * Various optimizations and obscure bug fixes. |
| 264 | |
| 265 | Java |
| 266 | * Lite mode: The "optimize_for = LITE_RUNTIME" option causes the compiler |
| 267 | to generate code which only depends libprotobuf-lite, which is much smaller |
| 268 | than libprotobuf but lacks descriptors, reflection, and some other features. |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 269 | * Lots of style cleanups. |
| 270 | |
| 271 | Python |
| 272 | * Fixed endianness bug with floats and doubles. |
| 273 | * Text format parsing support. |
| 274 | * Fix bug with parsing packed repeated fields in embedded messages. |
| 275 | * Ability to initialize fields by passing keyword args to constructor. |
| 276 | * Support iterators in extend and __setslice__ for containers. |
kenton@google.com | ceb561d | 2009-06-25 19:05:36 +0000 | [diff] [blame] | 277 | |
kenton@google.com | 1fb3d39 | 2009-05-13 23:20:03 +0000 | [diff] [blame] | 278 | 2009-05-13 version 2.1.0: |
kenton@google.com | 2d6daa7 | 2009-01-22 01:27:00 +0000 | [diff] [blame] | 279 | |
| 280 | General |
| 281 | * Repeated fields of primitive types (types other that string, group, and |
| 282 | nested messages) may now use the option [packed = true] to get a more |
| 283 | efficient encoding. In the new encoding, the entire list is written |
| 284 | as a single byte blob using the "length-delimited" wire type. Within |
| 285 | this blob, the individual values are encoded the same way they would |
| 286 | be normally except without a tag before each value (thus, they are |
| 287 | tightly "packed"). |
kenton@google.com | cfa2d8a | 2009-04-18 00:02:12 +0000 | [diff] [blame] | 288 | * For each field, the generated code contains an integer constant assigned |
| 289 | to the field number. For example, the .proto file: |
| 290 | message Foo { optional int bar_baz = 123; } |
| 291 | would generate the following constants, all with the integer value 123: |
| 292 | C++: Foo::kBarBazFieldNumber |
| 293 | Java: Foo.BAR_BAZ_FIELD_NUMBER |
| 294 | Python: Foo.BAR_BAZ_FIELD_NUMBER |
| 295 | Constants are also generated for extensions, with the same naming scheme. |
| 296 | These constants may be used as switch cases. |
kenton@google.com | 37ad00d | 2009-04-21 21:00:39 +0000 | [diff] [blame] | 297 | * Updated bundled Google Test to version 1.3.0. Google Test is now bundled |
| 298 | in its verbatim form as a nested autoconf package, so you can drop in any |
| 299 | other version of Google Test if needed. |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 300 | * optimize_for = SPEED is now the default, by popular demand. Use |
| 301 | optimize_for = CODE_SIZE if code size is more important in your app. |
| 302 | * It is now an error to define a default value for a repeated field. |
| 303 | Previously, this was silently ignored (it had no effect on the generated |
| 304 | code). |
| 305 | * Fields can now be marked deprecated like: |
| 306 | optional int32 foo = 1 [deprecated = true]; |
| 307 | Currently this does not have any actual effect, but in the future the code |
| 308 | generators may generate deprecation annotations in each language. |
kenton@google.com | 9824eda | 2009-05-06 17:49:37 +0000 | [diff] [blame] | 309 | * Cross-compiling should now be possible using the --with-protoc option to |
| 310 | configure. See README.txt for more info. |
kenton@google.com | 2d6daa7 | 2009-01-22 01:27:00 +0000 | [diff] [blame] | 311 | |
kenton@google.com | f663b16 | 2009-04-15 19:50:54 +0000 | [diff] [blame] | 312 | protoc |
| 313 | * --error_format=msvs option causes errors to be printed in Visual Studio |
| 314 | 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] | 315 | directly to the error location. |
| 316 | * The type name resolver will no longer resolve type names to fields. For |
| 317 | example, this now works: |
| 318 | message Foo {} |
| 319 | message Bar { |
| 320 | optional int32 Foo = 1; |
| 321 | optional Foo baz = 2; |
| 322 | } |
| 323 | Previously, the type of "baz" would resolve to "Bar.Foo", and you'd get |
| 324 | an error because Bar.Foo is a field, not a type. Now the type of "baz" |
| 325 | resolves to the message type Foo. This change is unlikely to make a |
| 326 | difference to anyone who follows the Protocol Buffers style guide. |
kenton@google.com | f663b16 | 2009-04-15 19:50:54 +0000 | [diff] [blame] | 327 | |
kenton@google.com | 2d6daa7 | 2009-01-22 01:27:00 +0000 | [diff] [blame] | 328 | C++ |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 329 | * Several optimizations, including but not limited to: |
| 330 | - Serialization, especially to flat arrays, is 10%-50% faster, possibly |
| 331 | more for small objects. |
| 332 | - Several descriptor operations which previously required locking no longer |
| 333 | do. |
| 334 | - Descriptors are now constructed lazily on first use, rather than at |
| 335 | process startup time. This should save memory in programs which do not |
| 336 | use descriptors or reflection. |
| 337 | - UnknownFieldSet completely redesigned to be more efficient (especially in |
| 338 | terms of memory usage). |
| 339 | - Various optimizations to reduce code size (though the serialization speed |
| 340 | optimizations increased code size). |
kenton@google.com | 2d6daa7 | 2009-01-22 01:27:00 +0000 | [diff] [blame] | 341 | * Message interface has method ParseFromBoundedZeroCopyStream() which parses |
| 342 | a limited number of bytes from an input stream rather than parsing until |
| 343 | EOF. |
kenton@google.com | e59427a | 2009-04-16 22:30:56 +0000 | [diff] [blame] | 344 | * GzipInputStream and GzipOutputStream support reading/writing gzip- or |
| 345 | zlib-compressed streams if zlib is available. |
| 346 | (google/protobuf/io/gzip_stream.h) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 347 | * DescriptorPool::FindAllExtensions() and corresponding |
| 348 | DescriptorDatabase::FindAllExtensions() can be used to enumerate all |
| 349 | extensions of a given type. |
| 350 | * For each enum type Foo, protoc will generate functions: |
| 351 | const string& Foo_Name(Foo value); |
| 352 | bool Foo_Parse(const string& name, Foo* result); |
| 353 | The former returns the name of the enum constant corresponding to the given |
| 354 | value while the latter finds the value corresponding to a name. |
| 355 | * RepeatedField and RepeatedPtrField now have back-insertion iterators. |
| 356 | * String fields now have setters that take a char* and a size, in addition |
| 357 | to the existing ones that took char* or const string&. |
| 358 | * DescriptorPool::AllowUnknownDependencies() may be used to tell |
| 359 | DescriptorPool to create placeholder descriptors for unknown entities |
| 360 | referenced in a FileDescriptorProto. This can allow you to parse a .proto |
| 361 | file without having access to other .proto files that it imports, for |
| 362 | example. |
| 363 | * Updated gtest to latest version. The gtest package is now included as a |
| 364 | nested autoconf package, so it should be able to drop new versions into the |
| 365 | "gtest" subdirectory without modification. |
kenton@google.com | 2d6daa7 | 2009-01-22 01:27:00 +0000 | [diff] [blame] | 366 | |
| 367 | Java |
| 368 | * Fixed bug where Message.mergeFrom(Message) failed to merge extensions. |
| 369 | * Message interface has new method toBuilder() which is equivalent to |
| 370 | newBuilderForType().mergeFrom(this). |
| 371 | * All enums now implement the ProtocolMessageEnum interface. |
| 372 | * Setting a field to null now throws NullPointerException. |
| 373 | * Fixed tendency for TextFormat's parsing to overflow the stack when |
| 374 | parsing large string values. The underlying problem is with Java's |
| 375 | regex implementation (which unfortunately uses recursive backtracking |
| 376 | rather than building an NFA). Worked around by making use of possesive |
| 377 | quantifiers. |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 378 | * Generated service classes now also generate pure interfaces. For a service |
| 379 | Foo, Foo.Interface is a pure interface containing all of the service's |
| 380 | defined methods. Foo.newReflectiveService() can be called to wrap an |
| 381 | instance of this interface in a class that implements the generic |
| 382 | RpcService interface, which provides reflection support that is usually |
| 383 | needed by RPC server implementations. |
| 384 | * RPC interfaces now support blocking operation in addition to non-blocking. |
| 385 | The protocol compiler generates separate blocking and non-blocking stubs |
| 386 | which operate against separate blocking and non-blocking RPC interfaces. |
| 387 | RPC implementations will have to implement the new interfaces in order to |
| 388 | support blocking mode. |
| 389 | * New I/O methods parseDelimitedFrom(), mergeDelimitedFrom(), and |
| 390 | writeDelimitedTo() read and write "delemited" messages from/to a stream, |
| 391 | meaning that the message size precedes the data. This way, you can write |
| 392 | multiple messages to a stream without having to worry about delimiting |
| 393 | them yourself. |
| 394 | * Throw a more descriptive exception when build() is double-called. |
| 395 | * Add a method to query whether CodedInputStream is at the end of the input |
| 396 | stream. |
| 397 | * Add a method to reset a CodedInputStream's size counter; useful when |
| 398 | reading many messages with the same stream. |
| 399 | * equals() and hashCode() now account for unknown fields. |
pesho.petrov | 87e64e1 | 2008-12-24 01:07:22 +0000 | [diff] [blame] | 400 | |
| 401 | Python |
| 402 | * Added slicing support for repeated scalar fields. Added slice retrieval and |
| 403 | removal of repeated composite fields. |
kenton@google.com | 2d6daa7 | 2009-01-22 01:27:00 +0000 | [diff] [blame] | 404 | * Updated RPC interfaces to allow for blocking operation. A client may |
| 405 | now pass None for a callback when making an RPC, in which case the |
| 406 | call will block until the response is received, and the response |
| 407 | object will be returned directly to the caller. This interface change |
| 408 | cannot be used in practice until RPC implementations are updated to |
| 409 | implement it. |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 410 | * Changes to input_stream.py should make protobuf compatible with appengine. |
pesho.petrov | 87e64e1 | 2008-12-24 01:07:22 +0000 | [diff] [blame] | 411 | |
kenton@google.com | 9f17528 | 2008-11-25 19:37:10 +0000 | [diff] [blame] | 412 | 2008-11-25 version 2.0.3: |
| 413 | |
| 414 | protoc |
| 415 | * Enum values may now have custom options, using syntax similar to field |
| 416 | options. |
| 417 | * Fixed bug where .proto files which use custom options but don't actually |
| 418 | define them (i.e. they import another .proto file defining the options) |
| 419 | had to explicitly import descriptor.proto. |
| 420 | * Adjacent string literals in .proto files will now be concatenated, like in |
| 421 | C. |
kenton@google.com | 2f669cb | 2008-12-02 05:59:15 +0000 | [diff] [blame] | 422 | * If an input file is a Windows absolute path (e.g. "C:\foo\bar.proto") and |
| 423 | the import path only contains "." (or contains "." but does not contain |
| 424 | the file), protoc incorrectly thought that the file was under ".", because |
| 425 | it thought that the path was relative (since it didn't start with a slash). |
| 426 | This has been fixed. |
kenton@google.com | 9f17528 | 2008-11-25 19:37:10 +0000 | [diff] [blame] | 427 | |
| 428 | C++ |
| 429 | * Generated message classes now have a Swap() method which efficiently swaps |
| 430 | the contents of two objects. |
| 431 | * All message classes now have a SpaceUsed() method which returns an estimate |
| 432 | of the number of bytes of allocated memory currently owned by the object. |
| 433 | This is particularly useful when you are reusing a single message object |
| 434 | to improve performance but want to make sure it doesn't bloat up too large. |
| 435 | * New method Message::SerializeAsString() returns a string containing the |
| 436 | serialized data. May be more convenient than calling |
| 437 | SerializeToString(string*). |
| 438 | * In debug mode, log error messages when string-type fields are found to |
| 439 | contain bytes that are not valid UTF-8. |
| 440 | * Fixed bug where a message with multiple extension ranges couldn't parse |
| 441 | extensions. |
| 442 | * Fixed bug where MergeFrom(const Message&) didn't do anything if invoked on |
| 443 | a message that contained no fields (but possibly contained extensions). |
| 444 | * Fixed ShortDebugString() to not be O(n^2). Durr. |
| 445 | * Fixed crash in TextFormat parsing if the first token in the input caused a |
| 446 | tokenization error. |
| 447 | * Fixed obscure bugs in zero_copy_stream_impl.cc. |
| 448 | * Added support for HP C++ on Tru64. |
| 449 | * Only build tests on "make check", not "make". |
| 450 | * Fixed alignment issue that caused crashes when using DynamicMessage on |
| 451 | 64-bit Sparc machines. |
| 452 | * Simplify template usage to work with MSVC 2003. |
| 453 | * Work around GCC 4.3.x x86_64 compiler bug that caused crashes on startup. |
| 454 | (This affected Fedora 9 in particular.) |
kenton@google.com | 25bc5cd | 2008-12-04 20:34:50 +0000 | [diff] [blame] | 455 | * Now works on "Solaris 10 using recent Sun Studio". |
kenton@google.com | 9f17528 | 2008-11-25 19:37:10 +0000 | [diff] [blame] | 456 | |
| 457 | Java |
| 458 | * New overload of mergeFrom() which parses a slice of a byte array instead |
| 459 | of the whole thing. |
| 460 | * New method ByteString.asReadOnlyByteBuffer() does what it sounds like. |
| 461 | * Improved performance of isInitialized() when optimizing for code size. |
| 462 | |
| 463 | Python |
| 464 | * Corrected ListFields() signature in Message base class to match what |
| 465 | subclasses actually implement. |
| 466 | * Some minor refactoring. |
kenton@google.com | 2f669cb | 2008-12-02 05:59:15 +0000 | [diff] [blame] | 467 | * Don't pass self as first argument to superclass constructor (no longer |
| 468 | allowed in Python 2.6). |
kenton@google.com | 9f17528 | 2008-11-25 19:37:10 +0000 | [diff] [blame] | 469 | |
kenton@google.com | 9b10f58 | 2008-09-30 00:09:40 +0000 | [diff] [blame] | 470 | 2008-09-29 version 2.0.2: |
| 471 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 472 | General |
| 473 | * License changed from Apache 2.0 to New BSD. |
| 474 | * It is now possible to define custom "options", which are basically |
| 475 | annotations which may be placed on definitions in a .proto file. |
| 476 | For example, you might define a field option called "foo" like so: |
| 477 | import "google/protobuf/descriptor.proto" |
| 478 | extend google.protobuf.FieldOptions { |
| 479 | optional string foo = 12345; |
| 480 | } |
| 481 | Then you annotate a field using the "foo" option: |
| 482 | message MyMessage { |
| 483 | optional int32 some_field = 1 [(foo) = "bar"] |
| 484 | } |
| 485 | The value of this option is then visible via the message's |
| 486 | Descriptor: |
| 487 | const FieldDescriptor* field = |
| 488 | MyMessage::descriptor()->FindFieldByName("some_field"); |
| 489 | assert(field->options().GetExtension(foo) == "bar"); |
| 490 | This feature has been implemented and tested in C++ and Java. |
| 491 | Other languages may or may not need to do extra work to support |
| 492 | custom options, depending on how they construct descriptors. |
| 493 | |
| 494 | C++ |
| 495 | * Fixed some GCC warnings that only occur when using -pedantic. |
| 496 | * Improved static initialization code, making ordering more |
| 497 | predictable among other things. |
| 498 | * TextFormat will no longer accept messages which contain multiple |
| 499 | instances of a singular field. Previously, the latter instance |
kenton@google.com | 9b10f58 | 2008-09-30 00:09:40 +0000 | [diff] [blame] | 500 | would overwrite the former. |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 501 | * Now works on systems that don't have hash_map. |
| 502 | |
kenton@google.com | 9b10f58 | 2008-09-30 00:09:40 +0000 | [diff] [blame] | 503 | Java |
| 504 | * Print @Override annotation in generated code where appropriate. |
| 505 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 506 | Python |
| 507 | * Strings now use the "unicode" type rather than the "str" type. |
| 508 | String fields may still be assigned ASCII "str" values; they will |
| 509 | automatically be converted. |
| 510 | * Adding a property to an object representing a repeated field now |
| 511 | raises an exception. For example: |
| 512 | # No longer works (and never should have). |
| 513 | message.some_repeated_field.foo = 1 |
kenton@google.com | 9b10f58 | 2008-09-30 00:09:40 +0000 | [diff] [blame] | 514 | |
| 515 | Windows |
| 516 | * We now build static libraries rather than DLLs by default on MSVC. |
| 517 | See vsprojects/readme.txt for more information. |
| 518 | |
temporal | a44f3c3 | 2008-08-15 18:32:02 +0000 | [diff] [blame] | 519 | 2008-08-15 version 2.0.1: |
kenton@google.com | 9b10f58 | 2008-09-30 00:09:40 +0000 | [diff] [blame] | 520 | |
| 521 | protoc |
| 522 | * New flags --encode and --decode can be used to convert between protobuf text |
| 523 | format and binary format from the command-line. |
| 524 | * New flag --descriptor_set_out can be used to write FileDescriptorProtos for |
| 525 | all parsed files directly into a single output file. This is particularly |
| 526 | useful if you wish to parse .proto files from programs written in languages |
| 527 | other than C++: just run protoc as a background process and have it output |
| 528 | a FileDescriptorList, then parse that natively. |
| 529 | * Improved error message when an enum value's name conflicts with another |
| 530 | symbol defined in the enum type's scope, e.g. if two enum types declared |
| 531 | 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] | 532 | compatibility with C++, but this wasn't clear from the error. |
kenton@google.com | 9b10f58 | 2008-09-30 00:09:40 +0000 | [diff] [blame] | 533 | * Fixed absolute output paths on Windows. |
temporal | a44f3c3 | 2008-08-15 18:32:02 +0000 | [diff] [blame] | 534 | * Allow trailing slashes in --proto_path mappings. |
kenton@google.com | 9b10f58 | 2008-09-30 00:09:40 +0000 | [diff] [blame] | 535 | |
| 536 | C++ |
| 537 | * Reflection objects are now per-class rather than per-instance. To make this |
| 538 | possible, the Reflection interface had to be changed such that all methods |
| 539 | take the Message instance as a parameter. This change improves performance |
| 540 | significantly in memory-bandwidth-limited use cases, since it makes the |
| 541 | message objects smaller. Note that source-incompatible interface changes |
| 542 | like this will not be made again after the library leaves beta. |
temporal | a44f3c3 | 2008-08-15 18:32:02 +0000 | [diff] [blame] | 543 | * Heuristically detect sub-messages when printing unknown fields. |
kenton@google.com | 9b10f58 | 2008-09-30 00:09:40 +0000 | [diff] [blame] | 544 | * Fix static initialization ordering bug that caused crashes at startup when |
temporal | a44f3c3 | 2008-08-15 18:32:02 +0000 | [diff] [blame] | 545 | compiling on Mac with static linking. |
kenton@google.com | 9b10f58 | 2008-09-30 00:09:40 +0000 | [diff] [blame] | 546 | * Fixed TokenizerTest when compiling with -DNDEBUG on Linux. |
| 547 | * Fixed incorrect definition of kint32min. |
temporal | a44f3c3 | 2008-08-15 18:32:02 +0000 | [diff] [blame] | 548 | * Fix bytes type setter to work with byte sequences with embedded NULLs. |
| 549 | * Other irrelevant tweaks. |
| 550 | |
kenton@google.com | 9b10f58 | 2008-09-30 00:09:40 +0000 | [diff] [blame] | 551 | Java |
| 552 | * Fixed UnknownFieldSet's parsing of varints larger than 32 bits. |
| 553 | * Fixed TextFormat's parsing of "inf" and "nan". |
| 554 | * Fixed TextFormat's parsing of comments. |
| 555 | * Added info to Java POM that will be required when we upload the |
temporal | a44f3c3 | 2008-08-15 18:32:02 +0000 | [diff] [blame] | 556 | package to a Maven repo. |
| 557 | |
kenton@google.com | 9b10f58 | 2008-09-30 00:09:40 +0000 | [diff] [blame] | 558 | Python |
| 559 | * MergeFrom(message) and CopyFrom(message) are now implemented. |
| 560 | * SerializeToString() raises an exception if the message is missing required |
| 561 | fields. |
| 562 | * Code organization improvements. |
| 563 | * Fixed doc comments for RpcController and RpcChannel, which had somehow been |
temporal | a44f3c3 | 2008-08-15 18:32:02 +0000 | [diff] [blame] | 564 | swapped. |
kenton@google.com | 9b10f58 | 2008-09-30 00:09:40 +0000 | [diff] [blame] | 565 | * Fixed text_format_test on Windows where floating-point exponents sometimes |
| 566 | contain extra zeros. |
temporal | a44f3c3 | 2008-08-15 18:32:02 +0000 | [diff] [blame] | 567 | * Fix Python service CallMethod() implementation. |
| 568 | |
| 569 | Other |
| 570 | * Improved readmes. |
| 571 | * VIM syntax highlighting improvements. |
| 572 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 573 | 2008-07-07 version 2.0.0: |
| 574 | |
| 575 | * First public release. |