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