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