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