blob: 72ee37175f988225b4ac5963b5f99011024649e0 [file] [log] [blame]
Hao Nguyen3a5fe3b2019-04-29 13:01:54 -070012019-04-29 version 3.8.0 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)
2
3 C++
4 * Use std::atomic<int32> in case of myriad2 platform
5 * Always declare enums to be int-sized
6 * Added DebugString() and ShortDebugString() methods on MessageLite
7 * Specialized different parse loop control flows
8 * Make hasbits potentially in register. The or's start forming an obstacle because it's a read modify store on the same mem address on each iteration.
9 * Move to an internal MACRO for parser validity checks.
10 * Improve map parsing performance.
11 * Make MergePartialFromCodedStream non virtual. This allows direct calls, potential inlining and is also a code health improvement
12 * Add an overall limit to parse_context to prevent reading past it. This allows to remove a annoying level of indirection.
13 * Fix a mistake, we shouldn't verify map key/value strings for utf8 in opt mode for proto2.
14 * Further improvements to cut binary size.
15 * Prepare to make MergePartialFromCodedStream non-virtual.
16 * A report on some interesting behavior change in python (caused by b/27494216) made me realize there is a check that needs to be done in case the parse ended on a end group tag.
17 * Add a note of caution to the comments around skip in CodedOutputStream.
18 * Simplify end check.
19 * Add overload for ParseMessage for MessageLite/Message types. If the explicit type is not known inlining won't help de-virtualizing the virtual call.
20 * Reduce linker input. It turns out that ParseMessage is not inlined, producing template instantiations that are used only once and save nothing but cost more.
21 * Improve the parser.
22 * [c++17] Changed proto2::RepeatedPtrField iterators to no longer derive from the deprecated std::iterator class.
23 * Change the default value of case_insensitive_enum_parsing to false for JsonStringToMessage.
24 * Add a warning if a field name doesn't match the style guide.
25 * Fix TextFormat not round-trip correctly when float value is max float.
26 * Added locationed info for some errors at compiler
27 * Python reserved keywords are now working with getattr()/setattr() for most descriptors.
28 * Added AllowUnknownField() in text_format
29 * Append '_' to C++ reserved keywords for message, enum, extension
30 * Fix MSVC warning C4244 in protobuf's parse_context.h.
31 * Updating Iterators to be compatible with C++17 in MSVC.
32 * Use capability annotation in mutex.h
33 * Fix "UndefinedBehaviorSanitizer: cfi-bad-type"
34 * CriticalSectionLock class as a lightweight replacement for std::mutex on Windows platforms.
35 * Removed vestigial wire_format_lite_inl.h
36
37 C#
38 * Added System.Memory dependency.
39
40 Java
41 * Make Java protoc code generator ignore optimize_for LITE_RUNTIME. Users should instead use the Java lite protoc plugin.
42 * Change Extension getMessageDefaultInstance() to return Message instead of MessageLite.
43 * Prevent malicious input streams from leaking buffers for ByteString or ByteBuffer parsing.
44 * Release new Javalite runtime.
45 * Show warning in case potential file name conflict.
46 * Allow Java reserved keywords to be used in extensions.
47 * Added setAllowUnknownFields() in text format
48 * Add memoization to ExtensionRegistryLite.getEmptyRegistry()
49 * Improve performance of CodedOutputStream.writeUInt32NoTag
50 * Add an optimized mismatch-finding algorithm to UnsafeUtil.
51 * When serializing uint32 varints, check that we have MAX_VARINT32_SIZE bytes left, not just MAX_VARINT_SIZE.
52 * Minor optimization to RopeByteString.PieceIterator
53
54 JavaScript
55 * Simplify generated toObject code when the default value is used.
56
57 Python
58 * Changes implementation of Name() for enums that allow aliases in proto2 in Python to be in line with claims in C++ implementation (to return first value).
59 * Added double_format option in text format printer.
60 * Added iter and __contains__ to extension dict
61 * Added allow_unknown_field option in python text format parser
62 * Fixed Timestamp.ToDatetime() loses precision issue
63 * Support unknown field in text format printer.
64 * Float field will be convert to inf if bigger than struct.unpack('f', b'\xff\xff\x7f\x7f')[0] which is about 3.4028234664e+38,
65 convert to -inf if smaller than -3.4028234664e+38
66 * Allowed casting str->bytes in Message.__setstate__
67
68 Ruby
69 * Helper methods to get enum name for Ruby.
70
71
Hao Nguyen6b434dc2019-01-24 14:35:47 -0800722019-01-24 version 3.7.0 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)
73
74 C++
75 * Introduced new MOMI (maybe-outside-memory-interval) parser.
76 * Add an option to json_util to parse enum as case-insensitive. In the future, enum parsing in json_util will become case-sensitive.
77 * Added conformance test for enum aliases
78 * Added support for --cpp_out=speed:...
79 * Added use of C++ override keyword where appropriate
80 * Many other cleanups and fixes.
81
82 Java
83 * Fix illegal reflective access warning in JDK 9+
84 * Add BOM
85
86 Python
87 * Added Python 3.7 compatibility.
88 * Modified ParseFromString to return bytes parsed .
89 * Introduce Proto C API.
90 * FindFileContainingSymbol in descriptor pool is now able to find field and enum values.
91 * reflection.MakeClass() and reflection.ParseMessage() are deprecated.
92 * Added DescriptorPool.FindMethodByName() method in pure python (c extension alreay has it)
93 * Flipped proto3 to preserve unknown fields by default.
94 * Added support for memoryview in python3 proto message parsing.
95 * Added MergeFrom for repeated scalar fields in c extension (pure python already has it)
96 * Surrogates are now rejected at setters in python3.
97 * Added public unknown field API.
98 * RecursionLimit is also set to max if allow_oversize_protos is enabled.
99 * Disallow duplicate scalars in proto3 text_format parse.
100 * Fix some segment faults for c extension map field.
101
102 PHP
103 * Most issues for json encoding/decoding in the c extension have been fixed. There are still some edge cases not fixed. For more details, check conformance/failure_list_php_c.txt.
104 * Supports php 7.3
105 * Added helper methods to convert between enum values and names.
106 * Allow setting/getting wrapper message fields using primitive values.
107 * Various bug fixes.
108
109 Ruby
110 * Ruby 2.6 support.
111 * Drops support for ruby < 2.3.
112 * Most issues for json encoding/decoding in the c extension have been fixed. There are still some edge cases not fixed. For more details, check conformance/failure_list_ruby.txt.
113 * Json parsing can specify an option to ignore unknown fields: msg.decode_json(data, {ignore_unknown_fields: true}).
114 * Added support for proto2 syntax (partially).
115 * Various bug fixes.
116
117 Csharp
118 * More support for FieldMask include merge, intersect and more.
119 * Increasing the default recursion limit to 100.
120 * Support loading FileDescriptors dynamically.
121 * Provide access to comments from descriptors.
122 * Added Any.Is method.
123 * Compatible with C# 6
124 * Added IComparable and comparison operators on Timestamp.
125
126 Objective C
127 * Add ability to introspect list of enum values (#4678)
128 * Copy the value when setting message/data fields (#5215)
129 * Support suppressing the objc package prefix checks on a list of files (#5309)
130 * More complete keyword and NSObject method (via categories) checks for field names, can result in more fields being rename, but avoids the collisions at runtime (#5289)
131 * Small fixes to TextFormat generation for extensions (#5362)
132 * Provide more details/context in deprecation messages (#5412)
133 * Array/Dictionary enumeration blocks NS_NOESCAPE annotation for Swift (#5421)
134 * Properly annotate extensions for ARC when their names imply behaviors (#5427)
135 * Enum alias name collision improvements (#5480)
136
137
Adam Cozzette48cb18e2018-07-27 11:19:52 -07001382018-07-27 version 3.6.1 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)
139
140 C++
141 * Introduced workaround for Windows issue with std::atomic and std::once_flag
142 initialization (#4777, #4773).
143
144 PHP
145 * Added compatibility with PHP 7.3 (#4898).
146
147 Ruby
148 * Fixed Ruby crash involving Any encoding (#4718).
149
Adam Cozzetteadf84b42018-06-01 13:58:09 -07001502018-06-01 version 3.6.0 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)
151
152 C++
153 * Starting from this release, we now require C++11. For those we cannot yet
154 upgrade to C++11, we will try to keep the 3.5.x branch updated with
155 critical bug fixes only. If you have any concerns about this, please
156 comment on issue #2780.
157 * Moved to C++11 types like std::atomic and std::unique_ptr and away from our
158 old custom-built equivalents.
159 * Added support for repeated message fields in lite protos using implicit
160 weak fields. This is an experimental feature that allows the linker to
161 strip out more unused messages than previously was possible.
162 * Fixed SourceCodeInfo for interpreted options and extension range options.
163 * Fixed always_print_enums_as_ints option for JSON serialization.
164 * Added support for ignoring unknown enum values when parsing JSON.
165 * Create std::string in Arena memory.
166 * Fixed ValidateDateTime to correctly check the day.
167 * Fixed bug in ZeroCopyStreamByteSink.
168 * Various other cleanups and fixes.
169
170 Java
171 * Dropped support for Java 6.
172 * Added a UTF-8 decoder that uses Unsafe to directly decode a byte buffer.
173 * Added deprecation annotations to generated code for deprecated oneof
174 fields.
175 * Fixed map field serialization in DynamicMessage.
176 * Cleanup and documentation for Java Lite runtime.
177 * Various other fixes and cleanups
178 * Fixed unboxed arraylists to handle an edge case
179 * Improved performance for copying between unboxed arraylists
180 * Fixed lite protobuf to avoid Java compiler warnings
181 * Improved test coverage for lite runtime
182 * Performance improvements for lite runtime
183
184 Python
185 * Fixed bytes/string map key incompatibility between C++ and pure-Python
186 implementations (issue #4029)
187 * Added __init__.py files to compiler and util subpackages
188 * Use /MT for all Windows versions
189 * Fixed an issue affecting the Python-C++ implementation when used with
190 Cython (issue #2896)
191 * Various text format fixes
192 * Various fixes to resolve behavior differences between the pure-Python and
193 Python-C++ implementations
194
195 PHP
196 * Added php_metadata_namespace to control the file path of generated metadata
197 file.
198 * Changed generated classes of nested message/enum. E.g., Foo.Bar, which
199 previously generates Foo_Bar, now generates Foo/Bar
200 * Added array constructor. When creating a message, users can pass a php
201 array whose content is field name to value pairs into constructor. The
202 created message will be initialized according to the array. Note that
203 message field should use a message value instead of a sub-array.
204 * Various bug fixes.
205
206 Objective-C
207 * We removed some helper class methods from GPBDictionary to shrink the size
208 of the library, the functionary is still there, but you may need to do some
209 specific +alloc / -init… methods instead.
210 * Minor improvements in the performance of object field getters/setters by
211 avoiding some memory management overhead.
212 * Fix a memory leak during the raising of some errors.
213 * Make header importing completely order independent.
214 * Small code improvements for things the undefined behaviors compiler option
215 was flagging.
216
217 Ruby
218 * Added ruby_package file option to control the module of generated class.
219 * Various bug fixes.
220
221 Javascript
222 * Allow setting string to int64 field.
223
224 Csharp
225 * Unknown fields are now parsed and then sent back on the wire. They can be
226 discarded at parse time via a CodedInputStream option.
227 * Movement towards working with .NET 3.5 and Unity
228 * Expression trees are no longer used
229 * AOT generics issues in Unity/il2cpp have a workaround (see this commit for
230 details)
231 * Floating point values are now compared bitwise (affects NaN value
232 comparisons)
233 * The default size limit when parsing is now 2GB rather than 64MB
234 * MessageParser now supports parsing from a slice of a byte array
235 * JSON list parsing now accepts null values where the underlying proto
236 representation does
237
Jisi Liu7bf1e192017-12-20 10:59:22 -08002382017-12-20 version 3.5.1 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)
Jisi Liu7bd16062017-12-19 11:28:30 -0800239 Planned Future Changes
240 * Make C++ implementation C++11 only: we plan to require C++11 to build
241 protobuf code starting from 3.6.0 release. Please join this github issue:
Feng Xiaoafe98de2018-08-22 11:55:30 -0700242 https://github.com/protocolbuffers/protobuf/issues/2780 to provide your feedback.
Jisi Liu7bd16062017-12-19 11:28:30 -0800243
Jisi Liu62616e12017-12-19 15:22:18 -0800244 protoc
245 * Fixed a bug introduced in 3.5.0 and protoc in Windows now accepts non-ascii
246 characters in paths again.
247
Jisi Liu7bd16062017-12-19 11:28:30 -0800248 C++
Jisi Liu62616e12017-12-19 15:22:18 -0800249 * Removed several usages of C++11 features in the code base.
Jisi Liu7bd16062017-12-19 11:28:30 -0800250 * Fixed some compiler warnings.
251
252 PHP
253 * Fixed memory leak in C-extension implementation.
254 * Added discardUnknokwnFields API.
255 * Removed duplicatd typedef in C-extension headers.
256 * Avoided calling private php methods (timelib_update_ts).
257 * Fixed Any.php to use fully-qualified name for DescriptorPool.
258
259 Ruby
260 * Added Google_Protobuf_discard_unknown for discarding unknown fields in
261 messages.
262
263 C#
264 * Unknown fields are now preserved by default.
Jisi Liu62616e12017-12-19 15:22:18 -0800265 * Floating point values are now bitwise compared, affecting message equality
266 check and Contains() API in map and repeated fields.
Jisi Liu7bd16062017-12-19 11:28:30 -0800267
268
Jisi Liu44935952017-11-13 10:47:48 -08002692017-11-13 version 3.5.0 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)
Jisi Liuce2d5282017-11-08 13:50:25 -0800270 Planned Future Changes
271 * Make C++ implementation C++11 only: we plan to require C++11 to build
272 protobuf code starting from 3.6.0 release. Please join this github issue:
Feng Xiaoafe98de2018-08-22 11:55:30 -0700273 https://github.com/protocolbuffers/protobuf/issues/2780 to provide your feedback.
Jisi Liuce2d5282017-11-08 13:50:25 -0800274
275 General
276 * Unknown fields are now preserved in proto3 for most of the language
277 implementations for proto3 by default. See the per-language section for
278 details.
279 * reserve keyword are now supported in enums
280
281 C++
282 * Proto3 messages are now preserving unknown fields by default. If you rely on
283 unknowns fields being dropped. Please use DiscardUnknownFields() explicitly.
284 * Deprecated the unsafe_arena_release_* and unsafe_arena_add_allocated_*
285 methods for string fields.
286 * Added move constructor and move assignment to RepeatedField,
287 RepeatedPtrField and google::protobuf::Any.
288 * Added perfect forwarding in Arena::CreateMessage
289 * In-progress experimental support for implicit weak fields with lite protos.
290 This feature allows the linker to strip out more unused messages and reduce
291 binary size.
292 * Various performance optimizations.
293
294 Java
295 * Proto3 messages are now preserving unknown fields by default. If you’d like
Jisi Liu44935952017-11-13 10:47:48 -0800296 to drop unknown fields, please use the DiscardUnknownFieldsParser API. For
Jisi Liuce2d5282017-11-08 13:50:25 -0800297 example:
Jisi Liu8a3c5cc2017-11-08 13:55:55 -0800298 Parser<Foo> parser = DiscardUnknownFieldsParser.wrap(Foo.parser());
299 Foo foo = parser.parseFrom(input);
Jisi Liuce2d5282017-11-08 13:50:25 -0800300 * Added a new CodedInputStream decoder for Iterable<ByteBuffer> with direct
301 ByteBuffers.
302 * TextFormat now prints unknown length-delimited fields as messages if
303 possible.
304 * FieldMaskUtil.merge() no longer creates unnecessary empty messages when a
305 message field is unset in both source message and destination message.
306 * Various performance optimizations.
307
308 Python
309 * Proto3 messages are now preserving unknown fields by default. Use
310 message.DiscardUnknownFields() to drop unknown fields.
311 * Add FieldDescriptor.file in generated code.
312 * Add descriptor pool FindOneofByName in pure python.
313 * Change unknown enum values into unknown field set .
314 * Add more Python dict/list compatibility for Struct/ListValue.
315 * Add utf-8 support for text_format.Merge()/Parse().
316 * Support numeric unknown enum values for proto3 JSON format.
317 * Add warning for Unexpected end-group tag in cpp extension.
318
319 PHP
320 * Proto3 messages are now preserving unknown fields.
321 * Provide well known type messages in runtime.
322 * Add prefix ‘PB’ to generated class of reserved names.
323 * Fixed all conformance tests for encode/decode json in php runtime. C
324 extension needs more work.
325
326 Objective-C
327 * Fixed some issues around copying of messages with unknown fields and then
328 mutating the unknown fields in the copy.
329
330 C#
331 * Added unknown field support in JsonParser.
332 * Fixed oneof message field merge.
Jan Tattermusch07df2302017-11-10 18:37:33 +0100333 * Simplify parsing messages from array slices.
Jisi Liuce2d5282017-11-08 13:50:25 -0800334
335 Ruby
336 * Unknown fields are now preserved by default.
337 * Fixed several bugs for segment fault.
338
339 Javascript
340 * Decoder can handle both paced and unpacked data no matter how the proto is
341 defined.
342 * Decoder now accept long varint for 32 bit integers.
343
344
Jisi Liu3ae8c4c2017-08-14 14:32:48 -07003452017-08-14 version 3.4.0 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)
Jisi Liu8a5208f2017-08-01 15:47:26 -0700346 Planned Future Changes
347 * There are some changes that are not included in this release but are planned
348 for the near future
349 - Preserve unknown fields in proto3: We are going to bring unknown fields
350 back into proto3. In this release, some languages start to support
351 preserving unknown fields in proto3, controlled by flags/options. Some
Jisi Liu3ae8c4c2017-08-14 14:32:48 -0700352 languages also introduce explicit APIs to drop unknown fields for
Jisi Liu8a5208f2017-08-01 15:47:26 -0700353 migration. Please read the change log sections by languages for details.
354 For general timeline and plan:
355
356 https://docs.google.com/document/d/1KMRX-G91Aa-Y2FkEaHeeviLRRNblgIahbsk4wA14gRk/view
357
358 For issues and discussions:
359
Feng Xiaoafe98de2018-08-22 11:55:30 -0700360 https://github.com/protocolbuffers/protobuf/issues/272
Jisi Liu8a5208f2017-08-01 15:47:26 -0700361
362 - Make C++ implementation C++11 only: we plan to require C++11 to build
363 protobuf code starting from 3.5.0 or 3.6.0 release, after unknown fields
364 semantic changes are finished. Please join this
365 github issue:
366
Feng Xiaoafe98de2018-08-22 11:55:30 -0700367 https://github.com/protocolbuffers/protobuf/issues/2780
Jisi Liu8a5208f2017-08-01 15:47:26 -0700368
369 to provide your feedback.
370
371 General
372 * Extension ranges now accept options and are customizable.
373 * "reserve" keyword now supports “max” in field number ranges,
374 e.g. reserve 1000 to max;
375
376 C++
377 * Proto3 messages are now able to preserve unknown fields. The default
378 behavior is still to drop unknowns, which will be flipped in a future
379 release. If you rely on unknowns fields being dropped. Please use
Jisi Liu39a91d32017-08-03 11:15:47 -0700380 Message::DiscardUnknownFields() explicitly.
Jisi Liu8a5208f2017-08-01 15:47:26 -0700381 * Packable proto3 fields are now packed by default in serialization.
382 * Following C++11 features are introduced when C++11 is available:
383 - move-constructor and move-assignment are introduced to messages
384 - Repeated fields constructor now takes std::initializer_list
385 - rvalue setters are introduced for string fields
386 * Experimental Table-Driven parsing and serialization available to test. To
387 enable it, pass in table_driven_parsing table_driven_serialization protoc
388 generator flags for C++
389
390 $ protoc --cpp_out=table_driven_parsing,table_driven_serialization:./ \
391 test.proto
Jisi Liu3ae8c4c2017-08-14 14:32:48 -0700392
Jisi Liu8a5208f2017-08-01 15:47:26 -0700393 * lite generator parameter supported by the generator. Once set, all generated
394 files, use lite runtime regardless of the optimizer_for setting in the
395 .proto file.
396 * Various optimizations to make C++ code more performant on PowerPC platform
397 * Fixed maps data corruption when the maps are modified by both reflection API
398 and generated API.
399 * Deterministic serialization on maps reflection now uses stable sort.
400 * file() accessors are introduced to various *Descriptor classes to make
401 writing template function easier.
402 * ByteSize() and SpaceUsed() are deprecated.Use ByteSizeLong() and
403 SpaceUsedLong() instead
404 * Consistent hash function is used for maps in DEBUG and NDEBUG build.
405 * "using namespace std" is removed from stubs/common.h
406 * Various performance optimizations and bug fixes
407
408 Java
409 * Introduced new parser API DiscardUnknownFieldsParser in preparation of
410 proto3 unknown fields preservation change. Users who want to drop unknown
411 fields should migrate to use this new parser API. For example:
412
413 Parser<Foo> parser = DiscardUnknownFieldsParser.wrap(Foo.parser());
414 Foo foo = parser.parseFrom(input);
415
416 * Introduced new TextFormat API printUnicodeFieldValue() that prints field
417 value without escaping unicode characters.
418 * Added Durations.compare(Duration, Duration) and
419 Timestamps.compare(Timestamp, Timestamp).
420 * JsonFormat now accepts base64url encoded bytes fields.
421 * Optimized CodedInputStream to do less copies when parsing large bytes
422 fields.
423 * Optimized TextFormat to allocate less memory when printing.
424
425 Python
426 * SerializeToString API is changed to SerializeToString(self, **kwargs),
427 deterministic parameter is accepted for deterministic serialization.
428 * Added sort_keys parameter in json format to make the output deterministic.
429 * Added indent parameter in json format.
430 * Added extension support in json format.
431 * Added __repr__ support for repeated field in cpp implementation.
432 * Added file in FieldDescriptor.
433 * Added pretty-print filter to text format.
434 * Services and method descriptors are always printed even if generic_service
435 option is turned off.
Jie Luod1484cd2017-08-16 14:40:59 -0700436 * Note: AppEngine 2.5 is deprecated on June 2017 that AppEngine 2.5 will
437 never update protobuf runtime. Users who depend on AppEngine 2.5 should use
438 old protoc.
Jisi Liu44935952017-11-13 10:47:48 -0800439
Jisi Liu8a5208f2017-08-01 15:47:26 -0700440 PHP
441 * Support PHP generic services. Specify file option php_generic_service=true
442 to enable generating service interface.
443 * Message, repeated and map fields setters take value instead of reference.
444 * Added map iterator in c extension.
445 * Support json  encode/decode.
446 * Added more type info in getter/setter phpdoc
447 * Fixed the problem that c extension and php implementation cannot be used
448 together.
449 * Added file option php_namespace to use custom php namespace instead of
450 package.
451 * Added fluent setter.
452 * Added descriptor API in runtime for custom encode/decode.
453 * Various bug fixes.
454
455 Objective-C
456 * Fix for GPBExtensionRegistry copying and add tests.
457 * Optimize GPBDictionary.m codegen to reduce size of overall library by 46K
458 per architecture.
459 * Fix some cases of reading of 64bit map values.
460 * Properly error on a tag with field number zero.
461 * Preserve unknown fields in proto3 syntax files.
462 * Document the exceptions on some of the writing apis.
463
464 C#
465 * Implemented IReadOnlyDictionary<K,V> in MapField<K,V>
466 * Added TryUnpack method for Any message in addition to Unpack.
467 * Converted C# projects to MSBuild (csproj) format.
468
469 Ruby
470 * Several bug fixes.
471
472 Javascript
473 * Added support of field option js_type. Now one can specify the JS type of a
474 64-bit integer field to be string in the generated code by adding option
475 [jstype = JS_STRING] on the field.
476
Feng Xiao80f0c0a2017-04-05 17:26:46 -07004772017-04-05 version 3.3.0 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)
478 Planned Future Changes
479 * There are some changes that are not included in this release but are
480 planned for the near future:
481 - Preserve unknown fields in proto3: please read this doc:
482
483 https://docs.google.com/document/d/1KMRX-G91Aa-Y2FkEaHeeviLRRNblgIahbsk4wA14gRk/view
484
485 for the timeline and follow up this github issue:
486
Feng Xiaoafe98de2018-08-22 11:55:30 -0700487 https://github.com/protocolbuffers/protobuf/issues/272
Feng Xiao80f0c0a2017-04-05 17:26:46 -0700488
489 for discussion.
490 - Make C++ implementation C++11 only: we plan to require C++11 to build
491 protobuf code starting from 3.4.0 or 3.5.0 release. Please join this
492 github issue:
493
Feng Xiaoafe98de2018-08-22 11:55:30 -0700494 https://github.com/protocolbuffers/protobuf/issues/2780
Feng Xiao80f0c0a2017-04-05 17:26:46 -0700495
496 to provide your feedback.
497
498 C++
499 * Fixed map fields serialization of DynamicMessage to correctly serialize
500 both key and value regardless of their presence.
501 * Parser now rejects field number 0 correctly.
502 * New API Message::SpaceUsedLong() that’s equivalent to
503 Message::SpaceUsed() but returns the value in size_t.
504 * JSON support
505 - New flag always_print_enums_as_ints in JsonPrintOptions.
506 - New flag preserve_proto_field_names in JsonPrintOptions. It will instruct
507 the JSON printer to use the original field name declared in the .proto
508 file instead of converting them to lowerCamelCase when printing JSON.
509 - JsonPrintOptions.always_print_primtive_fields now works for oneof message
510 fields.
511 - Fixed a bug that doesn’t allow different fields to set the same json_name
512 value.
513 - Fixed a performance bug that causes excessive memory copy when printing
514 large messages.
515 * Various performance optimizations.
516
517 Java
518 * Map field setters eagerly validate inputs and throw NullPointerExceptions
519 as appropriate.
520 * Added ByteBuffer overloads to the generated parsing methods and the Parser
521 interface.
522 * proto3 enum's getNumber() method now throws on UNRECOGNIZED values.
523 * Output of JsonFormat is now locale independent.
524
525 Python
526 * Added FindServiceByName() in the pure-Python DescriptorPool. This works only
527 for descriptors added with DescriptorPool.Add(). Generated descriptor_pool
528 does not support this yet.
529 * Added a descriptor_pool parameter for parsing Any in text_format.Parse().
530 * descriptor_pool.FindFileContainingSymbol() now is able to find nested
531 extensions.
532 * Extending empty [] to repeated field now sets parent message presence.
533
534 PHP
535 * Added file option php_class_prefix. The prefix will be prepended to all
536 generated classes defined in the file.
537 * When encoding, negative int32 values are sign-extended to int64.
538 * Repeated/Map field setter accepts a regular PHP array. Type checking is
539 done on the array elements.
540 * encode/decode are renamed to serializeToString/mergeFromString.
541 * Added mergeFrom, clear method on Message.
542 * Fixed a bug that oneof accessor didn’t return the field name that is
543 actually set.
544 * C extension now works with php7.
545 * This is the first GA release of PHP. We guarantee that old generated code
546 can always work with new runtime and new generated code.
547
548 Objective-C
549 * Fixed help for GPBTimestamp for dates before the epoch that contain
550 fractional seconds.
551 * Added GPBMessageDropUnknownFieldsRecursively() to remove unknowns from a
552 message and any sub messages.
553 * Addressed a threading race in extension registration/lookup.
554 * Increased the max message parsing depth to 100 to match the other languages.
555 * Removed some use of dispatch_once in favor of atomic compare/set since it
556 needs to be heap based.
557 * Fixes for new Xcode 8.3 warnings.
558
559 C#
560 * Fixed MapField.Values.CopyTo, which would throw an exception unnecessarily
561 if provided exactly the right size of array to copy to.
562 * Fixed enum JSON formatting when multiple names mapped to the same numeric
563 value.
564 * Added JSON formatting option to format enums as integers.
565 * Modified RepeatedField<T> to implement IReadOnlyList<T>.
566 * Introduced the start of custom option handling; it's not as pleasant as it
567 might be, but the information is at least present. We expect to extend code
568 generation to improve this in the future.
569 * Introduced ByteString.FromStream and ByteString.FromStreamAsync to
570 efficiently create a ByteString from a stream.
571 * Added whole-message deprecation, which decorates the class with [Obsolete].
572
573 Ruby
574 * Fixed Message#to_h for messages with map fields.
575 * Fixed memcpy() in binary gems to work for old glibc, without breaking the
576 build for non-glibc libc’s like musl.
577
578 Javascript
579 * Added compatibility tests for version 3.0.0.
580 * Added conformance tests.
581 * Fixed serialization of extensions: we need to emit a value even if it is
582 falsy (like the number 0).
583 * Use closurebuilder.py in favor of calcdeps.py for compiling JavaScript.
584
Paul Yang7f3e2372017-01-31 09:17:32 -08005852017-01-23 version 3.2.0 (C++/Java/Python/PHP/Ruby/Objective-C/C#/JavaScript/Lite)
586 General
587 * Added protoc version number to protoc plugin protocol. It can be used by
588 protoc plugin to detect which version of protoc is used with the plugin and
589 mitigate known problems in certain version of protoc.
590
591 C++
592 * The default parsing byte size limit has been raised from 64MB to 2GB.
593 * Added rvalue setters for non-arena string fields.
594 * Enabled debug logging for Android.
595 * Fixed a double-free problem when using Reflection::SetAllocatedMessage()
596 with extension fields.
597 * Fixed several deterministic serialization bugs:
598 * MessageLite::SerializeAsString() now respects the global deterministic
599 serialization flag.
600 * Extension fields are serialized deterministically as well. Fixed protocol
601 compiler to correctly report importing-self as an error.
602 * Fixed FileDescriptor::DebugString() to print custom options correctly.
603 * Various performance/codesize optimizations and cleanups.
604
605 Java
606 * The default parsing byte size limit has been raised from 64MB to 2GB.
607 * Added recursion limit when parsing JSON.
608 * Fixed a bug that enumType.getDescriptor().getOptions() doesn't have custom
609 options.
610 * Fixed generated code to support field numbers up to 2^29-1.
611
612 Python
613 * You can now assign NumPy scalars/arrays (np.int32, np.int64) to protobuf
614 fields, and assigning other numeric types has been optimized for
615 performance.
616 * Pure-Python: message types are now garbage-collectable.
617 * Python/C++: a lot of internal cleanup/refactoring.
618
619 PHP (Alpha)
620 * For 64-bit integers type (int64/uint64/sfixed64/fixed64/sint64), use PHP
621 integer on 64-bit environment and PHP string on 32-bit environment.
622 * PHP generated code also conforms to PSR-4 now.
623 * Fixed ZTS build for c extension.
624 * Fixed c extension build on Mac.
625 * Fixed c extension build on 32-bit linux.
626 * Fixed the bug that message without namespace is not found in the descriptor
627 pool. (#2240)
628 * Fixed the bug that repeated field is not iterable in c extension.
629 * Message names Empty will be converted to GPBEmpty in generated code.
630 * Added phpdoc in generated files.
631 * The released API is almost stable. Unless there is large problem, we won't
632 change it. See
633 https://developers.google.com/protocol-buffers/docs/reference/php-generated
634 for more details.
635
636 Objective-C
637 * Added support for push/pop of the stream limit on CodedInputStream for
638 anyone doing manual parsing.
639
640 C#
641 * No changes.
642
643 Ruby
644 * Message objects now support #respond_to? for field getters/setters.
645 * You can now compare “message == non_message_object” and it will return false
646 instead of throwing an exception.
647 * JRuby: fixed #hashCode to properly reflect the values in the message.
648
649 Javascript
650 * Deserialization of repeated fields no longer has quadratic performance
651 behavior.
652 * UTF-8 encoding/decoding now properly supports high codepoints.
653 * Added convenience methods for some well-known types: Any, Struct, and
654 Timestamp. These make it easier to convert data between native JavaScript
655 types and the well-known protobuf types.
656
Paul Yang17cc42a2016-09-23 18:33:25 -07006572016-09-23 version 3.1.0 (C++/Java/Python/PHP/Ruby/Objective-C/C#/JavaScript/Lite)
658 General
659 * Proto3 support in PHP (alpha).
660 * Various bug fixes.
661
662 C++
663 * Added MessageLite::ByteSizeLong() that’s equivalent to
664 MessageLite::ByteSize() but returns the value in size_t. Useful to check
665 whether a message is over the 2G size limit that protobuf can support.
666 * Moved default_instances to global variables. This allows default_instance
667 addresses to be known at compile time.
668 * Adding missing generic gcc 64-bit atomicops.
669 * Restore New*Callback into google::protobuf namespace since these are used
670 by the service stubs code
671 * JSON support.
672 * Fixed some conformance issues.
673 * Fixed a JSON serialization bug for bytes fields.
674
675 Java
676 * Fixed a bug in TextFormat that doesn’t accept empty repeated fields (i.e.,
677 “field: [ ]”).
678 * JSON support
679 * Fixed JsonFormat to do correct snake_case-to-camelCase conversion for
680 non-style-conforming field names.
681 * Fixed JsonFormat to parse empty Any message correctly.
682 * Added an option to JsonFormat.Parser to ignore unknown fields.
683 * Experimental API
684 * Added UnsafeByteOperations.unsafeWrap(byte[]) to wrap a byte array into
685 ByteString without copy.
686
687 Python
688 * JSON support
689 * Fixed some conformance issues.
690
691 PHP (Alpha)
692 * We have added the proto3 support for PHP via both a pure PHP package and a
693 native c extension. The pure PHP package is intended to provide usability
694 to wider range of PHP platforms, while the c extension is intended to
695 provide higher performance. Both implementations provide the same runtime
696 APIs and share the same generated code. Users don’t need to re-generate
697 code for the same proto definition when they want to switch the
698 implementation later. The pure PHP package is included in the php/src
Paul Yang7f3e2372017-01-31 09:17:32 -0800699 directory, and the c extension is included in the php/ext directory.
700
Paul Yang17cc42a2016-09-23 18:33:25 -0700701 Both implementations provide idiomatic PHP APIs:
702 * All messages and enums are defined as PHP classes.
703 * All message fields can only be accessed via getter/setter.
704 * Both repeated field elements and map elements are stored in containers
705 that act like a normal PHP array.
Paul Yang7f3e2372017-01-31 09:17:32 -0800706
Paul Yang17cc42a2016-09-23 18:33:25 -0700707 Unlike several existing third-party PHP implementations for protobuf, our
708 implementations are built on a "strongly-typed" philosophy: message fields
709 and array/map containers will throw exceptions eagerly when values of the
710 incorrect type (not including those that can be type converted, e.g.,
711 double <-> integer <-> numeric string) are inserted.
Paul Yang7f3e2372017-01-31 09:17:32 -0800712
Paul Yang17cc42a2016-09-23 18:33:25 -0700713 Currently, pure PHP runtime supports php5.5, 5.6 and 7 on linux. C
714 extension runtime supports php5.5 and 5.6 on linux.
Paul Yang7f3e2372017-01-31 09:17:32 -0800715
Paul Yang17cc42a2016-09-23 18:33:25 -0700716 See php/README.md for more details about installment. See
717 https://developers.google.com/protocol-buffers/docs/phptutorial for more
718 details about APIs.
719
720 Objective-C
Benjamin Peterson5939bc32019-03-21 12:31:41 -0700721 * Helpers are now provided for working the Any well known type (see
Paul Yang17cc42a2016-09-23 18:33:25 -0700722 GPBWellKnownTypes.h for the api additions).
723 * Some improvements in startup code (especially when extensions aren’t used).
724
725 Javascript
726 * Fixed missing import of jspb.Map
727 * Fixed valueWriterFn variable name
728
729 Ruby
730 * Fixed hash computation for JRuby's RubyMessage
731 * Make sure map parsing frames are GC-rooted.
732 * Added API support for well-known types.
733
734 C#
735 * Removed check on dependency in the C# reflection API.
736
Jisi Liue298ce52016-09-06 14:37:35 -07007372016-09-06 version 3.0.2 (C++/Java/Python/Ruby/Objective-C/C#/JavaScript/Lite)
Jisi Liu4041ed42016-09-02 11:24:58 -0700738 General
739 * Various bug fixes.
740
741 Objective C
742 * Fix for oneofs in proto3 syntax files where fields were set to the zero
743 value.
744 * Fix for embedded null character in strings.
745 * CocoaDocs support
746
747 Ruby
Jisi Liu0c9999f2016-09-02 11:40:58 -0700748 * Fixed memory corruption bug in parsing that could occur under GC pressure.
Jisi Liu4041ed42016-09-02 11:24:58 -0700749
750 Javascript
Jisi Liu0c9999f2016-09-02 11:40:58 -0700751 * jspb.Map is now properly exported to CommonJS modules.
752
753 C#
754 * Removed legacy_enum_values flag.
755
Jisi Liu4041ed42016-09-02 11:24:58 -0700756
Jisi Liue0d817e2016-07-27 12:08:01 -07007572016-07-27 version 3.0.0 (C++/Java/Python/Ruby/Objective-C/C#/JavaScript/Lite)
758 General
759 * This log only contains changes since the beta-4 release. Summarized change
760 log since the last stable release (v2.6.1) can be found in the github
761 release page.
762
763 Compatibility Notice
764 * v3.0.0 is the first API stable release of the v3.x series. We do not expect
765 any future API breaking changes.
766 * For C++, Java Lite and Objective-C, source level compatibility is
767 guaranteed. Upgrading from v3.0.0 to newer minor version releases will be
768 source compatible. For example, if your code compiles against protobuf
769 v3.0.0, it will continue to compile after you upgrade protobuf library to
770 v3.1.0.
771 * For other languages, both source level compatibility and binary level
772 compatibility are guaranteed. For example, if you have a Java binary built
773 against protobuf v3.0.0. After switching the protobuf runtime binary to
774 v3.1.0, your built binary should continue to work.
775 * Compatibility is only guaranteed for documented API and documented
776 behaviors. If you are using undocumented API (e.g., use anything in the C++
777 internal namespace), it can be broken by minor version releases in an
778 undetermined manner.
779
780 Ruby
781 * When you assign a string field `a.string_field = "X"`, we now call
782 #encode(UTF-8) on the string and freeze the copy. This saves you from
783 needing to ensure the string is already encoded as UTF-8. It also prevents
784 you from mutating the string after it has been assigned (this is how we
785 ensure it stays valid UTF-8).
786 * The generated file for `foo.proto` is now `foo_pb.rb` instead of just
787 `foo.rb`. This makes it easier to see which imports/requires are from
788 protobuf generated code, and also prevents conflicts with any `foo.rb` file
789 you might have written directly in Ruby. It is a backward-incompatible
790 change: you will need to update all of your `require` statements.
791 * For package names like `foo_bar`, we now translate this to the Ruby module
792 `FooBar`. This is more idiomatic Ruby than what we used to do (`Foo_bar`).
793
794 JavaScript
795 * Scalar fields like numbers and boolean now return defaults instead of
796 `undefined` or `null` when they are unset. You can test for presence
797 explicitly by calling `hasFoo()`, which we now generate for scalar fields.
798
799 Java Lite
800 * Java Lite is now implemented as a separate plugin, maintained in the
801 `javalite` branch. Both lite runtime and protoc artifacts will be available
802 in Maven.
803
804 C#
805 * Target platforms now .NET 4.5, selected portable subsets and .NET Core.
806 * legacy_enum_values option is no longer supported.
807
Feng Xiao1349fb82016-07-15 12:19:15 -07008082016-07-15 version 3.0.0-beta-4 (C++/Java/Python/Ruby/Objective-C/C#/JavaScript)
809 General
Feng Xiao82b43d12016-07-18 10:36:04 -0700810 * Added a deterministic serialization API for C++. The deterministic
Feng Xiao1349fb82016-07-15 12:19:15 -0700811 serialization guarantees that given a binary, equal messages will be
812 serialized to the same bytes. This allows applications like MapReduce to
813 group equal messages based on the serialized bytes. The deterministic
814 serialization is, however, NOT canonical across languages; it is also
815 unstable across different builds with schema changes due to unknown fields.
816 Users who need canonical serialization, e.g. persistent storage in a
817 canonical form, fingerprinting, etc, should define their own
818 canonicalization specification and implement the serializer using reflection
819 APIs rather than relying on this API.
820 * Added OneofOptions. You can now define custom options for oneof groups.
821 import "google/protobuf/descriptor.proto";
822 extend google.protobuf.OneofOptions {
823 optional int32 my_oneof_extension = 12345;
824 }
825 message Foo {
826 oneof oneof_group {
827 (my_oneof_extension) = 54321;
828 ...
829 }
830 }
831
832 C++ (beta)
833 * Introduced a deterministic serialization API in
834 CodedOutputStream::SetSerializationDeterministic(bool). See the notes about
835 deterministic serialization in the General section.
836 * Added google::protobuf::Map::swap() to swap two map fields.
837 * Fixed a memory leak when calling Reflection::ReleaseMessage() on a message
838 allocated on arena.
839 * Improved error reporting when parsing text format protos.
840 * JSON
841 - Added a new parser option to ignore unknown fields when parsing JSON.
842 - Added convenient methods for message to/from JSON conversion.
843 * Various performance optimizations.
844
845 Java (beta)
Feng Xiao1349fb82016-07-15 12:19:15 -0700846 * File option "java_generate_equals_and_hash" is now deprecated. equals() and
847 hashCode() methods are generated by default.
848 * Added a new JSON printer option "omittingInsignificantWhitespace" to produce
849 a more compact JSON output. The printer will pretty-print by default.
850 * Updated Java runtime to be compatible with 2.5.0/2.6.1 generated protos.
851
852 Python (beta)
853 * Added support to pretty print Any messages in text format.
854 * Added a flag to ignore unknown fields when parsing JSON.
855 * Bugfix: "@type" field of a JSON Any message is now correctly put before
856 other fields.
857
858 Objective-C (beta)
859 * Updated the code to support compiling with more compiler warnings
860 enabled. (Issue 1616)
861 * Exposing more detailed errors for parsing failures. (PR 1623)
862 * Small (breaking) change to the naming of some methods on the support classes
863 for map<>. There were collisions with the system provided KVO support, so
864 the names were changed to avoid those issues. (PR 1699)
865 * Fixed for proper Swift bridging of error handling during parsing. (PR 1712)
866 * Complete support for generating sources that will go into a Framework and
867 depend on generated sources from other Frameworks. (Issue 1457)
868
869 C# (beta)
870 * RepeatedField optimizations.
871 * Support for .NET Core.
872 * Minor bug fixes.
873 * Ability to format a single value in JsonFormatter (advanced usage only).
874 * Modifications to attributes applied to generated code.
875
876 Javascript (alpha)
877 * Maps now have a real map API instead of being treated as repeated fields.
878 * Well-known types are now provided in the google-protobuf package, and the
879 code generator knows to require() them from that package.
880 * Bugfix: non-canonical varints are correctly decoded.
881
882 Ruby (alpha)
883 * Accessors for oneof fields now return default values instead of nil.
884
Feng Xiao3d9726f2016-07-15 15:26:44 -0700885 Java Lite
886 * Java lite support is removed from protocol compiler. It will be supported
887 as a protocol compiler plugin in a separate code branch.
888
Jisi Liu0ec34bf2016-05-16 11:20:33 -07008892016-05-16 version 3.0.0-beta-3 (C++/Java/Python/Ruby/Nano/Objective-C/C#/JavaScript)
Jisi Liu0e4d1ea2016-05-10 17:32:35 -0700890 General
891 * Supported Proto3 lite-runtime in C++/Java for mobile platforms.
892 * Any type now supports APIs to specify prefixes other than
893 type.googleapis.com
Jisi Liu0ec34bf2016-05-16 11:20:33 -0700894 * Removed javanano_use_deprecated_package option; Nano will always has its own
895 ".nano" package.
Jisi Liu0e4d1ea2016-05-10 17:32:35 -0700896
897 C++ (Beta)
Jisi Liu034867f2016-05-13 16:16:14 -0700898 * Improved hash maps.
899 - Improved hash maps comments. In particular, please note that equal hash
900 maps will not necessarily have the same iteration order and
901 serialization.
902 - Added a new hash maps implementation that will become the default in a
903 later release.
Jisi Liu0e4d1ea2016-05-10 17:32:35 -0700904 * Arenas
905 - Several inlined methods in Arena were moved to out-of-line to improve
906 build performance and code size.
907 - Added SpaceAllocatedAndUsed() to report both space used and allocated
908 - Added convenient class UnsafeArenaAllocatedRepeatedPtrFieldBackInserter
909 * Any
Jisi Liuede9cc42016-05-11 15:30:21 -0700910 - Allow custom type URL prefixes in Any packing.
Jisi Liu0e4d1ea2016-05-10 17:32:35 -0700911 - TextFormat now expand the Any type rather than printing bytes.
912 * Performance optimizations and various bug fixes.
913
914 Java (Beta)
915 * Introduced an ExperimentalApi annotation. Annotated APIs are experimental
916 and are subject to change in a backward incompatible way in future releases.
Jisi Liuede9cc42016-05-11 15:30:21 -0700917 * Introduced zero-copy serialization as an ExperimentalApi
918 - Introduction of the `ByteOutput` interface. This is similar to
919 `OutputStream` but provides semantics for lazy writing (i.e. no
920 immediate copy required) of fields that are considered to be immutable.
921 - `ByteString` now supports writing to a `ByteOutput`, which will directly
922 expose the internals of the `ByteString` (i.e. `byte[]` or `ByteBuffer`)
923 to the `ByteOutput` without copying.
924 - `CodedOutputStream` now supports writing to a `ByteOutput`. `ByteString`
925 instances that are too large to fit in the internal buffer will be
926 (lazily) written to the `ByteOutput` directly.
927 - This allows applications using large `ByteString` fields to avoid
928 duplication of these fields entirely. Such an application can supply a
929 `ByteOutput` that chains together the chunks received from
930 `CodedOutputStream` before forwarding them onto the IO system.
931 * Other related changes to `CodedOutputStream`
932 - Additional use of `sun.misc.Unsafe` where possible to perform fast
933 access to `byte[]` and `ByteBuffer` values and avoiding unnecessary
934 range checking.
935 - `ByteBuffer`-backed `CodedOutputStream` now writes directly to the
936 `ByteBuffer` rather than to an intermediate array.
Jisi Liu0ec34bf2016-05-16 11:20:33 -0700937 * Improved lite-runtime.
938 - Lite protos now implement deep equals/hashCode/toString
939 - Significantly improved the performance of Builder#mergeFrom() and
940 Builder#mergeDelimitedFrom()
Jisi Liu0e4d1ea2016-05-10 17:32:35 -0700941 * Various bug fixes and small feature enhancement.
942 - Fixed stack overflow when in hashCode() for infinite recursive oneofs.
943 - Fixed the lazy field parsing in lite to merge rather than overwrite.
944 - TextFormat now supports reporting line/column numbers on errors.
Jisi Liu0ec34bf2016-05-16 11:20:33 -0700945 - Updated to add appropriate @Override for better compiler errors.
Jisi Liu0e4d1ea2016-05-10 17:32:35 -0700946
947 Python (Beta)
Jie Luoe4ca6942016-05-11 16:39:50 -0700948 * Added JSON format for Any, Struct, Value and ListValue
949 * [ ] is now accepted for both repeated scalar fields and repeated message
950 fields in text format parser.
951 * Numerical field name is now supported in text format.
952 * Added DiscardUnknownFields API for python protobuf message.
Jisi Liu0e4d1ea2016-05-10 17:32:35 -0700953
954 Objective-C (Beta)
Jisi Liuede9cc42016-05-11 15:30:21 -0700955 * Proto comments now come over as HeaderDoc comments in the generated sources
956 so Xcode can pick them up and display them.
957 * The library headers have been updated to use HeaderDoc comments so Xcode can
958 pick them up and display them.
959 * The per message and per field overhead in both generated code and runtime
960 object sizes was reduced.
961 * Generated code now include deprecated annotations when the proto file
962 included them.
Jisi Liu0e4d1ea2016-05-10 17:32:35 -0700963
964 C# (Beta)
Jisi Liuede9cc42016-05-11 15:30:21 -0700965 In general: some changes are breaking, which require regenerating messages.
966 Most user-written code will not be impacted *except* for the renaming of enum
967 values.
968
969 * Allow custom type URL prefixes in `Any` packing, and ignore them when
970 unpacking
971 * `protoc` is now in a separate NuGet package (Google.Protobuf.Tools)
972 * New option: `internal_access` to generate internal classes
973 * Enum values are now PascalCased, and if there's a prefix which matches the
974 name of the enum, that is removed (so an enum `COLOR` with a value
975 `COLOR_BLUE` would generate a value of just `Blue`). An option
976 (`legacy_enum_values`) is temporarily available to disable this, but the
977 option will be removed for GA.
978 * `json_name` option is now honored
979 * If group tags are encountered when parsing, they are validated more
980 thoroughly (although we don't support actual groups)
981 * NuGet dependencies are better specified
982 * Breaking: `Preconditions` is renamed to `ProtoPreconditions`
983 * Breaking: `GeneratedCodeInfo` is renamed to `GeneratedClrTypeInfo`
984 * `JsonFormatter` now allows writing to a `TextWriter`
985 * New interface, `ICustomDiagnosticMessage` to allow more compact
986 representations from `ToString`
987 * `CodedInputStream` and `CodedOutputStream` now implement `IDisposable`,
988 which simply disposes of the streams they were constructed with
989 * Map fields no longer support null values (in line with other languages)
990 * Improvements in JSON formatting and parsing
Jisi Liu0e4d1ea2016-05-10 17:32:35 -0700991
992 Javascript (Alpha)
Josh Habermand346f492016-05-12 17:55:56 -0700993 * Better support for "bytes" fields: bytes fields can be read as either a
994 base64 string or UInt8Array (in environments where TypedArray is supported).
995 * New support for CommonJS imports. This should make it easier to use the
996 JavaScript support in Node.js and tools like WebPack. See js/README.md for
997 more information.
998 * Some significant internal refactoring to simplify and modularize the code.
999
1000 Ruby (Alpha)
1001 * JSON serialization now properly uses camelCased names, with a runtime option
1002 that will preserve original names from .proto files instead.
1003 * Well-known types are now included in the distribution.
1004 * Release now includes binary gems for Windows, Mac, and Linux instead of just
1005 source gems.
1006 * Bugfix for serializing oneofs.
Jisi Liu0e4d1ea2016-05-10 17:32:35 -07001007
1008 C++/Java Lite (Alpha)
1009 A new "lite" generator parameter was introduced in the protoc for C++ and
Jisi Liu5668e2e2016-05-11 14:57:06 -07001010 Java for Proto3 syntax messages. Example usage:
Jisi Liu0e4d1ea2016-05-10 17:32:35 -07001011
1012 ./protoc --cpp_out=lite:$OUTPUT_PATH foo.proto
1013
1014 The protoc will treat the current input and all the transitive dependencies
1015 as LITE. The same generator parameter must be used to generate the
1016 dependencies.
1017
1018 In Proto3 syntax files, "optimized_for=LITE_RUNTIME" is no longer supported.
1019
1020
Josh Haberman81e75c12015-12-30 14:03:49 -080010212015-12-30 version 3.0.0-beta-2 (C++/Java/Python/Ruby/Nano/Objective-C/C#/JavaScript)
Feng Xiaod5fb4082015-12-21 14:36:30 -08001022 General
Dongjoon Hyun7b08d492016-01-11 14:52:01 -08001023 * Introduced a new language implementation: JavaScript.
Feng Xiaod5fb4082015-12-21 14:36:30 -08001024 * Added a new field option "json_name". By default proto field names are
1025 converted to "lowerCamelCase" in proto3 JSON format. This option can be
1026 used to override this behavior and specify a different JSON name for the
1027 field.
1028 * Added conformance tests to ensure implementations are following proto3 JSON
1029 specification.
1030
1031 C++ (Beta)
1032 * Various bug fixes and improvements to the JSON support utility:
1033 - Duplicate map keys in JSON are now rejected (i.e., translation will
1034 fail).
1035 - Fixed wire-format for google.protobuf.Value/ListValue.
1036 - Fixed precision loss when converting google.protobuf.Timestamp.
1037 - Fixed a bug when parsing invalid UTF-8 code points.
1038 - Fixed a memory leak.
1039 - Reduced call stack usage.
1040
1041 Java (Beta)
1042 * Cleaned up some unused methods on CodedOutputStream.
1043 * Presized lists for packed fields during parsing in the lite runtime to
1044 reduce allocations and improve performance.
1045 * Improved the performance of unknown fields in the lite runtime.
1046 * Introduced UnsafeByteStrings to support zero-copy ByteString creation.
1047 * Various bug fixes and improvements to the JSON support utility:
1048 - Fixed a thread-safety bug.
1049 - Added a new option “preservingProtoFieldNames” to JsonFormat.
1050 - Added a new option “includingDefaultValueFields” to JsonFormat.
1051 - Updated the JSON utility to comply with proto3 JSON specification.
1052
1053 Python (Beta)
1054 * Added proto3 JSON format utility. It includes support for all field types
1055 and a few well-known types except for Any and Struct.
1056 * Added runtime support for Any, Timestamp, Duration and FieldMask.
1057 * [ ] is now accepted for repeated scalar fields in text format parser.
Josh Haberman81e75c12015-12-30 14:03:49 -08001058 * Map fields now have proper O(1) performance for lookup/insert/delete
1059 when using the Python/C++ implementation. They were previously using O(n)
1060 search-based algorithms because the C++ reflection interface didn't
1061 support true map operations.
Feng Xiaod5fb4082015-12-21 14:36:30 -08001062
1063 Objective-C (Beta)
1064 * Various bug-fixes and code tweaks to pass more strict compiler warnings.
1065 * Now has conformance test coverage and is passing all tests.
1066
1067 C# (Beta)
1068 * Various bug-fixes.
1069 * Code generation: Files generated in directories based on namespace.
1070 * Code generation: Include comments from .proto files in XML doc
1071 comments (naively)
1072 * Code generation: Change organization/naming of "reflection class" (access
1073 to file descriptor)
1074 * Code generation and library: Add Parser property to MessageDescriptor,
1075 and introduce a non-generic parser type.
1076 * Library: Added TypeRegistry to support JSON parsing/formatting of Any.
1077 * Library: Added Any.Pack/Unpack support.
1078 * Library: Implemented JSON parsing.
1079
1080 Javascript (Alpha)
1081 * Added proto3 support for JavaScript. The runtime is written in pure
1082 JavaScript and works in browsers and in Node.js. To generate JavaScript
1083 code for your proto, invoke protoc with "--js_out". See js/README.md
1084 for more build instructions.
1085
Feng Xiaocc607532015-08-26 16:31:30 -070010862015-08-26 version 3.0.0-beta-1 (C++/Java/Python/Ruby/Nano/Objective-C/C#)
1087 About Beta
1088 * This is the first beta release of protobuf v3.0.0. Not all languages
1089 have reached beta stage. Languages not marked as beta are still in
1090 alpha (i.e., be prepared for API breaking changes).
1091
1092 General
1093 * Proto3 JSON is supported in several languages (fully supported in C++
1094 and Java, partially supported in Ruby/C#). The JSON spec is defined in
1095 the proto3 language guide:
1096
1097 https://developers.google.com/protocol-buffers/docs/proto3#json
1098
1099 We will publish a more detailed spec to define the exact behavior of
1100 proto3-conformant JSON serializers and parsers. Until then, do not rely
1101 on specific behaviors of the implementation if it’s not documented in
1102 the above spec. More specifically, the behavior is not yet finalized for
1103 the following:
1104 - Parsing invalid JSON input (e.g., input with trailing commas).
1105 - Non-camelCase names in JSON input.
1106 - The same field appears multiple times in JSON input.
1107 - JSON arrays contain “null” values.
1108 - The message has unknown fields.
1109
1110 * Proto3 now enforces strict UTF-8 checking. Parsing will fail if a string
1111 field contains non UTF-8 data.
1112
1113 C++ (Beta)
1114 * Introduced new utility functions/classes in the google/protobuf/util
1115 directory:
1116 - MessageDifferencer: compare two proto messages and report their
1117 differences.
1118 - JsonUtil: support converting protobuf binary format to/from JSON.
1119 - TimeUtil: utility functions to work with well-known types Timestamp
1120 and Duration.
1121 - FieldMaskUtil: utility functions to work with FieldMask.
1122
1123 * Performance optimization of arena construction and destruction.
1124 * Bug fixes for arena and maps support.
1125 * Changed to use cmake for Windows Visual Studio builds.
1126 * Added Bazel support.
1127
1128 Java (Beta)
1129 * Introduced a new util package that will be distributed as a separate
1130 artifact in maven. It contains:
1131 - JsonFormat: convert proto messages to/from JSON.
1132 - TimeUtil: utility functions to work with Timestamp and Duration.
1133 - FieldMaskUtil: utility functions to work with FieldMask.
1134
1135 * The static PARSER in each generated message is deprecated, and it will
1136 be removed in a future release. A static parser() getter is generated
1137 for each message type instead.
1138 * Performance optimizations for String fields serialization.
1139 * Performance optimizations for Lite runtime on Android:
1140 - Reduced allocations
1141 - Reduced method overhead after ProGuarding
1142 - Reduced code size after ProGuarding
1143
1144 Python (Alpha)
1145 * Removed legacy Python 2.5 support.
1146 * Moved to a single Python 2.x/3.x-compatible codebase, instead of using 2to3.
1147 * Fixed build/tests on Python 2.6, 2.7, 3.3, and 3.4.
1148 - Pure-Python works on all four.
1149 - Python/C++ implementation works on all but 3.4, due to changes in the
1150 Python/C++ API in 3.4.
1151 * Some preliminary work has been done to allow for multiple DescriptorPools
1152 with Python/C++.
1153
1154 Ruby (Alpha)
1155 * Many bugfixes:
1156 - fixed parsing/serialization of bytes, sint, sfixed types
1157 - other parser bugfixes
1158 - fixed memory leak affecting Ruby 2.2
1159
1160 JavaNano (Alpha)
1161 * JavaNano generated code now will be put in a nano package by default to
1162 avoid conflicts with Java generated code.
1163
1164 Objective-C (Alpha)
1165 * Added non-null markup to ObjC library. Requires SDK 8.4+ to build.
1166 * Many bugfixes:
1167 - Removed the class/enum filter.
1168 - Renamed some internal types to avoid conflicts with the well-known types
1169 protos.
1170 - Added missing support for parsing repeated primitive fields in packed or
1171 unpacked forms.
1172 - Added *Count for repeated and map<> fields to avoid auto-create when
1173 checking for them being set.
1174
1175 C# (Alpha)
1176 * Namespace changed to Google.Protobuf (and NuGet package will be named
1177 correspondingly).
1178 * Target platforms now .NET 4.5 and selected portable subsets only.
1179 * Removed lite runtime.
1180 * Reimplementation to use mutable message types.
1181 * Null references used to represent "no value" for message type fields.
1182 * Proto3 semantics supported; proto2 files are prohibited for C# codegen.
1183 Most proto3 features supported:
1184 - JSON formatting (a.k.a. serialization to JSON), including well-known
1185 types (except for Any).
1186 - Wrapper types mapped to nullable value types (or string/ByteString
1187 allowing nullability). JSON parsing is not supported yet.
1188 - maps
1189 - oneof
1190 - enum unknown value preservation
1191
Bo Yang8908cf12015-05-26 14:37:47 -070011922015-05-25 version 3.0.0-alpha-3 (Objective-C/C#):
1193 General
1194 * Introduced two new language implementations (Objective-C, C#) to proto3.
Bo Yang3e2c8a52015-05-28 14:52:44 -07001195 * Explicit "optional" keyword are disallowed in proto3 syntax, as fields are
1196 optional by default.
1197 * Group fields are no longer supported in proto3 syntax.
Bo Yang8908cf12015-05-26 14:37:47 -07001198 * Changed repeated primitive fields to use packed serialization by default in
1199 proto3 (implemented for C++, Java, Python in this release). The user can
1200 still disable packed serialization by setting packed to false for now.
1201 * Added well-known type protos (any.proto, empty.proto, timestamp.proto,
1202 duration.proto, etc.). Users can import and use these protos just like
Dongjoon Hyun7b08d492016-01-11 14:52:01 -08001203 regular proto files. Additional runtime support will be added for them in
Bo Yang8908cf12015-05-26 14:37:47 -07001204 future releases (in the form of utility helper functions, or having them
1205 replaced by language specific types in generated code).
1206 * Added a "reserved" keyword in both proto2 and proto3 syntax. User can use
1207 this keyword to declare reserved field numbers and names to prevent them
1208 from being reused by other fields in the same message.
1209
1210 To reserve field numbers, add a reserved declaration in your message:
1211
1212 message TestMessage {
1213 reserved 2, 15, 9 to 11, 3;
1214 }
1215
1216 This reserves field numbers 2, 3, 9, 10, 11 and 15. If a user uses any of
1217 these as field numbers, the protocol buffer compiler will report an error.
1218
1219 Field names can also be reserved:
1220
1221 message TestMessage {
1222 reserved "foo", "bar";
1223 }
1224
1225 * Various bug fixes since 3.0.0-alpha-2
1226
1227 Objective-C
1228 Objective-C includes a code generator and a native objective-c runtime
1229 library. By adding “--objc_out” to protoc, the code generator will generate
1230 a header(*.pbobjc.h) and an implementation file(*.pbobjc.m) for each proto
1231 file.
1232
1233 In this first release, the generated interface provides: enums, messages,
1234 field support(single, repeated, map, oneof), proto2 and proto3 syntax
1235 support, parsing and serialization. It’s compatible with ARC and non-ARC
1236 usage. Besides, user can also access it via the swift bridging header.
1237
1238 See objectivec/README.md for details.
1239
1240 C#
1241 * C# protobufs are based on project
1242 https://github.com/jskeet/protobuf-csharp-port. The original project was
1243 frozen and all the new development will happen here.
1244 * Codegen plugin for C# was completely rewritten to C++ and is now an
Dongjoon Hyun7b08d492016-01-11 14:52:01 -08001245 integral part of protoc.
Bo Yang8908cf12015-05-26 14:37:47 -07001246 * Some refactorings and cleanup has been applied to the C# runtime library.
1247 * Only proto2 is supported in C# at the moment, proto3 support is in
1248 progress and will likely bring significant breaking changes to the API.
1249
1250 See csharp/README.md for details.
1251
1252 C++
1253 * Added runtime support for Any type. To use Any in your proto file, first
1254 import the definition of Any:
1255
1256 // foo.proto
1257 import "google/protobuf/any.proto";
1258 message Foo {
1259 google.protobuf.Any any_field = 1;
1260 }
1261 message Bar {
1262 int32 value = 1;
1263 }
1264
1265 Then in C++ you can access the Any field using PackFrom()/UnpackTo()
1266 methods:
1267
1268 Foo foo;
1269 Bar bar = ...;
1270 foo.mutable_any_field()->PackFrom(bar);
1271 ...
1272 if (foo.any_field().IsType<Bar>()) {
1273 foo.any_field().UnpackTo(&bar);
1274 ...
1275 }
1276 * In text format, entries of a map field will be sorted by key.
1277
1278 Java
1279 * Continued optimizations on the lite runtime to improve performance for
1280 Android.
1281
1282 Python
1283 * Added map support.
1284 - maps now have a dict-like interface (msg.map_field[key] = value)
1285 - existing code that modifies maps via the repeated field interface
1286 will need to be updated.
1287
1288 Ruby
1289 * Improvements to RepeatedField's emulation of the Ruby Array API.
1290 * Various speedups and internal cleanups.
1291
Josh Haberman7d5cf8d2015-02-25 23:47:09 -080012922015-02-26 version 3.0.0-alpha-2 (Python/Ruby/JavaNano):
Jisi Liu32f5d012015-02-20 14:45:45 -08001293 General
Josh Haberman7d5cf8d2015-02-25 23:47:09 -08001294 * Introduced three new language implementations (Ruby, JavaNano, and
1295 Python) to proto3.
Jisi Liu32f5d012015-02-20 14:45:45 -08001296 * Various bug fixes since 3.0.0-alpha-1
1297
Josh Haberman31e8c202015-02-25 23:06:35 -08001298 Python:
1299 Python has received several updates, most notably support for proto3
1300 semantics in any .proto file that declares syntax="proto3".
1301 Messages declared in proto3 files no longer represent field presence
1302 for scalar fields (number, enums, booleans, or strings). You can
1303 no longer call HasField() for such fields, and they are serialized
1304 based on whether they have a non-zero/empty/false value.
1305
1306 One other notable change is in the C++-accelerated implementation.
1307 Descriptor objects (which describe the protobuf schema and allow
1308 reflection over it) are no longer duplicated between the Python
1309 and C++ layers. The Python descriptors are now simple wrappers
1310 around the C++ descriptors. This change should significantly
1311 reduce the memory usage of programs that use a lot of message
1312 types.
1313
Jisi Liu32f5d012015-02-20 14:45:45 -08001314 Ruby:
Chris Fallin1d4f3212015-02-20 17:32:06 -08001315 We have added proto3 support for Ruby via a native C extension.
1316
1317 The Ruby extension itself is included in the ruby/ directory, and details on
1318 building and installing the extension are in ruby/README.md. The extension
1319 will also be published as a Ruby gem. Code generator support is included as
1320 part of `protoc` with the `--ruby_out` flag.
1321
1322 The Ruby extension implements a user-friendly DSL to define message types
1323 (also generated by the code generator from `.proto` files). Once a message
1324 type is defined, the user may create instances of the message that behave in
1325 ways idiomatic to Ruby. For example:
1326
1327 - Message fields are present as ordinary Ruby properties (getter method
1328 `foo` and setter method `foo=`).
1329 - Repeated field elements are stored in a container that acts like a native
1330 Ruby array, and map elements are stored in a container that acts like a
1331 native Ruby hashmap.
1332 - The usual well-known methods, such as `#to_s`, `#dup`, and the like, are
1333 present.
1334
1335 Unlike several existing third-party Ruby extensions for protobuf, this
1336 extension is built on a "strongly-typed" philosophy: message fields and
1337 array/map containers will throw exceptions eagerly when values of the
1338 incorrect type are inserted.
1339
1340 See ruby/README.md for details.
Jisi Liu32f5d012015-02-20 14:45:45 -08001341
1342 JavaNano:
1343 JavaNano is a special code generator and runtime library designed especially
1344 for resource-restricted systems, like Android. It is very resource-friendly
1345 in both the amount of code and the runtime overhead. Here is an an overview
1346 of JavaNano features compared with the official Java protobuf:
1347
1348 - No descriptors or message builders.
1349 - All messages are mutable; fields are public Java fields.
1350 - For optional fields only, encapsulation behind setter/getter/hazzer/
1351 clearer functions is opt-in, which provide proper 'has' state support.
1352 - For proto2, if not opted in, has state (field presence) is not available.
1353 Serialization outputs all fields not equal to their defaults.
1354 The behavior is consistent with proto3 semantics.
1355 - Required fields (proto2 only) are always serialized.
1356 - Enum constants are integers; protection against invalid values only
1357 when parsing from the wire.
1358 - Enum constants can be generated into container interfaces bearing
1359 the enum's name (so the referencing code is in Java style).
1360 - CodedInputByteBufferNano can only take byte[] (not InputStream).
1361 - Similarly CodedOutputByteBufferNano can only write to byte[].
1362 - Repeated fields are in arrays, not ArrayList or Vector. Null array
1363 elements are allowed and silently ignored.
1364 - Full support for serializing/deserializing repeated packed fields.
1365 - Support extensions (in proto2).
1366 - Unset messages/groups are null, not an immutable empty default
1367 instance.
1368 - toByteArray(...) and mergeFrom(...) are now static functions of
1369 MessageNano.
1370 - The 'bytes' type translates to the Java type byte[].
1371
1372 See javanano/README.txt for details.
1373
Feng Xiao9104da32014-12-09 11:57:52 -080013742014-12-01 version 3.0.0-alpha-1 (C++/Java):
1375
1376 General
1377 * Introduced Protocol Buffers language version 3 (aka proto3).
1378
1379 When protobuf was initially opensourced it implemented Protocol Buffers
1380 language version 2 (aka proto2), which is why the version number
1381 started from v2.0.0. From v3.0.0, a new language version (proto3) is
1382 introduced while the old version (proto2) will continue to be supported.
1383
1384 The main intent of introducing proto3 is to clean up protobuf before
1385 pushing the language as the foundation of Google's new API platform.
1386 In proto3, the language is simplified, both for ease of use and to
1387 make it available in a wider range of programming languages. At the
1388 same time a few features are added to better support common idioms
1389 found in APIs.
1390
1391 The following are the main new features in language version 3:
1392
1393 1. Removal of field presence logic for primitive value fields, removal
1394 of required fields, and removal of default values. This makes proto3
1395 significantly easier to implement with open struct representations,
1396 as in languages like Android Java, Objective C, or Go.
1397 2. Removal of unknown fields.
1398 3. Removal of extensions, which are instead replaced by a new standard
1399 type called Any.
1400 4. Fix semantics for unknown enum values.
1401 5. Addition of maps.
1402 6. Addition of a small set of standard types for representation of time,
1403 dynamic data, etc.
1404 7. A well-defined encoding in JSON as an alternative to binary proto
1405 encoding.
1406
1407 This release (v3.0.0-alpha-1) includes partial proto3 support for C++ and
1408 Java. Items 6 (well-known types) and 7 (JSON format) in the above feature
Dongjoon Hyun7b08d492016-01-11 14:52:01 -08001409 list are not implemented.
Feng Xiao9104da32014-12-09 11:57:52 -08001410
1411 A new notion "syntax" is introduced to specify whether a .proto file
1412 uses proto2 or proto3:
1413
1414 // foo.proto
1415 syntax = "proto3";
1416 message Bar {...}
1417
1418 If omitted, the protocol compiler will generate a warning and "proto2" will
1419 be used as the default. This warning will be turned into an error in a
1420 future release.
1421
1422 We recommend that new Protocol Buffers users use proto3. However, we do not
1423 generally recommend that existing users migrate from proto2 from proto3 due
1424 to API incompatibility, and we will continue to support proto2 for a long
1425 time.
1426
1427 * Added support for map fields (implemented in C++/Java for both proto2 and
1428 proto3).
1429
1430 Map fields can be declared using the following syntax:
1431
1432 message Foo {
1433 map<string, string> values = 1;
1434 }
1435
1436 Data of a map field will be stored in memory as an unordered map and it
1437 can be accessed through generated accessors.
1438
1439 C++
1440 * Added arena allocation support (for both proto2 and proto3).
1441
1442 Profiling shows memory allocation and deallocation constitutes a significant
1443 fraction of CPU-time spent in protobuf code and arena allocation is a
1444 technique introduced to reduce this cost. With arena allocation, new
1445 objects will be allocated from a large piece of preallocated memory and
1446 deallocation of these objects is almost free. Early adoption shows 20% to
1447 50% improvement in some Google binaries.
1448
1449 To enable arena support, add the following option to your .proto file:
1450
1451 option cc_enable_arenas = true;
1452
1453 Protocol compiler will generate additional code to make the generated
1454 message classes work with arenas. This does not change the existing API
1455 of protobuf messages and does not affect wire format. Your existing code
1456 should continue to work after adding this option. In the future we will
1457 make this option enabled by default.
1458
1459 To actually take advantage of arena allocation, you need to use the arena
1460 APIs when creating messages. A quick example of using the arena API:
1461
1462 {
1463 google::protobuf::Arena arena;
1464 // Allocate a protobuf message in the arena.
1465 MyMessage* message = Arena::CreateMessage<MyMessage>(&arena);
1466 // All submessages will be allocated in the same arena.
1467 if (!message->ParseFromString(data)) {
1468 // Deal with malformed input data.
1469 }
1470 // Must not delete the message here. It will be deleted automatically
1471 // when the arena is destroyed.
1472 }
1473
1474 Currently arena does not work with map fields. Enabling arena in a .proto
1475 file containing map fields will result in compile errors in the generated
1476 code. This will be addressed in a future release.
1477
Feng Xiaobba83652014-10-20 17:06:06 -070014782014-10-20 version 2.6.1:
Feng Xiao57b86722014-10-09 11:20:08 -07001479
1480 C++
1481 * Added atomicops support for Solaris.
1482 * Released memory allocated by InitializeDefaultRepeatedFields() and
1483 GetEmptyString(). Some memory sanitizers reported them as memory leaks.
1484
1485 Java
1486 * Updated DynamicMessage.setField() to handle repeated enum values
1487 correctly.
1488 * Fixed a bug that caused NullPointerException to be thrown when
1489 converting manually constructed FileDescriptorProto to
1490 FileDescriptor.
1491
1492 Python
Feng Xiao419c94b2014-10-09 11:40:02 -07001493 * Fixed WhichOneof() to work with de-serialized protobuf messages.
Feng Xiao57b86722014-10-09 11:20:08 -07001494 * Fixed a missing file problem of Python C++ implementation.
1495
jieluo@google.com1eba9d92014-08-25 20:17:53 +000014962014-08-15 version 2.6.0:
1497
1498 General
1499 * Added oneofs(unions) feature. Fields in the same oneof will share
1500 memory and at most one field can be set at the same time. Use the
1501 oneof keyword to define a oneof like:
1502 message SampleMessage {
1503 oneof test_oneof {
1504 string name = 4;
1505 YourMessage sub_message = 9;
1506 }
1507 }
1508 * Files, services, enums, messages, methods and enum values can be marked
1509 as deprecated now.
Dongjoon Hyun7b08d492016-01-11 14:52:01 -08001510 * Added Support for list values, including lists of messages, when
jieluo@google.com1eba9d92014-08-25 20:17:53 +00001511 parsing text-formatted protos in C++ and Java.
1512 For example: foo: [1, 2, 3]
1513
1514 C++
1515 * Enhanced customization on TestFormat printing.
1516 * Added SwapFields() in reflection API to swap a subset of fields.
1517 Added SetAllocatedMessage() in reflection API.
1518 * Repeated primitive extensions are now packable. The
1519 [packed=true] option only affects serializers. Therefore, it is
1520 possible to switch a repeated extension field to packed format
1521 without breaking backwards-compatibility.
1522 * Various speed optimizations.
1523
1524 Java
1525 * writeTo() method in ByteString can now write a substring to an
1526 output stream. Added endWith() method for ByteString.
1527 * ByteString and ByteBuffer are now supported in CodedInputStream
1528 and CodedOutputStream.
1529 * java_generate_equals_and_hash can now be used with the LITE_RUNTIME.
1530
1531 Python
1532 * A new C++-backed extension module (aka "cpp api v2") that replaces the
1533 old ("cpp api v1") one. Much faster than the pure Python code. This one
1534 resolves many bugs and is recommended for general use over the
1535 pure Python when possible.
1536 * Descriptors now have enum_types_by_name and extension_types_by_name dict
1537 attributes.
1538 * Support for Python 3.
1539
xiaofeng@google.com2c9392f2013-02-28 06:12:28 +000015402013-02-27 version 2.5.0:
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001541
1542 General
1543 * New notion "import public" that allows a proto file to forward the content
1544 it imports to its importers. For example,
1545 // foo.proto
1546 import public "bar.proto";
1547 import "baz.proto";
1548
1549 // qux.proto
1550 import "foo.proto";
1551 // Stuff defined in bar.proto may be used in this file, but stuff from
1552 // baz.proto may NOT be used without importing it explicitly.
1553 This is useful for moving proto files. To move a proto file, just leave
1554 a single "import public" in the old proto file.
1555 * New enum option "allow_alias" that specifies whether different symbols can
1556 be assigned the same numeric value. Default value is "true". Setting it to
1557 false causes the compiler to reject enum definitions where multiple symbols
1558 have the same numeric value.
xiaofeng@google.com7f4c9e82013-03-05 01:51:21 +00001559 Note: We plan to flip the default value to "false" in a future release.
1560 Projects using enum aliases should set the option to "true" in their .proto
1561 files.
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001562
1563 C++
1564 * New generated method set_allocated_foo(Type* foo) for message and string
1565 fields. This method allows you to set the field to a pre-allocated object
1566 and the containing message takes the ownership of that object.
1567 * Added SetAllocatedExtension() and ReleaseExtension() to extensions API.
1568 * Custom options are now formatted correctly when descriptors are printed in
1569 text format.
1570 * Various speed optimizations.
1571
1572 Java
1573 * Comments in proto files are now collected and put into generated code as
1574 comments for corresponding classes and data members.
1575 * Added Parser to parse directly into messages without a Builder. For
1576 example,
xiaofeng@google.com2c9392f2013-02-28 06:12:28 +00001577 Foo foo = Foo.PARSER.ParseFrom(input);
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001578 Using Parser is ~25% faster than using Builder to parse messages.
1579 * Added getters/setters to access the underlying ByteString of a string field
1580 directly.
1581 * ByteString now supports more operations: substring(), prepend(), and
1582 append(). The implementation of ByteString uses a binary tree structure
1583 to support these operations efficiently.
1584 * New method findInitializationErrors() that lists all missing required
1585 fields.
1586 * Various code size and speed optimizations.
1587
1588 Python
1589 * Added support for dynamic message creation. DescriptorDatabase,
Dongjoon Hyun7b08d492016-01-11 14:52:01 -08001590 DescriptorPool, and MessageFactory work like their C++ counterparts to
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001591 simplify Descriptor construction from *DescriptorProtos, and MessageFactory
1592 provides a message instance from a Descriptor.
1593 * Added pickle support for protobuf messages.
1594 * Unknown fields are now preserved after parsing.
1595 * Fixed bug where custom options were not correctly populated. Custom
1596 options can be accessed now.
1597 * Added EnumTypeWrapper that provides better accessibility to enum types.
1598 * Added ParseMessage(descriptor, bytes) to generate a new Message instance
1599 from a descriptor and a byte string.
1600
liujisi@google.com5d996322011-04-30 15:29:09 +000016012011-05-01 version 2.4.1:
1602
1603 C++
Dongjoon Hyun7b08d492016-01-11 14:52:01 -08001604 * Fixed the friendship problem for old compilers to make the library now gcc 3
liujisi@google.com5d996322011-04-30 15:29:09 +00001605 compatible again.
1606 * Fixed vcprojects/extract_includes.bat to extract compiler/plugin.h.
1607
1608 Java
1609 * Removed usages of JDK 1.6 only features to make the library now JDK 1.5
1610 compatible again.
1611 * Fixed a bug about negative enum values.
1612 * serialVersionUID is now defined in generated messages for java serializing.
1613 * Fixed protoc to use java.lang.Object, which makes "Object" now a valid
1614 message name again.
1615
1616 Python
1617 * Experimental C++ implementation now requires C++ protobuf library installed.
1618 See the README.txt in the python directory for details.
1619
liujisi@google.com7a261472011-02-02 14:04:22 +000016202011-02-02 version 2.4.0:
liujisi@google.com33165fe2010-11-02 13:14:58 +00001621
1622 General
1623 * The RPC (cc|java|py)_generic_services default value is now false instead of
1624 true.
1625 * Custom options can have aggregate types. For example,
1626 message MyOption {
1627 optional string comment = 1;
1628 optional string author = 2;
1629 }
1630 extend google.protobuf.FieldOptions {
1631 optional MyOption myoption = 12345;
1632 }
1633 This option can now be set as follows:
1634 message SomeType {
1635 optional int32 field = 1 [(myoption) = { comment:'x' author:'y' }];
1636 }
1637
1638 C++
1639 * Various speed and code size optimizations.
1640 * Added a release_foo() method on string and message fields.
1641 * Fixed gzip_output_stream sub-stream handling.
1642
1643 Java
1644 * Builders now maintain sub-builders for sub-messages. Use getFooBuilder() to
1645 get the builder for the sub-message "foo". This allows you to repeatedly
1646 modify deeply-nested sub-messages without rebuilding them.
1647 * Builder.build() no longer invalidates the Builder for generated messages
1648 (You may continue to modify it and then build another message).
1649 * Code generator will generate efficient equals() and hashCode()
1650 implementations if new option java_generate_equals_and_hash is enabled.
1651 (Otherwise, reflection-based implementations are used.)
1652 * Generated messages now implement Serializable.
1653 * Fields with [deprecated=true] will be marked with @Deprecated in Java.
1654 * Added lazy conversion of UTF-8 encoded strings to String objects to improve
1655 performance.
1656 * Various optimizations.
1657 * Enum value can be accessed directly, instead of calling getNumber() on the
1658 enum member.
1659 * For each enum value, an integer constant is also generated with the suffix
1660 _VALUE.
1661
1662 Python
1663 * Added an experimental C++ implementation for Python messages via a Python
1664 extension. Implementation type is controlled by an environment variable
1665 PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION (valid values: "cpp" and "python")
1666 The default value is currently "python" but will be changed to "cpp" in
1667 future release.
1668 * Improved performance on message instantiation significantly.
1669 Most of the work on message instantiation is done just once per message
1670 class, instead of once per message instance.
1671 * Improved performance on text message parsing.
1672 * Allow add() to forward keyword arguments to the concrete class.
1673 E.g. instead of
1674 item = repeated_field.add()
1675 item.foo = bar
1676 item.baz = quux
1677 You can do:
1678 repeated_field.add(foo=bar, baz=quux)
1679 * Added a sort() interface to the BaseContainer.
1680 * Added an extend() method to repeated composite fields.
1681 * Added UTF8 debug string support.
1682
temporald4e38c72010-01-09 07:35:50 +000016832010-01-08 version 2.3.0:
kenton@google.comfccb1462009-12-18 02:11:36 +00001684
1685 General
1686 * Parsers for repeated numeric fields now always accept both packed and
1687 unpacked input. The [packed=true] option only affects serializers.
1688 Therefore, it is possible to switch a field to packed format without
1689 breaking backwards-compatibility -- as long as all parties are using
1690 protobuf 2.3.0 or above, at least.
1691 * The generic RPC service code generated by the C++, Java, and Python
1692 generators can be disabled via file options:
1693 option cc_generic_services = false;
1694 option java_generic_services = false;
1695 option py_generic_services = false;
1696 This allows plugins to generate alternative code, possibly specific to some
1697 particular RPC implementation.
1698
1699 protoc
1700 * Now supports a plugin system for code generators. Plugins can generate
1701 code for new languages or inject additional code into the output of other
1702 code generators. Plugins are just binaries which accept a protocol buffer
1703 on stdin and write a protocol buffer to stdout, so they may be written in
1704 any language. See src/google/protobuf/compiler/plugin.proto.
kenton@google.com7f4938b2009-12-22 22:57:39 +00001705 **WARNING**: Plugins are experimental. The interface may change in a
1706 future version.
kenton@google.com0225b352010-01-04 22:07:09 +00001707 * If the output location ends in .zip or .jar, protoc will write its output
1708 to a zip/jar archive instead of a directory. For example:
1709 protoc --java_out=myproto_srcs.jar --python_out=myproto.zip myproto.proto
1710 Currently the archive contents are not compressed, though this could change
1711 in the future.
kenton@google.comfccb1462009-12-18 02:11:36 +00001712 * inf, -inf, and nan can now be used as default values for float and double
1713 fields.
1714
1715 C++
1716 * Various speed and code size optimizations.
1717 * DynamicMessageFactory is now fully thread-safe.
1718 * Message::Utf8DebugString() method is like DebugString() but avoids escaping
1719 UTF-8 bytes.
1720 * Compiled-in message types can now contain dynamic extensions, through use
1721 of CodedInputStream::SetExtensionRegistry().
kenton@google.comc0ee4d22009-12-22 02:05:33 +00001722 * Now compiles shared libraries (DLLs) by default on Cygwin and MinGW, to
1723 match other platforms. Use --disable-shared to avoid this.
kenton@google.comfccb1462009-12-18 02:11:36 +00001724
1725 Java
1726 * parseDelimitedFrom() and mergeDelimitedFrom() now detect EOF and return
1727 false/null instead of throwing an exception.
1728 * Fixed some initialization ordering bugs.
1729 * Fixes for OpenJDK 7.
1730
1731 Python
1732 * 10-25 times faster than 2.2.0, still pure-Python.
1733 * Calling a mutating method on a sub-message always instantiates the message
1734 in its parent even if the mutating method doesn't actually mutate anything
1735 (e.g. parsing from an empty string).
1736 * Expanded descriptors a bit.
1737
kenton@google.com201b9be2009-08-12 00:23:05 +000017382009-08-11 version 2.2.0:
kenton@google.comceb561d2009-06-25 19:05:36 +00001739
1740 C++
kenton@google.com80b1d622009-07-29 01:13:20 +00001741 * Lite mode: The "optimize_for = LITE_RUNTIME" option causes the compiler
1742 to generate code which only depends libprotobuf-lite, which is much smaller
1743 than libprotobuf but lacks descriptors, reflection, and some other features.
kenton@google.comceb561d2009-06-25 19:05:36 +00001744 * Fixed bug where Message.Swap(Message) was only implemented for
1745 optimize_for_speed. Swap now properly implemented in both modes
1746 (Issue 91).
1747 * Added RemoveLast and SwapElements(index1, index2) to Reflection
1748 interface for repeated elements.
1749 * Added Swap(Message) to Reflection interface.
kenton@google.comd2fd0632009-07-24 01:00:35 +00001750 * Floating-point literals in generated code that are intended to be
1751 single-precision now explicitly have 'f' suffix to avoid pedantic warnings
1752 produced by some compilers.
kenton@google.com80b1d622009-07-29 01:13:20 +00001753 * The [deprecated=true] option now causes the C++ code generator to generate
1754 a GCC-style deprecation annotation (no-op on other compilers).
1755 * google::protobuf::GetEnumDescriptor<SomeGeneratedEnumType>() returns the
1756 EnumDescriptor for that type -- useful for templates which cannot call
1757 SomeGeneratedEnumType_descriptor().
1758 * Various optimizations and obscure bug fixes.
1759
1760 Java
1761 * Lite mode: The "optimize_for = LITE_RUNTIME" option causes the compiler
1762 to generate code which only depends libprotobuf-lite, which is much smaller
1763 than libprotobuf but lacks descriptors, reflection, and some other features.
kenton@google.com80b1d622009-07-29 01:13:20 +00001764 * Lots of style cleanups.
1765
1766 Python
1767 * Fixed endianness bug with floats and doubles.
1768 * Text format parsing support.
1769 * Fix bug with parsing packed repeated fields in embedded messages.
1770 * Ability to initialize fields by passing keyword args to constructor.
1771 * Support iterators in extend and __setslice__ for containers.
kenton@google.comceb561d2009-06-25 19:05:36 +00001772
kenton@google.com1fb3d392009-05-13 23:20:03 +000017732009-05-13 version 2.1.0:
kenton@google.com2d6daa72009-01-22 01:27:00 +00001774
1775 General
1776 * Repeated fields of primitive types (types other that string, group, and
1777 nested messages) may now use the option [packed = true] to get a more
1778 efficient encoding. In the new encoding, the entire list is written
1779 as a single byte blob using the "length-delimited" wire type. Within
1780 this blob, the individual values are encoded the same way they would
1781 be normally except without a tag before each value (thus, they are
1782 tightly "packed").
kenton@google.comcfa2d8a2009-04-18 00:02:12 +00001783 * For each field, the generated code contains an integer constant assigned
1784 to the field number. For example, the .proto file:
1785 message Foo { optional int bar_baz = 123; }
1786 would generate the following constants, all with the integer value 123:
1787 C++: Foo::kBarBazFieldNumber
1788 Java: Foo.BAR_BAZ_FIELD_NUMBER
1789 Python: Foo.BAR_BAZ_FIELD_NUMBER
1790 Constants are also generated for extensions, with the same naming scheme.
1791 These constants may be used as switch cases.
kenton@google.com37ad00d2009-04-21 21:00:39 +00001792 * Updated bundled Google Test to version 1.3.0. Google Test is now bundled
1793 in its verbatim form as a nested autoconf package, so you can drop in any
1794 other version of Google Test if needed.
kenton@google.comd37d46d2009-04-25 02:53:47 +00001795 * optimize_for = SPEED is now the default, by popular demand. Use
1796 optimize_for = CODE_SIZE if code size is more important in your app.
1797 * It is now an error to define a default value for a repeated field.
1798 Previously, this was silently ignored (it had no effect on the generated
1799 code).
1800 * Fields can now be marked deprecated like:
1801 optional int32 foo = 1 [deprecated = true];
1802 Currently this does not have any actual effect, but in the future the code
1803 generators may generate deprecation annotations in each language.
kenton@google.com9824eda2009-05-06 17:49:37 +00001804 * Cross-compiling should now be possible using the --with-protoc option to
1805 configure. See README.txt for more info.
kenton@google.com2d6daa72009-01-22 01:27:00 +00001806
kenton@google.comf663b162009-04-15 19:50:54 +00001807 protoc
1808 * --error_format=msvs option causes errors to be printed in Visual Studio
1809 format, which should allow them to be clicked on in the build log to go
kenton@google.comd37d46d2009-04-25 02:53:47 +00001810 directly to the error location.
1811 * The type name resolver will no longer resolve type names to fields. For
1812 example, this now works:
1813 message Foo {}
1814 message Bar {
1815 optional int32 Foo = 1;
1816 optional Foo baz = 2;
1817 }
1818 Previously, the type of "baz" would resolve to "Bar.Foo", and you'd get
1819 an error because Bar.Foo is a field, not a type. Now the type of "baz"
1820 resolves to the message type Foo. This change is unlikely to make a
1821 difference to anyone who follows the Protocol Buffers style guide.
kenton@google.comf663b162009-04-15 19:50:54 +00001822
kenton@google.com2d6daa72009-01-22 01:27:00 +00001823 C++
kenton@google.comd37d46d2009-04-25 02:53:47 +00001824 * Several optimizations, including but not limited to:
1825 - Serialization, especially to flat arrays, is 10%-50% faster, possibly
1826 more for small objects.
1827 - Several descriptor operations which previously required locking no longer
1828 do.
1829 - Descriptors are now constructed lazily on first use, rather than at
1830 process startup time. This should save memory in programs which do not
1831 use descriptors or reflection.
1832 - UnknownFieldSet completely redesigned to be more efficient (especially in
1833 terms of memory usage).
1834 - Various optimizations to reduce code size (though the serialization speed
1835 optimizations increased code size).
kenton@google.com2d6daa72009-01-22 01:27:00 +00001836 * Message interface has method ParseFromBoundedZeroCopyStream() which parses
1837 a limited number of bytes from an input stream rather than parsing until
1838 EOF.
kenton@google.come59427a2009-04-16 22:30:56 +00001839 * GzipInputStream and GzipOutputStream support reading/writing gzip- or
1840 zlib-compressed streams if zlib is available.
1841 (google/protobuf/io/gzip_stream.h)
kenton@google.comd37d46d2009-04-25 02:53:47 +00001842 * DescriptorPool::FindAllExtensions() and corresponding
1843 DescriptorDatabase::FindAllExtensions() can be used to enumerate all
1844 extensions of a given type.
1845 * For each enum type Foo, protoc will generate functions:
1846 const string& Foo_Name(Foo value);
1847 bool Foo_Parse(const string& name, Foo* result);
1848 The former returns the name of the enum constant corresponding to the given
1849 value while the latter finds the value corresponding to a name.
1850 * RepeatedField and RepeatedPtrField now have back-insertion iterators.
1851 * String fields now have setters that take a char* and a size, in addition
1852 to the existing ones that took char* or const string&.
1853 * DescriptorPool::AllowUnknownDependencies() may be used to tell
1854 DescriptorPool to create placeholder descriptors for unknown entities
1855 referenced in a FileDescriptorProto. This can allow you to parse a .proto
1856 file without having access to other .proto files that it imports, for
1857 example.
1858 * Updated gtest to latest version. The gtest package is now included as a
1859 nested autoconf package, so it should be able to drop new versions into the
1860 "gtest" subdirectory without modification.
kenton@google.com2d6daa72009-01-22 01:27:00 +00001861
1862 Java
1863 * Fixed bug where Message.mergeFrom(Message) failed to merge extensions.
1864 * Message interface has new method toBuilder() which is equivalent to
1865 newBuilderForType().mergeFrom(this).
1866 * All enums now implement the ProtocolMessageEnum interface.
1867 * Setting a field to null now throws NullPointerException.
1868 * Fixed tendency for TextFormat's parsing to overflow the stack when
1869 parsing large string values. The underlying problem is with Java's
1870 regex implementation (which unfortunately uses recursive backtracking
Dongjoon Hyun7b08d492016-01-11 14:52:01 -08001871 rather than building an NFA). Worked around by making use of possessive
kenton@google.com2d6daa72009-01-22 01:27:00 +00001872 quantifiers.
kenton@google.comd37d46d2009-04-25 02:53:47 +00001873 * Generated service classes now also generate pure interfaces. For a service
1874 Foo, Foo.Interface is a pure interface containing all of the service's
1875 defined methods. Foo.newReflectiveService() can be called to wrap an
1876 instance of this interface in a class that implements the generic
1877 RpcService interface, which provides reflection support that is usually
1878 needed by RPC server implementations.
1879 * RPC interfaces now support blocking operation in addition to non-blocking.
1880 The protocol compiler generates separate blocking and non-blocking stubs
1881 which operate against separate blocking and non-blocking RPC interfaces.
1882 RPC implementations will have to implement the new interfaces in order to
1883 support blocking mode.
1884 * New I/O methods parseDelimitedFrom(), mergeDelimitedFrom(), and
Dongjoon Hyun7b08d492016-01-11 14:52:01 -08001885 writeDelimitedTo() read and write "delimited" messages from/to a stream,
kenton@google.comd37d46d2009-04-25 02:53:47 +00001886 meaning that the message size precedes the data. This way, you can write
1887 multiple messages to a stream without having to worry about delimiting
1888 them yourself.
1889 * Throw a more descriptive exception when build() is double-called.
1890 * Add a method to query whether CodedInputStream is at the end of the input
1891 stream.
1892 * Add a method to reset a CodedInputStream's size counter; useful when
1893 reading many messages with the same stream.
1894 * equals() and hashCode() now account for unknown fields.
pesho.petrov87e64e12008-12-24 01:07:22 +00001895
1896 Python
1897 * Added slicing support for repeated scalar fields. Added slice retrieval and
1898 removal of repeated composite fields.
kenton@google.com2d6daa72009-01-22 01:27:00 +00001899 * Updated RPC interfaces to allow for blocking operation. A client may
1900 now pass None for a callback when making an RPC, in which case the
1901 call will block until the response is received, and the response
1902 object will be returned directly to the caller. This interface change
1903 cannot be used in practice until RPC implementations are updated to
1904 implement it.
kenton@google.comd37d46d2009-04-25 02:53:47 +00001905 * Changes to input_stream.py should make protobuf compatible with appengine.
pesho.petrov87e64e12008-12-24 01:07:22 +00001906
kenton@google.com9f175282008-11-25 19:37:10 +000019072008-11-25 version 2.0.3:
1908
1909 protoc
1910 * Enum values may now have custom options, using syntax similar to field
1911 options.
1912 * Fixed bug where .proto files which use custom options but don't actually
1913 define them (i.e. they import another .proto file defining the options)
1914 had to explicitly import descriptor.proto.
1915 * Adjacent string literals in .proto files will now be concatenated, like in
1916 C.
kenton@google.com2f669cb2008-12-02 05:59:15 +00001917 * If an input file is a Windows absolute path (e.g. "C:\foo\bar.proto") and
1918 the import path only contains "." (or contains "." but does not contain
1919 the file), protoc incorrectly thought that the file was under ".", because
1920 it thought that the path was relative (since it didn't start with a slash).
1921 This has been fixed.
kenton@google.com9f175282008-11-25 19:37:10 +00001922
1923 C++
1924 * Generated message classes now have a Swap() method which efficiently swaps
1925 the contents of two objects.
1926 * All message classes now have a SpaceUsed() method which returns an estimate
1927 of the number of bytes of allocated memory currently owned by the object.
1928 This is particularly useful when you are reusing a single message object
1929 to improve performance but want to make sure it doesn't bloat up too large.
1930 * New method Message::SerializeAsString() returns a string containing the
1931 serialized data. May be more convenient than calling
1932 SerializeToString(string*).
1933 * In debug mode, log error messages when string-type fields are found to
1934 contain bytes that are not valid UTF-8.
1935 * Fixed bug where a message with multiple extension ranges couldn't parse
1936 extensions.
1937 * Fixed bug where MergeFrom(const Message&) didn't do anything if invoked on
1938 a message that contained no fields (but possibly contained extensions).
1939 * Fixed ShortDebugString() to not be O(n^2). Durr.
1940 * Fixed crash in TextFormat parsing if the first token in the input caused a
1941 tokenization error.
1942 * Fixed obscure bugs in zero_copy_stream_impl.cc.
1943 * Added support for HP C++ on Tru64.
1944 * Only build tests on "make check", not "make".
1945 * Fixed alignment issue that caused crashes when using DynamicMessage on
1946 64-bit Sparc machines.
1947 * Simplify template usage to work with MSVC 2003.
1948 * Work around GCC 4.3.x x86_64 compiler bug that caused crashes on startup.
1949 (This affected Fedora 9 in particular.)
kenton@google.com25bc5cd2008-12-04 20:34:50 +00001950 * Now works on "Solaris 10 using recent Sun Studio".
kenton@google.com9f175282008-11-25 19:37:10 +00001951
1952 Java
1953 * New overload of mergeFrom() which parses a slice of a byte array instead
1954 of the whole thing.
1955 * New method ByteString.asReadOnlyByteBuffer() does what it sounds like.
1956 * Improved performance of isInitialized() when optimizing for code size.
1957
1958 Python
1959 * Corrected ListFields() signature in Message base class to match what
1960 subclasses actually implement.
1961 * Some minor refactoring.
kenton@google.com2f669cb2008-12-02 05:59:15 +00001962 * Don't pass self as first argument to superclass constructor (no longer
1963 allowed in Python 2.6).
kenton@google.com9f175282008-11-25 19:37:10 +00001964
kenton@google.com9b10f582008-09-30 00:09:40 +000019652008-09-29 version 2.0.2:
1966
kenton@google.com24bf56f2008-09-24 20:31:01 +00001967 General
Sebastian Schuberth902af082017-02-28 09:58:24 +01001968 * License changed from Apache 2.0 to 3-Clause BSD.
kenton@google.com24bf56f2008-09-24 20:31:01 +00001969 * It is now possible to define custom "options", which are basically
1970 annotations which may be placed on definitions in a .proto file.
1971 For example, you might define a field option called "foo" like so:
1972 import "google/protobuf/descriptor.proto"
1973 extend google.protobuf.FieldOptions {
1974 optional string foo = 12345;
1975 }
1976 Then you annotate a field using the "foo" option:
1977 message MyMessage {
1978 optional int32 some_field = 1 [(foo) = "bar"]
1979 }
1980 The value of this option is then visible via the message's
1981 Descriptor:
1982 const FieldDescriptor* field =
1983 MyMessage::descriptor()->FindFieldByName("some_field");
1984 assert(field->options().GetExtension(foo) == "bar");
1985 This feature has been implemented and tested in C++ and Java.
1986 Other languages may or may not need to do extra work to support
1987 custom options, depending on how they construct descriptors.
1988
1989 C++
1990 * Fixed some GCC warnings that only occur when using -pedantic.
1991 * Improved static initialization code, making ordering more
1992 predictable among other things.
1993 * TextFormat will no longer accept messages which contain multiple
1994 instances of a singular field. Previously, the latter instance
kenton@google.com9b10f582008-09-30 00:09:40 +00001995 would overwrite the former.
kenton@google.com24bf56f2008-09-24 20:31:01 +00001996 * Now works on systems that don't have hash_map.
1997
kenton@google.com9b10f582008-09-30 00:09:40 +00001998 Java
1999 * Print @Override annotation in generated code where appropriate.
2000
kenton@google.com24bf56f2008-09-24 20:31:01 +00002001 Python
2002 * Strings now use the "unicode" type rather than the "str" type.
2003 String fields may still be assigned ASCII "str" values; they will
2004 automatically be converted.
2005 * Adding a property to an object representing a repeated field now
2006 raises an exception. For example:
2007 # No longer works (and never should have).
2008 message.some_repeated_field.foo = 1
kenton@google.com9b10f582008-09-30 00:09:40 +00002009
2010 Windows
2011 * We now build static libraries rather than DLLs by default on MSVC.
2012 See vsprojects/readme.txt for more information.
2013
temporala44f3c32008-08-15 18:32:02 +000020142008-08-15 version 2.0.1:
kenton@google.com9b10f582008-09-30 00:09:40 +00002015
2016 protoc
2017 * New flags --encode and --decode can be used to convert between protobuf text
2018 format and binary format from the command-line.
2019 * New flag --descriptor_set_out can be used to write FileDescriptorProtos for
2020 all parsed files directly into a single output file. This is particularly
2021 useful if you wish to parse .proto files from programs written in languages
2022 other than C++: just run protoc as a background process and have it output
2023 a FileDescriptorList, then parse that natively.
2024 * Improved error message when an enum value's name conflicts with another
2025 symbol defined in the enum type's scope, e.g. if two enum types declared
2026 in the same scope have values with the same name. This is disallowed for
temporala44f3c32008-08-15 18:32:02 +00002027 compatibility with C++, but this wasn't clear from the error.
kenton@google.com9b10f582008-09-30 00:09:40 +00002028 * Fixed absolute output paths on Windows.
temporala44f3c32008-08-15 18:32:02 +00002029 * Allow trailing slashes in --proto_path mappings.
kenton@google.com9b10f582008-09-30 00:09:40 +00002030
2031 C++
2032 * Reflection objects are now per-class rather than per-instance. To make this
2033 possible, the Reflection interface had to be changed such that all methods
2034 take the Message instance as a parameter. This change improves performance
2035 significantly in memory-bandwidth-limited use cases, since it makes the
2036 message objects smaller. Note that source-incompatible interface changes
2037 like this will not be made again after the library leaves beta.
temporala44f3c32008-08-15 18:32:02 +00002038 * Heuristically detect sub-messages when printing unknown fields.
kenton@google.com9b10f582008-09-30 00:09:40 +00002039 * Fix static initialization ordering bug that caused crashes at startup when
temporala44f3c32008-08-15 18:32:02 +00002040 compiling on Mac with static linking.
kenton@google.com9b10f582008-09-30 00:09:40 +00002041 * Fixed TokenizerTest when compiling with -DNDEBUG on Linux.
2042 * Fixed incorrect definition of kint32min.
temporala44f3c32008-08-15 18:32:02 +00002043 * Fix bytes type setter to work with byte sequences with embedded NULLs.
2044 * Other irrelevant tweaks.
2045
kenton@google.com9b10f582008-09-30 00:09:40 +00002046 Java
2047 * Fixed UnknownFieldSet's parsing of varints larger than 32 bits.
2048 * Fixed TextFormat's parsing of "inf" and "nan".
2049 * Fixed TextFormat's parsing of comments.
2050 * Added info to Java POM that will be required when we upload the
temporala44f3c32008-08-15 18:32:02 +00002051 package to a Maven repo.
2052
kenton@google.com9b10f582008-09-30 00:09:40 +00002053 Python
2054 * MergeFrom(message) and CopyFrom(message) are now implemented.
2055 * SerializeToString() raises an exception if the message is missing required
2056 fields.
2057 * Code organization improvements.
2058 * Fixed doc comments for RpcController and RpcChannel, which had somehow been
temporala44f3c32008-08-15 18:32:02 +00002059 swapped.
kenton@google.com9b10f582008-09-30 00:09:40 +00002060 * Fixed text_format_test on Windows where floating-point exponents sometimes
2061 contain extra zeros.
temporala44f3c32008-08-15 18:32:02 +00002062 * Fix Python service CallMethod() implementation.
2063
2064 Other
2065 * Improved readmes.
2066 * VIM syntax highlighting improvements.
2067
temporal40ee5512008-07-10 02:12:20 +000020682008-07-07 version 2.0.0:
2069
2070 * First public release.