12009-01-08 version 2.3.0: 2 3 General 4 * Parsers for repeated numeric fields now always accept both packed and 5 unpacked input. The [packed=true] option only affects serializers. 6 Therefore, it is possible to switch a field to packed format without 7 breaking backwards-compatibility -- as long as all parties are using 8 protobuf 2.3.0 or above, at least. 9 * The generic RPC service code generated by the C++, Java, and Python 10 generators can be disabled via file options: 11 option cc_generic_services = false; 12 option java_generic_services = false; 13 option py_generic_services = false; 14 This allows plugins to generate alternative code, possibly specific to some 15 particular RPC implementation. 16 17 protoc 18 * Now supports a plugin system for code generators. Plugins can generate 19 code for new languages or inject additional code into the output of other 20 code generators. Plugins are just binaries which accept a protocol buffer 21 on stdin and write a protocol buffer to stdout, so they may be written in 22 any language. See src/google/protobuf/compiler/plugin.proto. 23 **WARNING**: Plugins are experimental. The interface may change in a 24 future version. 25 * If the output location ends in .zip or .jar, protoc will write its output 26 to a zip/jar archive instead of a directory. For example: 27 protoc --java_out=myproto_srcs.jar --python_out=myproto.zip myproto.proto 28 Currently the archive contents are not compressed, though this could change 29 in the future. 30 * inf, -inf, and nan can now be used as default values for float and double 31 fields. 32 33 C++ 34 * Various speed and code size optimizations. 35 * DynamicMessageFactory is now fully thread-safe. 36 * Message::Utf8DebugString() method is like DebugString() but avoids escaping 37 UTF-8 bytes. 38 * Compiled-in message types can now contain dynamic extensions, through use 39 of CodedInputStream::SetExtensionRegistry(). 40 * Now compiles shared libraries (DLLs) by default on Cygwin and MinGW, to 41 match other platforms. Use --disable-shared to avoid this. 42 43 Java 44 * parseDelimitedFrom() and mergeDelimitedFrom() now detect EOF and return 45 false/null instead of throwing an exception. 46 * Fixed some initialization ordering bugs. 47 * Fixes for OpenJDK 7. 48 49 Python 50 * 10-25 times faster than 2.2.0, still pure-Python. 51 * Calling a mutating method on a sub-message always instantiates the message 52 in its parent even if the mutating method doesn't actually mutate anything 53 (e.g. parsing from an empty string). 54 * Expanded descriptors a bit. 55 562009-08-11 version 2.2.0: 57 58 C++ 59 * Lite mode: The "optimize_for = LITE_RUNTIME" option causes the compiler 60 to generate code which only depends libprotobuf-lite, which is much smaller 61 than libprotobuf but lacks descriptors, reflection, and some other features. 62 * Fixed bug where Message.Swap(Message) was only implemented for 63 optimize_for_speed. Swap now properly implemented in both modes 64 (Issue 91). 65 * Added RemoveLast and SwapElements(index1, index2) to Reflection 66 interface for repeated elements. 67 * Added Swap(Message) to Reflection interface. 68 * Floating-point literals in generated code that are intended to be 69 single-precision now explicitly have 'f' suffix to avoid pedantic warnings 70 produced by some compilers. 71 * The [deprecated=true] option now causes the C++ code generator to generate 72 a GCC-style deprecation annotation (no-op on other compilers). 73 * google::protobuf::GetEnumDescriptor<SomeGeneratedEnumType>() returns the 74 EnumDescriptor for that type -- useful for templates which cannot call 75 SomeGeneratedEnumType_descriptor(). 76 * Various optimizations and obscure bug fixes. 77 78 Java 79 * Lite mode: The "optimize_for = LITE_RUNTIME" option causes the compiler 80 to generate code which only depends libprotobuf-lite, which is much smaller 81 than libprotobuf but lacks descriptors, reflection, and some other features. 82 * Lots of style cleanups. 83 84 Python 85 * Fixed endianness bug with floats and doubles. 86 * Text format parsing support. 87 * Fix bug with parsing packed repeated fields in embedded messages. 88 * Ability to initialize fields by passing keyword args to constructor. 89 * Support iterators in extend and __setslice__ for containers. 90 912009-05-13 version 2.1.0: 92 93 General 94 * Repeated fields of primitive types (types other that string, group, and 95 nested messages) may now use the option [packed = true] to get a more 96 efficient encoding. In the new encoding, the entire list is written 97 as a single byte blob using the "length-delimited" wire type. Within 98 this blob, the individual values are encoded the same way they would 99 be normally except without a tag before each value (thus, they are 100 tightly "packed"). 101 * For each field, the generated code contains an integer constant assigned 102 to the field number. For example, the .proto file: 103 message Foo { optional int bar_baz = 123; } 104 would generate the following constants, all with the integer value 123: 105 C++: Foo::kBarBazFieldNumber 106 Java: Foo.BAR_BAZ_FIELD_NUMBER 107 Python: Foo.BAR_BAZ_FIELD_NUMBER 108 Constants are also generated for extensions, with the same naming scheme. 109 These constants may be used as switch cases. 110 * Updated bundled Google Test to version 1.3.0. Google Test is now bundled 111 in its verbatim form as a nested autoconf package, so you can drop in any 112 other version of Google Test if needed. 113 * optimize_for = SPEED is now the default, by popular demand. Use 114 optimize_for = CODE_SIZE if code size is more important in your app. 115 * It is now an error to define a default value for a repeated field. 116 Previously, this was silently ignored (it had no effect on the generated 117 code). 118 * Fields can now be marked deprecated like: 119 optional int32 foo = 1 [deprecated = true]; 120 Currently this does not have any actual effect, but in the future the code 121 generators may generate deprecation annotations in each language. 122 * Cross-compiling should now be possible using the --with-protoc option to 123 configure. See README.txt for more info. 124 125 protoc 126 * --error_format=msvs option causes errors to be printed in Visual Studio 127 format, which should allow them to be clicked on in the build log to go 128 directly to the error location. 129 * The type name resolver will no longer resolve type names to fields. For 130 example, this now works: 131 message Foo {} 132 message Bar { 133 optional int32 Foo = 1; 134 optional Foo baz = 2; 135 } 136 Previously, the type of "baz" would resolve to "Bar.Foo", and you'd get 137 an error because Bar.Foo is a field, not a type. Now the type of "baz" 138 resolves to the message type Foo. This change is unlikely to make a 139 difference to anyone who follows the Protocol Buffers style guide. 140 141 C++ 142 * Several optimizations, including but not limited to: 143 - Serialization, especially to flat arrays, is 10%-50% faster, possibly 144 more for small objects. 145 - Several descriptor operations which previously required locking no longer 146 do. 147 - Descriptors are now constructed lazily on first use, rather than at 148 process startup time. This should save memory in programs which do not 149 use descriptors or reflection. 150 - UnknownFieldSet completely redesigned to be more efficient (especially in 151 terms of memory usage). 152 - Various optimizations to reduce code size (though the serialization speed 153 optimizations increased code size). 154 * Message interface has method ParseFromBoundedZeroCopyStream() which parses 155 a limited number of bytes from an input stream rather than parsing until 156 EOF. 157 * GzipInputStream and GzipOutputStream support reading/writing gzip- or 158 zlib-compressed streams if zlib is available. 159 (google/protobuf/io/gzip_stream.h) 160 * DescriptorPool::FindAllExtensions() and corresponding 161 DescriptorDatabase::FindAllExtensions() can be used to enumerate all 162 extensions of a given type. 163 * For each enum type Foo, protoc will generate functions: 164 const string& Foo_Name(Foo value); 165 bool Foo_Parse(const string& name, Foo* result); 166 The former returns the name of the enum constant corresponding to the given 167 value while the latter finds the value corresponding to a name. 168 * RepeatedField and RepeatedPtrField now have back-insertion iterators. 169 * String fields now have setters that take a char* and a size, in addition 170 to the existing ones that took char* or const string&. 171 * DescriptorPool::AllowUnknownDependencies() may be used to tell 172 DescriptorPool to create placeholder descriptors for unknown entities 173 referenced in a FileDescriptorProto. This can allow you to parse a .proto 174 file without having access to other .proto files that it imports, for 175 example. 176 * Updated gtest to latest version. The gtest package is now included as a 177 nested autoconf package, so it should be able to drop new versions into the 178 "gtest" subdirectory without modification. 179 180 Java 181 * Fixed bug where Message.mergeFrom(Message) failed to merge extensions. 182 * Message interface has new method toBuilder() which is equivalent to 183 newBuilderForType().mergeFrom(this). 184 * All enums now implement the ProtocolMessageEnum interface. 185 * Setting a field to null now throws NullPointerException. 186 * Fixed tendency for TextFormat's parsing to overflow the stack when 187 parsing large string values. The underlying problem is with Java's 188 regex implementation (which unfortunately uses recursive backtracking 189 rather than building an NFA). Worked around by making use of possesive 190 quantifiers. 191 * Generated service classes now also generate pure interfaces. For a service 192 Foo, Foo.Interface is a pure interface containing all of the service's 193 defined methods. Foo.newReflectiveService() can be called to wrap an 194 instance of this interface in a class that implements the generic 195 RpcService interface, which provides reflection support that is usually 196 needed by RPC server implementations. 197 * RPC interfaces now support blocking operation in addition to non-blocking. 198 The protocol compiler generates separate blocking and non-blocking stubs 199 which operate against separate blocking and non-blocking RPC interfaces. 200 RPC implementations will have to implement the new interfaces in order to 201 support blocking mode. 202 * New I/O methods parseDelimitedFrom(), mergeDelimitedFrom(), and 203 writeDelimitedTo() read and write "delemited" messages from/to a stream, 204 meaning that the message size precedes the data. This way, you can write 205 multiple messages to a stream without having to worry about delimiting 206 them yourself. 207 * Throw a more descriptive exception when build() is double-called. 208 * Add a method to query whether CodedInputStream is at the end of the input 209 stream. 210 * Add a method to reset a CodedInputStream's size counter; useful when 211 reading many messages with the same stream. 212 * equals() and hashCode() now account for unknown fields. 213 214 Python 215 * Added slicing support for repeated scalar fields. Added slice retrieval and 216 removal of repeated composite fields. 217 * Updated RPC interfaces to allow for blocking operation. A client may 218 now pass None for a callback when making an RPC, in which case the 219 call will block until the response is received, and the response 220 object will be returned directly to the caller. This interface change 221 cannot be used in practice until RPC implementations are updated to 222 implement it. 223 * Changes to input_stream.py should make protobuf compatible with appengine. 224 2252008-11-25 version 2.0.3: 226 227 protoc 228 * Enum values may now have custom options, using syntax similar to field 229 options. 230 * Fixed bug where .proto files which use custom options but don't actually 231 define them (i.e. they import another .proto file defining the options) 232 had to explicitly import descriptor.proto. 233 * Adjacent string literals in .proto files will now be concatenated, like in 234 C. 235 * If an input file is a Windows absolute path (e.g. "C:\foo\bar.proto") and 236 the import path only contains "." (or contains "." but does not contain 237 the file), protoc incorrectly thought that the file was under ".", because 238 it thought that the path was relative (since it didn't start with a slash). 239 This has been fixed. 240 241 C++ 242 * Generated message classes now have a Swap() method which efficiently swaps 243 the contents of two objects. 244 * All message classes now have a SpaceUsed() method which returns an estimate 245 of the number of bytes of allocated memory currently owned by the object. 246 This is particularly useful when you are reusing a single message object 247 to improve performance but want to make sure it doesn't bloat up too large. 248 * New method Message::SerializeAsString() returns a string containing the 249 serialized data. May be more convenient than calling 250 SerializeToString(string*). 251 * In debug mode, log error messages when string-type fields are found to 252 contain bytes that are not valid UTF-8. 253 * Fixed bug where a message with multiple extension ranges couldn't parse 254 extensions. 255 * Fixed bug where MergeFrom(const Message&) didn't do anything if invoked on 256 a message that contained no fields (but possibly contained extensions). 257 * Fixed ShortDebugString() to not be O(n^2). Durr. 258 * Fixed crash in TextFormat parsing if the first token in the input caused a 259 tokenization error. 260 * Fixed obscure bugs in zero_copy_stream_impl.cc. 261 * Added support for HP C++ on Tru64. 262 * Only build tests on "make check", not "make". 263 * Fixed alignment issue that caused crashes when using DynamicMessage on 264 64-bit Sparc machines. 265 * Simplify template usage to work with MSVC 2003. 266 * Work around GCC 4.3.x x86_64 compiler bug that caused crashes on startup. 267 (This affected Fedora 9 in particular.) 268 * Now works on "Solaris 10 using recent Sun Studio". 269 270 Java 271 * New overload of mergeFrom() which parses a slice of a byte array instead 272 of the whole thing. 273 * New method ByteString.asReadOnlyByteBuffer() does what it sounds like. 274 * Improved performance of isInitialized() when optimizing for code size. 275 276 Python 277 * Corrected ListFields() signature in Message base class to match what 278 subclasses actually implement. 279 * Some minor refactoring. 280 * Don't pass self as first argument to superclass constructor (no longer 281 allowed in Python 2.6). 282 2832008-09-29 version 2.0.2: 284 285 General 286 * License changed from Apache 2.0 to New BSD. 287 * It is now possible to define custom "options", which are basically 288 annotations which may be placed on definitions in a .proto file. 289 For example, you might define a field option called "foo" like so: 290 import "google/protobuf/descriptor.proto" 291 extend google.protobuf.FieldOptions { 292 optional string foo = 12345; 293 } 294 Then you annotate a field using the "foo" option: 295 message MyMessage { 296 optional int32 some_field = 1 [(foo) = "bar"] 297 } 298 The value of this option is then visible via the message's 299 Descriptor: 300 const FieldDescriptor* field = 301 MyMessage::descriptor()->FindFieldByName("some_field"); 302 assert(field->options().GetExtension(foo) == "bar"); 303 This feature has been implemented and tested in C++ and Java. 304 Other languages may or may not need to do extra work to support 305 custom options, depending on how they construct descriptors. 306 307 C++ 308 * Fixed some GCC warnings that only occur when using -pedantic. 309 * Improved static initialization code, making ordering more 310 predictable among other things. 311 * TextFormat will no longer accept messages which contain multiple 312 instances of a singular field. Previously, the latter instance 313 would overwrite the former. 314 * Now works on systems that don't have hash_map. 315 316 Java 317 * Print @Override annotation in generated code where appropriate. 318 319 Python 320 * Strings now use the "unicode" type rather than the "str" type. 321 String fields may still be assigned ASCII "str" values; they will 322 automatically be converted. 323 * Adding a property to an object representing a repeated field now 324 raises an exception. For example: 325 # No longer works (and never should have). 326 message.some_repeated_field.foo = 1 327 328 Windows 329 * We now build static libraries rather than DLLs by default on MSVC. 330 See vsprojects/readme.txt for more information. 331 3322008-08-15 version 2.0.1: 333 334 protoc 335 * New flags --encode and --decode can be used to convert between protobuf text 336 format and binary format from the command-line. 337 * New flag --descriptor_set_out can be used to write FileDescriptorProtos for 338 all parsed files directly into a single output file. This is particularly 339 useful if you wish to parse .proto files from programs written in languages 340 other than C++: just run protoc as a background process and have it output 341 a FileDescriptorList, then parse that natively. 342 * Improved error message when an enum value's name conflicts with another 343 symbol defined in the enum type's scope, e.g. if two enum types declared 344 in the same scope have values with the same name. This is disallowed for 345 compatibility with C++, but this wasn't clear from the error. 346 * Fixed absolute output paths on Windows. 347 * Allow trailing slashes in --proto_path mappings. 348 349 C++ 350 * Reflection objects are now per-class rather than per-instance. To make this 351 possible, the Reflection interface had to be changed such that all methods 352 take the Message instance as a parameter. This change improves performance 353 significantly in memory-bandwidth-limited use cases, since it makes the 354 message objects smaller. Note that source-incompatible interface changes 355 like this will not be made again after the library leaves beta. 356 * Heuristically detect sub-messages when printing unknown fields. 357 * Fix static initialization ordering bug that caused crashes at startup when 358 compiling on Mac with static linking. 359 * Fixed TokenizerTest when compiling with -DNDEBUG on Linux. 360 * Fixed incorrect definition of kint32min. 361 * Fix bytes type setter to work with byte sequences with embedded NULLs. 362 * Other irrelevant tweaks. 363 364 Java 365 * Fixed UnknownFieldSet's parsing of varints larger than 32 bits. 366 * Fixed TextFormat's parsing of "inf" and "nan". 367 * Fixed TextFormat's parsing of comments. 368 * Added info to Java POM that will be required when we upload the 369 package to a Maven repo. 370 371 Python 372 * MergeFrom(message) and CopyFrom(message) are now implemented. 373 * SerializeToString() raises an exception if the message is missing required 374 fields. 375 * Code organization improvements. 376 * Fixed doc comments for RpcController and RpcChannel, which had somehow been 377 swapped. 378 * Fixed text_format_test on Windows where floating-point exponents sometimes 379 contain extra zeros. 380 * Fix Python service CallMethod() implementation. 381 382 Other 383 * Improved readmes. 384 * VIM syntax highlighting improvements. 385 3862008-07-07 version 2.0.0: 387 388 * First public release. 389