blob: 0d4ce0ec1778865d40094937cba8f25198cc3157 [file] [log] [blame]
Feng Xiao9104da32014-12-09 11:57:52 -080012014-12-01 version 3.0.0-alpha-1 (C++/Java):
2
3 General
4 * Introduced Protocol Buffers language version 3 (aka proto3).
5
6 When protobuf was initially opensourced it implemented Protocol Buffers
7 language version 2 (aka proto2), which is why the version number
8 started from v2.0.0. From v3.0.0, a new language version (proto3) is
9 introduced while the old version (proto2) will continue to be supported.
10
11 The main intent of introducing proto3 is to clean up protobuf before
12 pushing the language as the foundation of Google's new API platform.
13 In proto3, the language is simplified, both for ease of use and to
14 make it available in a wider range of programming languages. At the
15 same time a few features are added to better support common idioms
16 found in APIs.
17
18 The following are the main new features in language version 3:
19
20 1. Removal of field presence logic for primitive value fields, removal
21 of required fields, and removal of default values. This makes proto3
22 significantly easier to implement with open struct representations,
23 as in languages like Android Java, Objective C, or Go.
24 2. Removal of unknown fields.
25 3. Removal of extensions, which are instead replaced by a new standard
26 type called Any.
27 4. Fix semantics for unknown enum values.
28 5. Addition of maps.
29 6. Addition of a small set of standard types for representation of time,
30 dynamic data, etc.
31 7. A well-defined encoding in JSON as an alternative to binary proto
32 encoding.
33
34 This release (v3.0.0-alpha-1) includes partial proto3 support for C++ and
35 Java. Items 6 (well-known types) and 7 (JSON format) in the above feature
36 list are not impelmented.
37
38 A new notion "syntax" is introduced to specify whether a .proto file
39 uses proto2 or proto3:
40
41 // foo.proto
42 syntax = "proto3";
43 message Bar {...}
44
45 If omitted, the protocol compiler will generate a warning and "proto2" will
46 be used as the default. This warning will be turned into an error in a
47 future release.
48
49 We recommend that new Protocol Buffers users use proto3. However, we do not
50 generally recommend that existing users migrate from proto2 from proto3 due
51 to API incompatibility, and we will continue to support proto2 for a long
52 time.
53
54 * Added support for map fields (implemented in C++/Java for both proto2 and
55 proto3).
56
57 Map fields can be declared using the following syntax:
58
59 message Foo {
60 map<string, string> values = 1;
61 }
62
63 Data of a map field will be stored in memory as an unordered map and it
64 can be accessed through generated accessors.
65
66 C++
67 * Added arena allocation support (for both proto2 and proto3).
68
69 Profiling shows memory allocation and deallocation constitutes a significant
70 fraction of CPU-time spent in protobuf code and arena allocation is a
71 technique introduced to reduce this cost. With arena allocation, new
72 objects will be allocated from a large piece of preallocated memory and
73 deallocation of these objects is almost free. Early adoption shows 20% to
74 50% improvement in some Google binaries.
75
76 To enable arena support, add the following option to your .proto file:
77
78 option cc_enable_arenas = true;
79
80 Protocol compiler will generate additional code to make the generated
81 message classes work with arenas. This does not change the existing API
82 of protobuf messages and does not affect wire format. Your existing code
83 should continue to work after adding this option. In the future we will
84 make this option enabled by default.
85
86 To actually take advantage of arena allocation, you need to use the arena
87 APIs when creating messages. A quick example of using the arena API:
88
89 {
90 google::protobuf::Arena arena;
91 // Allocate a protobuf message in the arena.
92 MyMessage* message = Arena::CreateMessage<MyMessage>(&arena);
93 // All submessages will be allocated in the same arena.
94 if (!message->ParseFromString(data)) {
95 // Deal with malformed input data.
96 }
97 // Must not delete the message here. It will be deleted automatically
98 // when the arena is destroyed.
99 }
100
101 Currently arena does not work with map fields. Enabling arena in a .proto
102 file containing map fields will result in compile errors in the generated
103 code. This will be addressed in a future release.
104
Feng Xiaobba83652014-10-20 17:06:06 -07001052014-10-20 version 2.6.1:
Feng Xiao57b86722014-10-09 11:20:08 -0700106
107 C++
108 * Added atomicops support for Solaris.
109 * Released memory allocated by InitializeDefaultRepeatedFields() and
110 GetEmptyString(). Some memory sanitizers reported them as memory leaks.
111
112 Java
113 * Updated DynamicMessage.setField() to handle repeated enum values
114 correctly.
115 * Fixed a bug that caused NullPointerException to be thrown when
116 converting manually constructed FileDescriptorProto to
117 FileDescriptor.
118
119 Python
Feng Xiao419c94b2014-10-09 11:40:02 -0700120 * Fixed WhichOneof() to work with de-serialized protobuf messages.
Feng Xiao57b86722014-10-09 11:20:08 -0700121 * Fixed a missing file problem of Python C++ implementation.
122
jieluo@google.com1eba9d92014-08-25 20:17:53 +00001232014-08-15 version 2.6.0:
124
125 General
126 * Added oneofs(unions) feature. Fields in the same oneof will share
127 memory and at most one field can be set at the same time. Use the
128 oneof keyword to define a oneof like:
129 message SampleMessage {
130 oneof test_oneof {
131 string name = 4;
132 YourMessage sub_message = 9;
133 }
134 }
135 * Files, services, enums, messages, methods and enum values can be marked
136 as deprecated now.
137 * Added Support for list values, including lists of mesaages, when
138 parsing text-formatted protos in C++ and Java.
139 For example: foo: [1, 2, 3]
140
141 C++
142 * Enhanced customization on TestFormat printing.
143 * Added SwapFields() in reflection API to swap a subset of fields.
144 Added SetAllocatedMessage() in reflection API.
145 * Repeated primitive extensions are now packable. The
146 [packed=true] option only affects serializers. Therefore, it is
147 possible to switch a repeated extension field to packed format
148 without breaking backwards-compatibility.
149 * Various speed optimizations.
150
151 Java
152 * writeTo() method in ByteString can now write a substring to an
153 output stream. Added endWith() method for ByteString.
154 * ByteString and ByteBuffer are now supported in CodedInputStream
155 and CodedOutputStream.
156 * java_generate_equals_and_hash can now be used with the LITE_RUNTIME.
157
158 Python
159 * A new C++-backed extension module (aka "cpp api v2") that replaces the
160 old ("cpp api v1") one. Much faster than the pure Python code. This one
161 resolves many bugs and is recommended for general use over the
162 pure Python when possible.
163 * Descriptors now have enum_types_by_name and extension_types_by_name dict
164 attributes.
165 * Support for Python 3.
166
xiaofeng@google.com2c9392f2013-02-28 06:12:28 +00001672013-02-27 version 2.5.0:
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +0000168
169 General
170 * New notion "import public" that allows a proto file to forward the content
171 it imports to its importers. For example,
172 // foo.proto
173 import public "bar.proto";
174 import "baz.proto";
175
176 // qux.proto
177 import "foo.proto";
178 // Stuff defined in bar.proto may be used in this file, but stuff from
179 // baz.proto may NOT be used without importing it explicitly.
180 This is useful for moving proto files. To move a proto file, just leave
181 a single "import public" in the old proto file.
182 * New enum option "allow_alias" that specifies whether different symbols can
183 be assigned the same numeric value. Default value is "true". Setting it to
184 false causes the compiler to reject enum definitions where multiple symbols
185 have the same numeric value.
xiaofeng@google.com7f4c9e82013-03-05 01:51:21 +0000186 Note: We plan to flip the default value to "false" in a future release.
187 Projects using enum aliases should set the option to "true" in their .proto
188 files.
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +0000189
190 C++
191 * New generated method set_allocated_foo(Type* foo) for message and string
192 fields. This method allows you to set the field to a pre-allocated object
193 and the containing message takes the ownership of that object.
194 * Added SetAllocatedExtension() and ReleaseExtension() to extensions API.
195 * Custom options are now formatted correctly when descriptors are printed in
196 text format.
197 * Various speed optimizations.
198
199 Java
200 * Comments in proto files are now collected and put into generated code as
201 comments for corresponding classes and data members.
202 * Added Parser to parse directly into messages without a Builder. For
203 example,
xiaofeng@google.com2c9392f2013-02-28 06:12:28 +0000204 Foo foo = Foo.PARSER.ParseFrom(input);
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +0000205 Using Parser is ~25% faster than using Builder to parse messages.
206 * Added getters/setters to access the underlying ByteString of a string field
207 directly.
208 * ByteString now supports more operations: substring(), prepend(), and
209 append(). The implementation of ByteString uses a binary tree structure
210 to support these operations efficiently.
211 * New method findInitializationErrors() that lists all missing required
212 fields.
213 * Various code size and speed optimizations.
214
215 Python
216 * Added support for dynamic message creation. DescriptorDatabase,
217 DescriptorPool, and MessageFactory work like their C++ couterparts to
218 simplify Descriptor construction from *DescriptorProtos, and MessageFactory
219 provides a message instance from a Descriptor.
220 * Added pickle support for protobuf messages.
221 * Unknown fields are now preserved after parsing.
222 * Fixed bug where custom options were not correctly populated. Custom
223 options can be accessed now.
224 * Added EnumTypeWrapper that provides better accessibility to enum types.
225 * Added ParseMessage(descriptor, bytes) to generate a new Message instance
226 from a descriptor and a byte string.
227
liujisi@google.com5d996322011-04-30 15:29:09 +00002282011-05-01 version 2.4.1:
229
230 C++
231 * Fixed the frendship problem for old compilers to make the library now gcc 3
232 compatible again.
233 * Fixed vcprojects/extract_includes.bat to extract compiler/plugin.h.
234
235 Java
236 * Removed usages of JDK 1.6 only features to make the library now JDK 1.5
237 compatible again.
238 * Fixed a bug about negative enum values.
239 * serialVersionUID is now defined in generated messages for java serializing.
240 * Fixed protoc to use java.lang.Object, which makes "Object" now a valid
241 message name again.
242
243 Python
244 * Experimental C++ implementation now requires C++ protobuf library installed.
245 See the README.txt in the python directory for details.
246
liujisi@google.com7a261472011-02-02 14:04:22 +00002472011-02-02 version 2.4.0:
liujisi@google.com33165fe2010-11-02 13:14:58 +0000248
249 General
250 * The RPC (cc|java|py)_generic_services default value is now false instead of
251 true.
252 * Custom options can have aggregate types. For example,
253 message MyOption {
254 optional string comment = 1;
255 optional string author = 2;
256 }
257 extend google.protobuf.FieldOptions {
258 optional MyOption myoption = 12345;
259 }
260 This option can now be set as follows:
261 message SomeType {
262 optional int32 field = 1 [(myoption) = { comment:'x' author:'y' }];
263 }
264
265 C++
266 * Various speed and code size optimizations.
267 * Added a release_foo() method on string and message fields.
268 * Fixed gzip_output_stream sub-stream handling.
269
270 Java
271 * Builders now maintain sub-builders for sub-messages. Use getFooBuilder() to
272 get the builder for the sub-message "foo". This allows you to repeatedly
273 modify deeply-nested sub-messages without rebuilding them.
274 * Builder.build() no longer invalidates the Builder for generated messages
275 (You may continue to modify it and then build another message).
276 * Code generator will generate efficient equals() and hashCode()
277 implementations if new option java_generate_equals_and_hash is enabled.
278 (Otherwise, reflection-based implementations are used.)
279 * Generated messages now implement Serializable.
280 * Fields with [deprecated=true] will be marked with @Deprecated in Java.
281 * Added lazy conversion of UTF-8 encoded strings to String objects to improve
282 performance.
283 * Various optimizations.
284 * Enum value can be accessed directly, instead of calling getNumber() on the
285 enum member.
286 * For each enum value, an integer constant is also generated with the suffix
287 _VALUE.
288
289 Python
290 * Added an experimental C++ implementation for Python messages via a Python
291 extension. Implementation type is controlled by an environment variable
292 PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION (valid values: "cpp" and "python")
293 The default value is currently "python" but will be changed to "cpp" in
294 future release.
295 * Improved performance on message instantiation significantly.
296 Most of the work on message instantiation is done just once per message
297 class, instead of once per message instance.
298 * Improved performance on text message parsing.
299 * Allow add() to forward keyword arguments to the concrete class.
300 E.g. instead of
301 item = repeated_field.add()
302 item.foo = bar
303 item.baz = quux
304 You can do:
305 repeated_field.add(foo=bar, baz=quux)
306 * Added a sort() interface to the BaseContainer.
307 * Added an extend() method to repeated composite fields.
308 * Added UTF8 debug string support.
309
temporald4e38c72010-01-09 07:35:50 +00003102010-01-08 version 2.3.0:
kenton@google.comfccb1462009-12-18 02:11:36 +0000311
312 General
313 * Parsers for repeated numeric fields now always accept both packed and
314 unpacked input. The [packed=true] option only affects serializers.
315 Therefore, it is possible to switch a field to packed format without
316 breaking backwards-compatibility -- as long as all parties are using
317 protobuf 2.3.0 or above, at least.
318 * The generic RPC service code generated by the C++, Java, and Python
319 generators can be disabled via file options:
320 option cc_generic_services = false;
321 option java_generic_services = false;
322 option py_generic_services = false;
323 This allows plugins to generate alternative code, possibly specific to some
324 particular RPC implementation.
325
326 protoc
327 * Now supports a plugin system for code generators. Plugins can generate
328 code for new languages or inject additional code into the output of other
329 code generators. Plugins are just binaries which accept a protocol buffer
330 on stdin and write a protocol buffer to stdout, so they may be written in
331 any language. See src/google/protobuf/compiler/plugin.proto.
kenton@google.com7f4938b2009-12-22 22:57:39 +0000332 **WARNING**: Plugins are experimental. The interface may change in a
333 future version.
kenton@google.com0225b352010-01-04 22:07:09 +0000334 * If the output location ends in .zip or .jar, protoc will write its output
335 to a zip/jar archive instead of a directory. For example:
336 protoc --java_out=myproto_srcs.jar --python_out=myproto.zip myproto.proto
337 Currently the archive contents are not compressed, though this could change
338 in the future.
kenton@google.comfccb1462009-12-18 02:11:36 +0000339 * inf, -inf, and nan can now be used as default values for float and double
340 fields.
341
342 C++
343 * Various speed and code size optimizations.
344 * DynamicMessageFactory is now fully thread-safe.
345 * Message::Utf8DebugString() method is like DebugString() but avoids escaping
346 UTF-8 bytes.
347 * Compiled-in message types can now contain dynamic extensions, through use
348 of CodedInputStream::SetExtensionRegistry().
kenton@google.comc0ee4d22009-12-22 02:05:33 +0000349 * Now compiles shared libraries (DLLs) by default on Cygwin and MinGW, to
350 match other platforms. Use --disable-shared to avoid this.
kenton@google.comfccb1462009-12-18 02:11:36 +0000351
352 Java
353 * parseDelimitedFrom() and mergeDelimitedFrom() now detect EOF and return
354 false/null instead of throwing an exception.
355 * Fixed some initialization ordering bugs.
356 * Fixes for OpenJDK 7.
357
358 Python
359 * 10-25 times faster than 2.2.0, still pure-Python.
360 * Calling a mutating method on a sub-message always instantiates the message
361 in its parent even if the mutating method doesn't actually mutate anything
362 (e.g. parsing from an empty string).
363 * Expanded descriptors a bit.
364
kenton@google.com201b9be2009-08-12 00:23:05 +00003652009-08-11 version 2.2.0:
kenton@google.comceb561d2009-06-25 19:05:36 +0000366
367 C++
kenton@google.com80b1d622009-07-29 01:13:20 +0000368 * Lite mode: The "optimize_for = LITE_RUNTIME" option causes the compiler
369 to generate code which only depends libprotobuf-lite, which is much smaller
370 than libprotobuf but lacks descriptors, reflection, and some other features.
kenton@google.comceb561d2009-06-25 19:05:36 +0000371 * Fixed bug where Message.Swap(Message) was only implemented for
372 optimize_for_speed. Swap now properly implemented in both modes
373 (Issue 91).
374 * Added RemoveLast and SwapElements(index1, index2) to Reflection
375 interface for repeated elements.
376 * Added Swap(Message) to Reflection interface.
kenton@google.comd2fd0632009-07-24 01:00:35 +0000377 * Floating-point literals in generated code that are intended to be
378 single-precision now explicitly have 'f' suffix to avoid pedantic warnings
379 produced by some compilers.
kenton@google.com80b1d622009-07-29 01:13:20 +0000380 * The [deprecated=true] option now causes the C++ code generator to generate
381 a GCC-style deprecation annotation (no-op on other compilers).
382 * google::protobuf::GetEnumDescriptor<SomeGeneratedEnumType>() returns the
383 EnumDescriptor for that type -- useful for templates which cannot call
384 SomeGeneratedEnumType_descriptor().
385 * Various optimizations and obscure bug fixes.
386
387 Java
388 * Lite mode: The "optimize_for = LITE_RUNTIME" option causes the compiler
389 to generate code which only depends libprotobuf-lite, which is much smaller
390 than libprotobuf but lacks descriptors, reflection, and some other features.
kenton@google.com80b1d622009-07-29 01:13:20 +0000391 * Lots of style cleanups.
392
393 Python
394 * Fixed endianness bug with floats and doubles.
395 * Text format parsing support.
396 * Fix bug with parsing packed repeated fields in embedded messages.
397 * Ability to initialize fields by passing keyword args to constructor.
398 * Support iterators in extend and __setslice__ for containers.
kenton@google.comceb561d2009-06-25 19:05:36 +0000399
kenton@google.com1fb3d392009-05-13 23:20:03 +00004002009-05-13 version 2.1.0:
kenton@google.com2d6daa72009-01-22 01:27:00 +0000401
402 General
403 * Repeated fields of primitive types (types other that string, group, and
404 nested messages) may now use the option [packed = true] to get a more
405 efficient encoding. In the new encoding, the entire list is written
406 as a single byte blob using the "length-delimited" wire type. Within
407 this blob, the individual values are encoded the same way they would
408 be normally except without a tag before each value (thus, they are
409 tightly "packed").
kenton@google.comcfa2d8a2009-04-18 00:02:12 +0000410 * For each field, the generated code contains an integer constant assigned
411 to the field number. For example, the .proto file:
412 message Foo { optional int bar_baz = 123; }
413 would generate the following constants, all with the integer value 123:
414 C++: Foo::kBarBazFieldNumber
415 Java: Foo.BAR_BAZ_FIELD_NUMBER
416 Python: Foo.BAR_BAZ_FIELD_NUMBER
417 Constants are also generated for extensions, with the same naming scheme.
418 These constants may be used as switch cases.
kenton@google.com37ad00d2009-04-21 21:00:39 +0000419 * Updated bundled Google Test to version 1.3.0. Google Test is now bundled
420 in its verbatim form as a nested autoconf package, so you can drop in any
421 other version of Google Test if needed.
kenton@google.comd37d46d2009-04-25 02:53:47 +0000422 * optimize_for = SPEED is now the default, by popular demand. Use
423 optimize_for = CODE_SIZE if code size is more important in your app.
424 * It is now an error to define a default value for a repeated field.
425 Previously, this was silently ignored (it had no effect on the generated
426 code).
427 * Fields can now be marked deprecated like:
428 optional int32 foo = 1 [deprecated = true];
429 Currently this does not have any actual effect, but in the future the code
430 generators may generate deprecation annotations in each language.
kenton@google.com9824eda2009-05-06 17:49:37 +0000431 * Cross-compiling should now be possible using the --with-protoc option to
432 configure. See README.txt for more info.
kenton@google.com2d6daa72009-01-22 01:27:00 +0000433
kenton@google.comf663b162009-04-15 19:50:54 +0000434 protoc
435 * --error_format=msvs option causes errors to be printed in Visual Studio
436 format, which should allow them to be clicked on in the build log to go
kenton@google.comd37d46d2009-04-25 02:53:47 +0000437 directly to the error location.
438 * The type name resolver will no longer resolve type names to fields. For
439 example, this now works:
440 message Foo {}
441 message Bar {
442 optional int32 Foo = 1;
443 optional Foo baz = 2;
444 }
445 Previously, the type of "baz" would resolve to "Bar.Foo", and you'd get
446 an error because Bar.Foo is a field, not a type. Now the type of "baz"
447 resolves to the message type Foo. This change is unlikely to make a
448 difference to anyone who follows the Protocol Buffers style guide.
kenton@google.comf663b162009-04-15 19:50:54 +0000449
kenton@google.com2d6daa72009-01-22 01:27:00 +0000450 C++
kenton@google.comd37d46d2009-04-25 02:53:47 +0000451 * Several optimizations, including but not limited to:
452 - Serialization, especially to flat arrays, is 10%-50% faster, possibly
453 more for small objects.
454 - Several descriptor operations which previously required locking no longer
455 do.
456 - Descriptors are now constructed lazily on first use, rather than at
457 process startup time. This should save memory in programs which do not
458 use descriptors or reflection.
459 - UnknownFieldSet completely redesigned to be more efficient (especially in
460 terms of memory usage).
461 - Various optimizations to reduce code size (though the serialization speed
462 optimizations increased code size).
kenton@google.com2d6daa72009-01-22 01:27:00 +0000463 * Message interface has method ParseFromBoundedZeroCopyStream() which parses
464 a limited number of bytes from an input stream rather than parsing until
465 EOF.
kenton@google.come59427a2009-04-16 22:30:56 +0000466 * GzipInputStream and GzipOutputStream support reading/writing gzip- or
467 zlib-compressed streams if zlib is available.
468 (google/protobuf/io/gzip_stream.h)
kenton@google.comd37d46d2009-04-25 02:53:47 +0000469 * DescriptorPool::FindAllExtensions() and corresponding
470 DescriptorDatabase::FindAllExtensions() can be used to enumerate all
471 extensions of a given type.
472 * For each enum type Foo, protoc will generate functions:
473 const string& Foo_Name(Foo value);
474 bool Foo_Parse(const string& name, Foo* result);
475 The former returns the name of the enum constant corresponding to the given
476 value while the latter finds the value corresponding to a name.
477 * RepeatedField and RepeatedPtrField now have back-insertion iterators.
478 * String fields now have setters that take a char* and a size, in addition
479 to the existing ones that took char* or const string&.
480 * DescriptorPool::AllowUnknownDependencies() may be used to tell
481 DescriptorPool to create placeholder descriptors for unknown entities
482 referenced in a FileDescriptorProto. This can allow you to parse a .proto
483 file without having access to other .proto files that it imports, for
484 example.
485 * Updated gtest to latest version. The gtest package is now included as a
486 nested autoconf package, so it should be able to drop new versions into the
487 "gtest" subdirectory without modification.
kenton@google.com2d6daa72009-01-22 01:27:00 +0000488
489 Java
490 * Fixed bug where Message.mergeFrom(Message) failed to merge extensions.
491 * Message interface has new method toBuilder() which is equivalent to
492 newBuilderForType().mergeFrom(this).
493 * All enums now implement the ProtocolMessageEnum interface.
494 * Setting a field to null now throws NullPointerException.
495 * Fixed tendency for TextFormat's parsing to overflow the stack when
496 parsing large string values. The underlying problem is with Java's
497 regex implementation (which unfortunately uses recursive backtracking
498 rather than building an NFA). Worked around by making use of possesive
499 quantifiers.
kenton@google.comd37d46d2009-04-25 02:53:47 +0000500 * Generated service classes now also generate pure interfaces. For a service
501 Foo, Foo.Interface is a pure interface containing all of the service's
502 defined methods. Foo.newReflectiveService() can be called to wrap an
503 instance of this interface in a class that implements the generic
504 RpcService interface, which provides reflection support that is usually
505 needed by RPC server implementations.
506 * RPC interfaces now support blocking operation in addition to non-blocking.
507 The protocol compiler generates separate blocking and non-blocking stubs
508 which operate against separate blocking and non-blocking RPC interfaces.
509 RPC implementations will have to implement the new interfaces in order to
510 support blocking mode.
511 * New I/O methods parseDelimitedFrom(), mergeDelimitedFrom(), and
512 writeDelimitedTo() read and write "delemited" messages from/to a stream,
513 meaning that the message size precedes the data. This way, you can write
514 multiple messages to a stream without having to worry about delimiting
515 them yourself.
516 * Throw a more descriptive exception when build() is double-called.
517 * Add a method to query whether CodedInputStream is at the end of the input
518 stream.
519 * Add a method to reset a CodedInputStream's size counter; useful when
520 reading many messages with the same stream.
521 * equals() and hashCode() now account for unknown fields.
pesho.petrov87e64e12008-12-24 01:07:22 +0000522
523 Python
524 * Added slicing support for repeated scalar fields. Added slice retrieval and
525 removal of repeated composite fields.
kenton@google.com2d6daa72009-01-22 01:27:00 +0000526 * Updated RPC interfaces to allow for blocking operation. A client may
527 now pass None for a callback when making an RPC, in which case the
528 call will block until the response is received, and the response
529 object will be returned directly to the caller. This interface change
530 cannot be used in practice until RPC implementations are updated to
531 implement it.
kenton@google.comd37d46d2009-04-25 02:53:47 +0000532 * Changes to input_stream.py should make protobuf compatible with appengine.
pesho.petrov87e64e12008-12-24 01:07:22 +0000533
kenton@google.com9f175282008-11-25 19:37:10 +00005342008-11-25 version 2.0.3:
535
536 protoc
537 * Enum values may now have custom options, using syntax similar to field
538 options.
539 * Fixed bug where .proto files which use custom options but don't actually
540 define them (i.e. they import another .proto file defining the options)
541 had to explicitly import descriptor.proto.
542 * Adjacent string literals in .proto files will now be concatenated, like in
543 C.
kenton@google.com2f669cb2008-12-02 05:59:15 +0000544 * If an input file is a Windows absolute path (e.g. "C:\foo\bar.proto") and
545 the import path only contains "." (or contains "." but does not contain
546 the file), protoc incorrectly thought that the file was under ".", because
547 it thought that the path was relative (since it didn't start with a slash).
548 This has been fixed.
kenton@google.com9f175282008-11-25 19:37:10 +0000549
550 C++
551 * Generated message classes now have a Swap() method which efficiently swaps
552 the contents of two objects.
553 * All message classes now have a SpaceUsed() method which returns an estimate
554 of the number of bytes of allocated memory currently owned by the object.
555 This is particularly useful when you are reusing a single message object
556 to improve performance but want to make sure it doesn't bloat up too large.
557 * New method Message::SerializeAsString() returns a string containing the
558 serialized data. May be more convenient than calling
559 SerializeToString(string*).
560 * In debug mode, log error messages when string-type fields are found to
561 contain bytes that are not valid UTF-8.
562 * Fixed bug where a message with multiple extension ranges couldn't parse
563 extensions.
564 * Fixed bug where MergeFrom(const Message&) didn't do anything if invoked on
565 a message that contained no fields (but possibly contained extensions).
566 * Fixed ShortDebugString() to not be O(n^2). Durr.
567 * Fixed crash in TextFormat parsing if the first token in the input caused a
568 tokenization error.
569 * Fixed obscure bugs in zero_copy_stream_impl.cc.
570 * Added support for HP C++ on Tru64.
571 * Only build tests on "make check", not "make".
572 * Fixed alignment issue that caused crashes when using DynamicMessage on
573 64-bit Sparc machines.
574 * Simplify template usage to work with MSVC 2003.
575 * Work around GCC 4.3.x x86_64 compiler bug that caused crashes on startup.
576 (This affected Fedora 9 in particular.)
kenton@google.com25bc5cd2008-12-04 20:34:50 +0000577 * Now works on "Solaris 10 using recent Sun Studio".
kenton@google.com9f175282008-11-25 19:37:10 +0000578
579 Java
580 * New overload of mergeFrom() which parses a slice of a byte array instead
581 of the whole thing.
582 * New method ByteString.asReadOnlyByteBuffer() does what it sounds like.
583 * Improved performance of isInitialized() when optimizing for code size.
584
585 Python
586 * Corrected ListFields() signature in Message base class to match what
587 subclasses actually implement.
588 * Some minor refactoring.
kenton@google.com2f669cb2008-12-02 05:59:15 +0000589 * Don't pass self as first argument to superclass constructor (no longer
590 allowed in Python 2.6).
kenton@google.com9f175282008-11-25 19:37:10 +0000591
kenton@google.com9b10f582008-09-30 00:09:40 +00005922008-09-29 version 2.0.2:
593
kenton@google.com24bf56f2008-09-24 20:31:01 +0000594 General
595 * License changed from Apache 2.0 to New BSD.
596 * It is now possible to define custom "options", which are basically
597 annotations which may be placed on definitions in a .proto file.
598 For example, you might define a field option called "foo" like so:
599 import "google/protobuf/descriptor.proto"
600 extend google.protobuf.FieldOptions {
601 optional string foo = 12345;
602 }
603 Then you annotate a field using the "foo" option:
604 message MyMessage {
605 optional int32 some_field = 1 [(foo) = "bar"]
606 }
607 The value of this option is then visible via the message's
608 Descriptor:
609 const FieldDescriptor* field =
610 MyMessage::descriptor()->FindFieldByName("some_field");
611 assert(field->options().GetExtension(foo) == "bar");
612 This feature has been implemented and tested in C++ and Java.
613 Other languages may or may not need to do extra work to support
614 custom options, depending on how they construct descriptors.
615
616 C++
617 * Fixed some GCC warnings that only occur when using -pedantic.
618 * Improved static initialization code, making ordering more
619 predictable among other things.
620 * TextFormat will no longer accept messages which contain multiple
621 instances of a singular field. Previously, the latter instance
kenton@google.com9b10f582008-09-30 00:09:40 +0000622 would overwrite the former.
kenton@google.com24bf56f2008-09-24 20:31:01 +0000623 * Now works on systems that don't have hash_map.
624
kenton@google.com9b10f582008-09-30 00:09:40 +0000625 Java
626 * Print @Override annotation in generated code where appropriate.
627
kenton@google.com24bf56f2008-09-24 20:31:01 +0000628 Python
629 * Strings now use the "unicode" type rather than the "str" type.
630 String fields may still be assigned ASCII "str" values; they will
631 automatically be converted.
632 * Adding a property to an object representing a repeated field now
633 raises an exception. For example:
634 # No longer works (and never should have).
635 message.some_repeated_field.foo = 1
kenton@google.com9b10f582008-09-30 00:09:40 +0000636
637 Windows
638 * We now build static libraries rather than DLLs by default on MSVC.
639 See vsprojects/readme.txt for more information.
640
temporala44f3c32008-08-15 18:32:02 +00006412008-08-15 version 2.0.1:
kenton@google.com9b10f582008-09-30 00:09:40 +0000642
643 protoc
644 * New flags --encode and --decode can be used to convert between protobuf text
645 format and binary format from the command-line.
646 * New flag --descriptor_set_out can be used to write FileDescriptorProtos for
647 all parsed files directly into a single output file. This is particularly
648 useful if you wish to parse .proto files from programs written in languages
649 other than C++: just run protoc as a background process and have it output
650 a FileDescriptorList, then parse that natively.
651 * Improved error message when an enum value's name conflicts with another
652 symbol defined in the enum type's scope, e.g. if two enum types declared
653 in the same scope have values with the same name. This is disallowed for
temporala44f3c32008-08-15 18:32:02 +0000654 compatibility with C++, but this wasn't clear from the error.
kenton@google.com9b10f582008-09-30 00:09:40 +0000655 * Fixed absolute output paths on Windows.
temporala44f3c32008-08-15 18:32:02 +0000656 * Allow trailing slashes in --proto_path mappings.
kenton@google.com9b10f582008-09-30 00:09:40 +0000657
658 C++
659 * Reflection objects are now per-class rather than per-instance. To make this
660 possible, the Reflection interface had to be changed such that all methods
661 take the Message instance as a parameter. This change improves performance
662 significantly in memory-bandwidth-limited use cases, since it makes the
663 message objects smaller. Note that source-incompatible interface changes
664 like this will not be made again after the library leaves beta.
temporala44f3c32008-08-15 18:32:02 +0000665 * Heuristically detect sub-messages when printing unknown fields.
kenton@google.com9b10f582008-09-30 00:09:40 +0000666 * Fix static initialization ordering bug that caused crashes at startup when
temporala44f3c32008-08-15 18:32:02 +0000667 compiling on Mac with static linking.
kenton@google.com9b10f582008-09-30 00:09:40 +0000668 * Fixed TokenizerTest when compiling with -DNDEBUG on Linux.
669 * Fixed incorrect definition of kint32min.
temporala44f3c32008-08-15 18:32:02 +0000670 * Fix bytes type setter to work with byte sequences with embedded NULLs.
671 * Other irrelevant tweaks.
672
kenton@google.com9b10f582008-09-30 00:09:40 +0000673 Java
674 * Fixed UnknownFieldSet's parsing of varints larger than 32 bits.
675 * Fixed TextFormat's parsing of "inf" and "nan".
676 * Fixed TextFormat's parsing of comments.
677 * Added info to Java POM that will be required when we upload the
temporala44f3c32008-08-15 18:32:02 +0000678 package to a Maven repo.
679
kenton@google.com9b10f582008-09-30 00:09:40 +0000680 Python
681 * MergeFrom(message) and CopyFrom(message) are now implemented.
682 * SerializeToString() raises an exception if the message is missing required
683 fields.
684 * Code organization improvements.
685 * Fixed doc comments for RpcController and RpcChannel, which had somehow been
temporala44f3c32008-08-15 18:32:02 +0000686 swapped.
kenton@google.com9b10f582008-09-30 00:09:40 +0000687 * Fixed text_format_test on Windows where floating-point exponents sometimes
688 contain extra zeros.
temporala44f3c32008-08-15 18:32:02 +0000689 * Fix Python service CallMethod() implementation.
690
691 Other
692 * Improved readmes.
693 * VIM syntax highlighting improvements.
694
temporal40ee5512008-07-10 02:12:20 +00006952008-07-07 version 2.0.0:
696
697 * First public release.