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