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