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