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