blob: 4fa0ac73661dec87a8a2973f9bfddf3fe2394fdd [file] [log] [blame]
Deanna Garciad303bba2021-05-25 21:02:52 +000012021-05-25 version 3.17.2 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)
2 Kotlin
Deanna Garciaa693d722021-05-25 21:07:28 +00003 * Fix duplicate class error (#8653)
Deanna Garciad303bba2021-05-25 21:02:52 +00004
Joshua Haberman0b874752021-05-19 15:53:47 -070052021-05-07 version 3.17.1 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)
6 PHP
Joshua Habermane6356052021-05-24 11:15:46 -07007 * Fixed PHP memory leaks and arginfo errors. (#8614)
Joshua Haberman0b874752021-05-19 15:53:47 -07008 * Fixed JSON parser to allow multiple values from the same oneof as long as
9 all but one are null.
10
11 Ruby
Joshua Habermane6356052021-05-24 11:15:46 -070012 * Fixed memory bug: properly root repeated/map field when assigning. (#8639)
Joshua Haberman0b874752021-05-19 15:53:47 -070013 * Fixed JSON parser to allow multiple values from the same oneof as long as
14 all but one are null.
15
Adam Cozzettee211ad32021-05-07 11:34:04 -0700162021-05-07 version 3.17.0 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)
Joshua Habermand6f0c9b2021-02-26 10:45:41 -080017
Joshua Habermand99a67e2021-04-30 16:20:39 -070018 Protocol Compiler
19 * Fix the generated source information for reserved values in Enums.
20
Joshua Habermand6f0c9b2021-02-26 10:45:41 -080021 C++
Adam Cozzettee211ad32021-05-07 11:34:04 -070022 * Fix -Wunused-parameter in map<string, int> fields (fixes #8494) (#8500)
23 * Use byteswap.h when building against musl libc (#8503)
24 * Fix -Wundefined-inline error when using SharedCtor() or SharedDtor() (#8532)
Joshua Habermand5975062021-04-15 16:22:09 -070025 * Fix bug where `Descriptor::DebugString()` printed proto3 synthetic oneofs.
26 * Provide stable versions of `SortAndUnique()`.
27 * Make sure to cache proto3 optional message fields when they are cleared.
Joshua Habermane22b4ba2021-04-16 13:00:30 -070028 * Expose UnsafeArena methods to Reflection.
Joshua Habermand99a67e2021-04-30 16:20:39 -070029 * Use std::string::empty() rather than std::string::size() > 0.
Joshua Habermand5975062021-04-15 16:22:09 -070030
31 Kotlin
32 * Restrict extension setter and getter operators to non-nullable T.
33
Joshua Habermand99a67e2021-04-30 16:20:39 -070034 Java
Adam Cozzettee211ad32021-05-07 11:34:04 -070035 * updating GSON and Guava to more recent versions (#8524)
Joshua Habermand99a67e2021-04-30 16:20:39 -070036 * Reduce the time spent evaluating isExtensionNumber by storing the extension
37 ranges in a TreeMap for faster queries. This is particularly relevant for
38 protos which define a large number of extension ranges, for example when
39 each tag is defined as an extension.
40 * Fix java bytecode estimation logic for optional fields.
41 * Optimize Descriptor.isExtensionNumber.
42
Joshua Habermandd968d32021-04-16 10:27:27 -070043 Python
Adam Cozzette0aabf892021-05-11 12:09:56 -070044 * Add MethodDescriptor.CopyToProto() (#8327)
Adam Cozzettee211ad32021-05-07 11:34:04 -070045 * Remove unused python_protobuf.{cc,h} (#8513)
46 * Start publishing python aarch64 manylinux wheels normally (#8530)
47 * Fix constness issue detected by MSVC standard conforming mode (#8568)
Joshua Habermandd968d32021-04-16 10:27:27 -070048 * Make JSON parsing match C++ and Java when multiple fields from the same
49 oneof are present and all but one is null.
50
Adam Cozzettee211ad32021-05-07 11:34:04 -070051 Ruby
Adam Cozzette0aabf892021-05-11 12:09:56 -070052 * Add support for proto3 json_name in compiler and field definitions (#8356)
Adam Cozzettee211ad32021-05-07 11:34:04 -070053 * Fixed memory leak of Ruby arena objects. (#8461)
54 * Fix source gem compilation (#8471)
Adam Cozzette0aabf892021-05-11 12:09:56 -070055 * Fix various exceptions in Ruby on 64-bit Windows (#8563)
56 * Fix crash when calculating Message hash values on 64-bit Windows (#8565)
Adam Cozzettee211ad32021-05-07 11:34:04 -070057
Joshua Habermandd968d32021-04-16 10:27:27 -070058 Conformance Tests
59 * Added a conformance test for the case of multiple fields from the same
60 oneof.
61
Adam Cozzettee211ad32021-05-07 11:34:04 -070062 Other
63 * Opensourcing kotlin protos (#8272)
64 * Use a newer version of rules_proto, with the new rule `proto_descriptor_set` (#8469)
65
Joshua Habermand5975062021-04-15 16:22:09 -0700663.16.0 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)
67
68 C++
Joshua Haberman72244062021-03-30 12:38:52 -070069 * The ::pb namespace is no longer exposed due to conflicts.
Joshua Habermand6f0c9b2021-02-26 10:45:41 -080070 * Allow MessageDifferencer::TreatAsSet() (and friends) to override previous
71 calls instead of crashing.
72 * Reduce the size of generated proto headers for protos with `string` or
73 `bytes` fields.
74 * Move arena() operation on uncommon path to out-of-line routine
75 * For iterator-pair function parameter types, take both iterators by value.
76 * Code-space savings and perhaps some modest performance improvements in
77 RepeatedPtrField.
Joshua Haberman9daba362021-03-22 16:29:46 -070078 * Eliminate nullptr check from every tag parse.
79 * Remove unused _$name$_cached_byte_size_ fields.
80 * Serialize extension ranges together when not broken by a proto field in the
81 middle.
82 * Do out-of-line allocation and deallocation of string object in ArenaString.
83 * Streamline ParseContext::ParseMessage<T> to avoid code bloat and improve
84 performance.
85 * New member functions RepeatedField::Assign, RepeatedPtrField::{Add, Assign}.
86 * Fix undefined behavior warning due to innocuous uninitialization of value
87 on an error path.
88 * Avoid expensive inlined code space for encoding message length for messages
89 >= 128 bytes and instead do a procedure call to a shared out-of-line routine.
Derek Perez361308c2021-04-01 21:15:38 +000090 * util::DefaultFieldComparator will be final in a future version of protobuf.
91 Subclasses should inherit from SimpleFieldComparator instead.
Joshua Habermand6f0c9b2021-02-26 10:45:41 -080092
93 Java:
Derek Perez91471092021-04-01 20:49:42 +000094 * Detect invalid overflow of byteLimit and return InvalidProtocolBufferException as documented.
Joshua Haberman9daba362021-03-22 16:29:46 -070095 * Exceptions thrown while reading from an InputStream in parseFrom are now
96 included as causes.
97 * Support potentially more efficient proto parsing from RopeByteStrings.
98 * Clarify runtime of ByteString.Output.toStringBuffer().
99
100 Python
101 * Fixed a bug in text format where a trailing colon was printed for repeated field.
102 * When TextFormat encounters a duplicate message map key, replace the current
103 one instead of merging.
104
105 JavaScript
106 * Make Any.pack() chainable.
Joshua Habermand6f0c9b2021-02-26 10:45:41 -0800107
Adam Cozzette436bd782021-04-07 15:38:38 -07001082021-04-07 version 3.15.8 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)
109
110 Ruby
111 * Fixed memory leak of Ruby arena objects (#8461)
112
Adam Cozzettec00c2d42021-04-02 10:12:56 -07001132021-04-02 version 3.15.7 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)
114
115 C++
116 * Remove the ::pb namespace (alias) (#8423)
117
118 Ruby
119 * Fix unbounded memory growth for Ruby <2.7 (#8429)
120 * Fixed message equality in cases where the message type is different (#8434)
121
Adam Cozzette971a5932021-03-10 10:21:18 -08001222021-03-10 version 3.15.6 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)
123
124 Ruby
125 * Fixed bug in string comparison logic (#8386)
126
Adam Cozzette5702d512021-03-04 10:57:10 -08001272021-03-04 version 3.15.5 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)
128
129 Ruby
130 * Fixed quadratic memory use in array append (#8379)
131
132 PHP
133 * Fixed quadratic memory use in array append (#8379)
134
135 C++
136 * Do not disable RTTI by default in the CMake build (#8377)
137
Adam Cozzettee5c067f2021-03-02 15:31:13 -08001382021-03-02 version 3.15.4 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)
139
140 Ruby
141 * Fixed SEGV when users pass nil messages (#8363)
142 * Fixed quadratic memory usage when appending to arrays (#8364)
143
144 C++
145 * Create a CMake option to control whether or not RTTI is enabled (#8361)
146
147 PHP
148 * read_property() handler is not supposed to return NULL (#8362)
149
Adam Cozzetteeb542e62021-02-25 09:15:27 -08001502021-02-25 version 3.15.3 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)
151
152 Ruby
153 * Ruby <2.7 now uses WeakMap too, which prevents memory leaks. (#8341)
154
Adam Cozzette1af46572021-02-23 11:44:59 -08001552021-02-23 version 3.15.2 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)
156
157 Ruby
158 * Fix for FieldDescriptor.get(msg) (#8330)
159
160 C++
161 * Fix PROTOBUF_CONSTINIT macro redefinition (#8323)
162
Adam Cozzette24d8a552021-02-19 11:06:38 -08001632021-02-05 version 3.15.1 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)
164
165 Ruby
166 * Bugfix for Message.[] for repeated or map fields (#8313)
167
Adam Cozzette42fea442021-02-05 16:09:24 -08001682021-02-05 version 3.15.0 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)
Joshua Haberman1817a012020-11-20 11:06:07 -0800169
Joshua Haberman91944262021-02-04 14:13:45 -0800170 Protocol Compiler
171 * Optional fields for proto3 are enabled by default, and no longer require
172 the --experimental_allow_proto3_optional flag.
173
Joshua Haberman1817a012020-11-20 11:06:07 -0800174 C++
175 * MessageDifferencer: fixed bug when using custom ignore with multiple
176 unknown fields
177 * Use init_seg in MSVC to push initialization to an earlier phase.
178 * Runtime no longer triggers -Wsign-compare warnings.
179 * Fixed -Wtautological-constant-out-of-range-compare warning.
180 * DynamicCastToGenerated works for nullptr input for even if RTTI is disabled
181 * Arena is refactored and optimized.
Joshua Haberman7993c742020-11-23 09:09:05 -0800182 * Clarified/specified that the exact value of Arena::SpaceAllocated() is an
183 implementation detail users must not rely on. It should not be used in
184 unit tests.
Joshua Haberman1817a012020-11-20 11:06:07 -0800185 * Change the signature of Any::PackFrom() to return false on error.
Deanna Garcia62fb6dd2021-01-27 19:28:44 +0000186 * Add fast reflection getter API for strings.
187 * Constant initialize the global message instances
188 * Avoid potential for missed wakeup in UnknownFieldSet
189 * Now Proto3 Oneof fields have "has" methods for checking their presence in
190 C++.
191 * Bugfix for NVCC
192 * Return early in _InternalSerialize for empty maps.
193 * Adding functionality for outputting map key values in proto path logging
194 output (does not affect comparison logic) and stop printing 'value' in the
195 path. The modified print functionality is in the
196 MessageDifferencer::StreamReporter.
Adam Cozzette42fea442021-02-05 16:09:24 -0800197 * Fixed https://github.com/protocolbuffers/protobuf/issues/8129
Deanna Garcia62fb6dd2021-01-27 19:28:44 +0000198 * Ensure that null char symbol, package and file names do not result in a
199 crash.
200 * Constant initialize the global message instances
201 * Pretty print 'max' instead of numeric values in reserved ranges.
Joshua Haberman91944262021-02-04 14:13:45 -0800202 * Removed remaining instances of std::is_pod, which is deprecated in C++20.
Joshua Haberman84320bf2021-02-04 14:17:08 -0800203 * Changes to reduce code size for unknown field handling by making uncommon
204 cases out of line.
Adam Cozzette42fea442021-02-05 16:09:24 -0800205 * Fix std::is_pod deprecated in C++20 (#7180)
206 * Fix some -Wunused-parameter warnings (#8053)
207 * Fix detecting file as directory on zOS issue #8051 (#8052)
208 * Don't include sys/param.h for _BYTE_ORDER (#8106)
209 * remove CMAKE_THREAD_LIBS_INIT from pkgconfig CFLAGS (#8154)
210 * Fix TextFormatMapTest.DynamicMessage issue#5136 (#8159)
211 * Fix for compiler warning issue#8145 (#8160)
212 * fix: support deprecated enums for GCC < 6 (#8164)
213 * Fix some warning when compiling with Visual Studio 2019 on x64 target (#8125)
214
215 Python
216 * Provided an override for the reverse() method that will reverse the internal
217 collection directly instead of using the other methods of the BaseContainer.
218 * MessageFactory.CreateProtoype can be overridden to customize class creation.
219 * Fix PyUnknownFields memory leak (#7928)
220 * Add macOS big sur compatibility (#8126)
221
222 JavaScript
223 * Generate `getDescriptor` methods with `*` as their `this` type.
224 * Enforce `let/const` for generated messages.
225 * js/binary/utils.js: Fix jspb.utils.joinUnsignedDecimalString to work with negative bitsLow and low but non-zero bitsHigh parameter. (#8170)
226
227 PHP
Joshua Habermanc59e7f12021-02-10 15:06:29 -0800228 * Added support for PHP 8. (#8105)
Adam Cozzette42fea442021-02-05 16:09:24 -0800229 * unregister INI entries and fix invalid read on shutdown (#8042)
230 * Fix PhpDoc comments for message accessors to include "|null". (#8136)
231 * fix: convert native PHP floats to single precision (#8187)
232 * Fixed PHP to support field numbers >=2**28. (#8235)
233 * feat: add support for deprecated fields to PHP compiler (#8223)
234 * Protect against stack overflow if the user derives from Message. (#8248)
235 * Fixed clone for Message, RepeatedField, and MapField. (#8245)
236 * Updated upb to allow nonzero offset minutes in JSON timestamps. (#8258)
237
238 Ruby
Joshua Habermanc59e7f12021-02-10 15:06:29 -0800239 * Added support for Ruby 3. (#8184)
240 * Rewrote the data storage layer to be based on upb_msg objects from the
241 upb library. This should lead to much better parsing performance,
242 particularly for large messages. (#8184).
Adam Cozzette42fea442021-02-05 16:09:24 -0800243 * Fill out JRuby support (#7923)
Joshua Habermanc59e7f12021-02-10 15:06:29 -0800244 * [Ruby] Fix: (SIGSEGV) gRPC-Ruby issue on Windows. memory alloc infinite
245 recursion/run out of memory (#8195)
Adam Cozzette42fea442021-02-05 16:09:24 -0800246 * Fix jruby support to handle messages nested more than 1 level deep (#8194)
Joshua Haberman1817a012020-11-20 11:06:07 -0800247
248 Java
249 * Avoid possible UnsupportedOperationException when using CodedInputSteam
250 with a direct ByteBuffer.
251 * Make Durations.comparator() and Timestamps.comparator() Serializable.
252 * Add more detailed error information for dynamic message field type
253 validation failure
Deanna Garcia62fb6dd2021-01-27 19:28:44 +0000254 * Removed declarations of functions declared in java_names.h from
255 java_helpers.h.
256 * Now Proto3 Oneof fields have "has" methods for checking their presence in
257 Java.
258 * Annotates Java proto generated *_FIELD_NUMBER constants.
Joshua Haberman7a92a5a2021-02-04 14:26:30 -0800259 * Add -assumevalues to remove JvmMemoryAccessor on Android.
Joshua Haberman1817a012020-11-20 11:06:07 -0800260
Adam Cozzette42fea442021-02-05 16:09:24 -0800261 C#
262 * Fix parsing negative Int32Value that crosses segment boundary (#8035)
263 * Change ByteString to use memory and support unsafe create without copy (#7645)
264 * Optimize MapField serialization by removing MessageAdapter (#8143)
265 * Allow FileDescriptors to be parsed with extension registries (#8220)
266 * Optimize writing small strings (#8149)
Joshua Haberman1817a012020-11-20 11:06:07 -0800267
Adam Cozzette49285832020-11-11 15:17:17 -08002682020-11-11 version 3.14.0 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)
Joshua Haberman2b3a7972020-08-17 16:18:11 -0700269
270 Protocol Compiler
271 * The proto compiler no longer requires a .proto filename when it is not
272 generating code.
Joshua Haberman0eb317c2020-09-28 11:55:27 -0700273 * Added flag `--deterministic_output` to `protoc --encode=...`.
Joshua Haberman3fff95e2020-10-23 11:04:54 -0700274 * Fixed deadlock when using google.protobuf.Any embedded in aggregate options.
Joshua Haberman2b3a7972020-08-17 16:18:11 -0700275
276 C++
277 * Arenas are now unconditionally enabled. cc_enable_arenas no longer has
278 any effect.
Joshua Haberman0eb317c2020-09-28 11:55:27 -0700279 * Removed inlined string support, which is incompatible with arenas.
Joshua Haberman2b3a7972020-08-17 16:18:11 -0700280 * Fix a memory corruption bug in reflection when mixing optional and
281 non-optional fields.
282 * Make SpaceUsed() calculation more thorough for map fields.
283 * Add stack overflow protection for text format with unknown field values.
284 * FieldPath::FollowAll() now returns a bool to signal if an out-of-bounds
285 error was encountered.
286 * Performance improvements for Map.
287 * Minor formatting fix when dumping a descriptor to .proto format with
288 DebugString.
289 * UBSAN fix in RepeatedField (#2073).
290 * When running under ASAN, skip a test that makes huge allocations.
291 * Fixed a crash that could happen when creating more than 256 extensions in
292 a single message.
Joshua Haberman0eb317c2020-09-28 11:55:27 -0700293 * Fix a crash in BuildFile when passing in invalid descriptor proto.
294 * Parser security fix when operating with CodedInputStream.
295 * Warn against the use of AllowUnknownExtension.
Joshua Haberman3fff95e2020-10-23 11:04:54 -0700296 * Migrated to C++11 for-range loops instead of index-based loops where
297 possible. This fixes a lot of warnings when compiling with -Wsign-compare.
Adam Cozzette49285832020-11-11 15:17:17 -0800298 * Fix segment fault for proto3 optional (#7805)
299 * Adds a CMake option to build `libprotoc` separately (#7949)
Joshua Haberman2b3a7972020-08-17 16:18:11 -0700300
301 Java
302 * Bugfix in mergeFrom() when a oneof has multiple message fields.
Joshua Haberman0eb317c2020-09-28 11:55:27 -0700303 * Fix RopeByteString.RopeInputStream.read() returning -1 when told to read
304 0 bytes when not at EOF.
305 * Redefine remove(Object) on primitive repeated field Lists to avoid
306 autoboxing.
Joshua Haberman3fff95e2020-10-23 11:04:54 -0700307 * Support "\u" escapes in textformat string literals.
308 * Trailing empty spaces are no longer ignored for FieldMask.
309 * Fix FieldMaskUtil.subtract to recursively remove mask.
Joshua Haberman90021b82020-10-23 11:11:46 -0700310 * Mark enums with `@java.lang.Deprecated` if the proto enum has option
311 `deprecated = true;`.
Adam Cozzette49285832020-11-11 15:17:17 -0800312 * Adding forgotten duration.proto to the lite library (#7738)
Joshua Haberman2b3a7972020-08-17 16:18:11 -0700313
314 Python
315 * Print google.protobuf.NullValue as null instead of "NULL_VALUE" when it is
316 used outside WKT Value/Struct.
317 * Fix bug occurring when attempting to deep copy an enum type in python 3.
Adam Cozzette49285832020-11-11 15:17:17 -0800318 * Add a setuptools extension for generating Python protobufs (#7783)
319 * Remove uses of pkg_resources in non-namespace packages. (#7902)
320 * [bazel/py] Omit google/__init__.py from the Protobuf runtime. (#7908)
321 * Removed the unnecessary setuptools package dependency for Python package (#7511)
Adam Cozzette129a5ed2020-11-12 10:28:41 -0800322 * Fix PyUnknownFields memory leak (#7928)
Adam Cozzette49285832020-11-11 15:17:17 -0800323
324 PHP
325 * Added support for "==" to the PHP C extension (#7883)
326 * Added `==` operators for Map and Array. (#7900)
327 * Native C well-known types (#7944)
328 * Optimized away hex2bin() call in generated code (#8006)
329 * New version of upb, and a new hash function wyhash in third_party. (#8000)
330 * add missing hasOneof method to check presence of oneof fields (#8003)
Joshua Haberman2b3a7972020-08-17 16:18:11 -0700331
332 Go:
333 * Update go_package options to reference google.golang.org/protobuf module.
334
Adam Cozzette49285832020-11-11 15:17:17 -0800335 C#:
336 * annotate ByteString.CopyFrom(ReadOnlySpan<byte>) as SecuritySafeCritical (#7701)
337 * Fix C# optional field reflection when there are regular fields too (#7705)
Adam Cozzette86309722020-11-13 10:30:41 -0800338 * Fix parsing negative Int32Value that crosses segment boundary (#8035)
Adam Cozzette49285832020-11-11 15:17:17 -0800339
340 Javascript:
341 * JS: parse (un)packed fields conditionally (#7379)
Joshua Haberman2b3a7972020-08-17 16:18:11 -0700342
Adam Cozzettee5fe9b82020-08-17 12:58:45 -07003432020-07-14 version 3.13.0 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)
344
345 PHP:
346 * The C extension is completely rewritten. The new C extension has significantly
347 better parsing performance and fixes a handful of conformance issues. It will
348 also make it easier to add support for more features like proto2 and proto3 presence.
349 * The new C extension does not support PHP 5.x. PHP 5.x users can still use pure-PHP.
Joshua Haberman66a189f2020-05-26 00:37:50 -0700350
351 C++:
Joshua Haberman75e4c442020-06-01 16:35:52 -0700352 * Removed deprecated unsafe arena string accessors
Joshua Haberman66a189f2020-05-26 00:37:50 -0700353 * Enabled heterogeneous lookup for std::string keys in maps.
Joshua Haberman75e4c442020-06-01 16:35:52 -0700354 * Removed implicit conversion from StringPiece to std::string
355 * Fix use-after-destroy bug when the Map is allocated in the arena.
Joshua Haberman5f5efe52020-06-03 00:12:51 -0700356 * Improved the randomness of map ordering
357 * Added stack overflow protection for text format with unknown fields
358 * Use std::hash for proto maps to help with portability.
359 * Added more Windows macros to proto whitelist.
360 * Arena constructors for map entry messages are now marked "explicit"
361 (for regular messages they were already explicit).
Joshua Habermanc7da7e92020-06-15 12:14:22 -0700362 * Fix subtle aliasing bug in RepeatedField::Add
363 * Fix mismatch between MapEntry ByteSize and Serialize with respect to unset
364 fields.
Joshua Haberman66a189f2020-05-26 00:37:50 -0700365
366 Python:
Joshua Habermanc7da7e92020-06-15 12:14:22 -0700367 * JSON format conformance fixes:
368 * Reject lowercase t for Timestamp json format.
369 * Print full_name directly for extensions (no camelCase).
370 * Reject boolean values for integer fields.
371 * Reject NaN, Infinity, -Infinity that is not quoted.
372 * Base64 fixes for bytes fields: accept URL-safe base64 and missing padding.
373 * Bugfix for fields/files named "async" or "await".
Joshua Haberman66a189f2020-05-26 00:37:50 -0700374 * Improved the error message when AttributeError is returned from __getattr__
375 in EnumTypeWrapper.
Joshua Haberman5f5efe52020-06-03 00:12:51 -0700376
377 Java:
378 * Fixed a bug where setting optional proto3 enums with setFooValue() would
379 not mark the value as present.
Joshua Haberman435952c2020-06-15 12:20:14 -0700380 * Add Subtract function to FieldMaskUtil.
Joshua Haberman66a189f2020-05-26 00:37:50 -0700381
Jan Tattermusch7cb55972020-06-02 09:26:25 +0200382 C#:
383 * Dropped support for netstandard1.0 (replaced by support for netstandard1.1).
384 This was required to modernize the parsing stack to use the `Span<byte>`
385 type internally. (#7351)
386 * Add `ParseFrom(ReadOnlySequence<byte>)` method to enable GC friendly
387 parsing with reduced allocations and buffer copies. (#7351)
Jan Tattermusch79b11822020-07-14 17:52:30 +0200388 * Add support for serialization directly to a `IBufferWriter<byte>` or
389 to a `Span<byte>` to enable GC friendly serialization.
390 The new API is available as extension methods on the `IMessage` type. (#7576)
Jan Tattermusch7cb55972020-06-02 09:26:25 +0200391 * Add `GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE` define to make
392 generated code compatible with old C# compilers (pre-roslyn compilers
393 from .NET framework and old versions of mono) that do not support
Jan Tattermusch79b11822020-07-14 17:52:30 +0200394 ref structs. Users that are still on a legacy stack that does
395 not support C# 7.2 compiler might need to use the new define
396 in their projects to be able to build the newly generated code. (#7490)
397 * Due to the major overhaul of parsing and serialization internals (#7351 and #7576),
398 it is recommended to regenerate your generated code to achieve the best
399 performance (the legacy generated code will still work, but might incur
400 a slight performance penalty).
Jan Tattermusch7cb55972020-06-02 09:26:25 +0200401
Adam Cozzettee5fe9b82020-08-17 12:58:45 -07004022020-07-28 version 3.12.4 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)
403
404This release contains no significant changes, but exists because 3.12.3 was
405mistakenly tagged at the wrong commit.
406
Joshua Haberman9ce8c332020-06-01 13:36:50 -07004072020-06-01 version 3.12.3 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)
408
409 Objective-C
410 * Tweak the union used for Extensions to support old generated code. #7573
411
Joshua Haberman678da4f2020-05-26 15:55:45 -07004122020-05-26 version 3.12.2 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)
413
414 C++
415 * Simplified the template export macros to fix the build for mingw32. (#7539)
416
417 Objective-C
418 * Fix for the :protobuf_objc target in the Bazel BUILD file. (#7538)
419
Joshua Habermana37cc132020-05-20 12:06:30 -07004202020-05-20 version 3.12.1 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)
421
422 Ruby
423 * Re-add binary gems for Ruby 2.3 and 2.4. These are EOL upstream, however
424 many people still use them and dropping support will require more
425 coordination.
426
Joshua Haberman80535252020-05-12 14:39:14 -07004272020-05-12 version 3.12.0 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)
Joshua Haberman26bec4b2020-04-29 17:16:03 -0700428
429 Protocol Compiler
430 * [experimental] Singular, non-message typed fields in proto3 now support
431 presence tracking. This is enabled by adding the "optional" field label and
432 passing the --experimental_allow_proto3_optional flag to protoc.
433 * For usage info, see docs/field_presence.md.
434 * During this experimental phase, code generators should update to support
435 proto3 presence, see docs/implementing_proto3_presence.md for instructions.
436 * Allow duplicate symbol names when multiple descriptor sets are passed on
437 the command-line, to match the behavior when multiple .proto files are passed.
438 * Deterministic `protoc --descriptor_set_out` (#7175)
439
440 C++
441 * [experimental] Added proto3 presence support.
442 * New descriptor APIs to support proto3 presence.
443 * Enable Arenas by default on all .proto files.
444 * Documented that users are not allowed to subclass Message or MessageLite.
445 * Mark generated classes as final; inheriting from protos is strongly discouraged.
446 * Add stack overflow protection for text format with unknown fields.
447 * Add accessors for map key and value FieldDescriptors.
448 * Add FieldMaskUtil::FromFieldNumbers().
449 * MessageDifferencer: use ParsePartial() on Any fields so the diff does not
450 fail when there are missing required fields.
451 * ReflectionOps::Merge(): lookup messages in the right factory, if it can.
452 * Added Descriptor::WellKnownTypes enum and Descriptor::well_known_type()
453 accessor as an easier way of determining if a message is a Well-Known Type.
454 * Optimized RepeatedField::Add() when it is used in a loop.
455 * Made proto move/swap more efficient.
456 * De-virtualize the GetArena() method in MessageLite.
457 * Improves performance of json_stream_parser.cc by factor 1000 (#7230)
458 * bug: #7076 undefine Windows OUT and OPTIONAL macros (#7087)
459 * Fixed a bug in FieldDescriptor::DebugString() that would erroneously print
460 an "optional" label for a field in a oneof.
461 * Fix bug in parsing bool extensions that assumed they are always 1 byte.
462 * Fix off-by-one error in FieldOptions::ByteSize() when extensions are present.
463 * Clarified the comments to show an example of the difference between
464 Descriptor::extension and DescriptorPool::FindAllExtensions.
465 * Add a compiler option 'code_size' to force optimize_for=code_size on all
466 protos where this is possible.
467
468 Java
469 * [experimental] Added proto3 presence support.
470 * Mark java enum _VALUE constants as @Deprecated if the enum field is deprecated
471 * reduce <clinit> size for enums with allow_alias set to true.
472 * Sort map fields alphabetically by the field's key when printing textproto.
Joshua Haberman9952e362020-05-16 16:42:02 -0700473 * Fixed a bug in map sorting that appeared in -rc1 and -rc2 (#7508).
Joshua Haberman26bec4b2020-04-29 17:16:03 -0700474 * TextFormat.merge() handles Any as top level type.
475 * Throw a descriptive IllegalArgumentException when calling
476 getValueDescriptor() on enum special value UNRECOGNIZED instead of
477 ArrayIndexOutOfBoundsException.
478 * Fixed an issue with JsonFormat.printer() where setting printingEnumsAsInts()
479 would override the configuration passed into includingDefaultValueFields().
480 * Implement overrides of indexOf() and contains() on primitive lists returned
481 for repeated fields to avoid autoboxing the list contents.
482 * Add overload to FieldMaskUtil.fromStringList that accepts a descriptor.
483 * [bazel] Move Java runtime/toolchains into //java (#7190)
484
485 Python
486 * [experimental] Added proto3 presence support.
487 * [experimental] fast import protobuf module, only works with cpp generated code linked in.
488 * Truncate 'float' fields to 4 bytes of precision in setters for pure-Python
489 implementation (C++ extension was already doing this).
490 * Fixed a memory leak in C++ bindings.
491 * Added a deprecation warning when code tries to create Descriptor objects
492 directly.
493 * Fix unintended comparison between bytes and string in descriptor.py.
494 * Avoid printing excess digits for float fields in TextFormat.
495 * Remove Python 2.5 syntax compatibility from the proto compiler generated _pb2.py module code.
496 * Drop 3.3, 3.4 and use single version docker images for all python tests (#7396)
497
498 JavaScript
499 * Fix js message pivot selection (#6813)
500
501 PHP
502 * Persistent Descriptor Pool (#6899)
503 * Implement lazy loading of php class for proto messages (#6911)
504 * Correct @return in Any.unpack docblock (#7089)
Joshua Haberman80535252020-05-12 14:39:14 -0700505 * Ignore unknown enum value when ignore_unknown specified (#7455)
Joshua Haberman26bec4b2020-04-29 17:16:03 -0700506
507 Ruby
508 * [experimental] Implemented proto3 presence for Ruby. (#7406)
Joshua Habermanef7cc812020-05-01 13:10:28 -0700509 * Stop building binary gems for ruby <2.5 (#7453)
Joshua Haberman26bec4b2020-04-29 17:16:03 -0700510 * Fix for wrappers with a zero value (#7195)
511 * Fix for JSON serialization of 0/empty-valued wrapper types (#7198)
512 * Call "Class#new" over rb_class_new_instance in decoding (#7352)
513 * Build extensions for Ruby 2.7 (#7027)
514 * assigning 'nil' to submessage should clear the field. (#7397)
515
516 C#
517 * [experimental] Add support for proto3 presence fields in C# (#7382)
Joshua Haberman80535252020-05-12 14:39:14 -0700518 * Mark GetOption API as obsolete and expose the "GetOptions()" method on descriptors instead (#7491)
519 * Remove Has/Clear members for C# message fields in proto2 (#7429)
520 * Enforce recursion depth checking for unknown fields (#7132)
Joshua Haberman26bec4b2020-04-29 17:16:03 -0700521 * Fix conformance test failures for Google.Protobuf (#6910)
Joshua Haberman80535252020-05-12 14:39:14 -0700522 * Cleanup various bits of Google.Protobuf (#6674)
Joshua Haberman26bec4b2020-04-29 17:16:03 -0700523 * Fix latest ArgumentException for C# extensions (#6938)
524 * Remove unnecessary branch from ReadTag (#7289)
Joshua Haberman26bec4b2020-04-29 17:16:03 -0700525
526 Objective-C
527 * [experimental] ObjC Proto3 optional support (#7421)
528 * Block subclassing of generated classes (#7124)
529 * Use references to Obj C classes instead of names in descriptors. (#7026)
530 * Revisit how the WKTs are bundled with ObjC. (#7173)
531
532 Other
533 * Add a proto_lang_toolchain for javalite (#6882)
534 * [bazel] Update gtest and deprecate //external:{gtest,gtest_main} (#7237)
535 * Add application note for explicit presence tracking. (#7390)
536 * Howto doc for implementing proto3 presence in a code generator. (#7407)
537
538
Rafi Kamal3c020b92020-02-12 12:51:32 -08005392020-02-14 version 3.11.4 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)
540
541 C#
542 * Fix latest ArgumentException for C# extensions (#7188)
Rafi Kamale9e4c682020-02-14 10:19:40 -0800543 * Enforce recursion depth checking for unknown fields (#7210)
Rafi Kamal3c020b92020-02-12 12:51:32 -0800544
545 Ruby
546 * Fix wrappers with a zero value (#7195)
547 * Fix JSON serialization of 0/empty-valued wrapper types (#7198)
548
Rafi Kamal5f3d6592020-01-31 16:00:28 -08005492020-01-31 version 3.11.3 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)
550
551 C++
552 * Add OUT and OPTIONAL to windows portability files (#7087)
553
554 PHP
555 * Refactored ulong to zend_ulong for php7.4 compatibility (#7147)
556 * Call register_class before getClass from desc to fix segfault (#7077)
557
558
Rafi Kamalb58896e2019-12-10 11:22:24 -08005592019-12-10 version 3.11.2 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)
560
561 PHP
562 * Make c extension portable for php 7.4 (#6968)
563
564
Rafi Kamalc04d9c92019-12-02 11:57:40 -08005652019-12-02 version 3.11.1 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)
566
567 PHP
568 * Extern declare protobuf_globals (#6946)
569
570
Rafi Kamalde756512019-11-20 18:03:29 -08005712019-11-19 version 3.11.0 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)
572
573 C++
574 * Make serialization method naming consistent
575 * Make proto runtime + generated code free of deprecation warnings
576 * Moved ShutdownProtobufLibrary() to message_lite.h. For backward compatibility a declaration is still available in stubs/common.h, but users should prefer message_lite.h
577 * Removed non-namespace macro EXPECT_OK()
578 * Removed mathlimits.h from stubs in favor of using std::numeric_limits from C++11
579 * Fixed bug in parser when ending on a group tag
580 * Add a helper function to UnknownFieldSet to deal with the changing return value of message::unknown_fields()
581 * Fix incorrect use of string_view iterators
582 * Support direct pickling of nested messages
583 * Skip extension tag validation for MessageSet if unknown dependencies are allowed
584 * Updated deprecation macros to annotate deprecated code (#6612)
585 * Remove conversion warning in MapEntryFuncs::ByteSizeLong (#6766)
Rafi Kamalab5b61b2019-11-25 15:15:21 -0800586 * Revert "Make shared libraries be able to link to MSVC static runtime libraries, so that VC runtime is not required." (#6914)
Rafi Kamalde756512019-11-20 18:03:29 -0800587
588 Java
589 * Remove the usage of MethodHandle, so that Android users prior to API version 26 can use protobuf-java
590 * Publish ProGuard config for javalite
591 * Fix for StrictMode disk read violation in ExtensionRegistryLite
592 * Include part of the ByteString's content in its toString().
593 * Include unknown fields when merging proto3 messages in Java lite builders
594
595 Python
596 * Add float_precision option in json format printer
597 * Optionally print bytes fields as messages in unknown fields, if possible
598 * FieldPath: fix testing IsSet on root path ''
599 * Experimental code gen (fast import protobuf module) which only work with cpp generated code linked in
600
601 JavaScript
602 * Remove guard for Symbol iterator for jspb.Map
603
604 PHP
605 * Avoid too much overhead in layout_init (#6716)
606 * Lazily Create Singular Wrapper Message (#6833)
Rafi Kamalab5b61b2019-11-25 15:15:21 -0800607 * Implement lazy loading of php class for proto messages (#6911)
Rafi Kamalde756512019-11-20 18:03:29 -0800608
609 Ruby
610 * Ruby lazy wrappers optimization (#6797)
611
612 C#
613 * (RepeatedField): Capacity property to resize the internal array (#6530)
614 * Experimental proto2 support is now officially available (#4642, #5183, #5350, #5936)
615 * Getting started doc: https://github.com/protocolbuffers/protobuf/blob/master/docs/csharp/proto2.md
616 * Add length checks to ExtensionCollection (#6759)
617 * Optimize parsing of some primitive and wrapper types (#6843)
618 * Use 3 parameter Encoding.GetString for default string values (#6828)
619 * Change _Extensions property to normal body rather than expression (#6856)
620
621 Objective C
622 * Fixed unaligned reads for 32bit arm with newer Xcode versions (#6678)
623
624
Rafi Kamal9c0d61c2019-09-03 18:57:30 -07006252019-09-03 version 3.10.0 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)
626
627 C++
628 * Switch the proto parser to the faster MOMI parser.
629 * Properly escape Struct keys in the proto3 JSON serializer.
630 * Fix crash on uninitialized map entries.
631 * Informed the compiler of has-bit invariant to produce better code
632 * Unused imports of files defining descriptor extensions will now be reported
633 * Add proto2::util::RemoveSubranges to remove multiple subranges in linear time.
634 * Added BaseTextGenerator::GetCurrentIndentationSize()
635 * Made implicit weak fields compatible with the Apple linker
636 * Support 32 bit values for ProtoStreamObjectWriter to Struct.
637 * Removed the internal-only header coded_stream_inl.h and the internal-only methods defined there.
638 * Enforced no SWIG wrapping of descriptor_database.h (other headers already had this restriction).
639 * Implementation of the equivalent of the MOMI parser for serialization. This removes one of the two serialization routines, by making the fast array serialization routine completely general. SerializeToCodedStream can now be implemented in terms of the much much faster array serialization. The array serialization regresses slightly, but when array serialization is not possible this wins big.
640 * Do not convert unknown field name to snake case to accurately report error.
641 * Fix a UBSAN warnings. (#6333)
642 * Add podspec for C++ (#6404)
643 * protoc: fix source code info location for missing label (#6436)
644 * C++ Add move constructor for Reflection's SetString (#6477)
645
646 Java
647 * Call loadDescriptor outside of synchronized block to remove one possible source of deadlock.
648 * Have oneof enums implement a separate interface (other than EnumLite) for clarity.
649 * Opensource Android Memory Accessors
650 * Update TextFormat to make use of the new TypeRegistry.
651 * Support getFieldBuilder and getRepeatedFieldBuilder in ExtendableBuilder
652 * Update JsonFormat to make use of the new TypeRegistry.
653 * Add proguard config generator for GmmBenchmarkSuiteLite.
654 * Change ProtobufArrayList to use Object[] instead of ArrayList for 5-10% faster parsing
655 * Implement ProtobufArrayList.add(E) for 20% (5%-40%) faster overall protolite2 parsing
656 * Make a copy of JsonFormat.TypeRegistry at the protobuf top level package. This will eventually replace JsonFormat.TypeRegistry.
657 * Fix javadoc warnings in generated files (#6231)
658 * Java: Add Automatic-Module-Name entries to the Manifest (#6568)
659
660 Python
661 * Add descriptor methods in descriptor_pool are deprecated.
662 * Uses explicit imports to prevent multithread test failures in py3.
663 * Added __delitem__ for Python extension dict
664 * Update six version to 1.12.0 and fix legacy_create_init issue (#6391)
665
666 JavaScript
667 * Remove deprecated boolean option to getResultBase64String().
668 * Fix sint64 zig-zag encoding.
669 * Simplify hash64 string conversion to avoid DIGIT array. Should reduce overhead if these functions aren't used, and be more efficient by avoiding linear array searches.
670 * Change the parameter types of binaryReaderFn in ExtensionFieldBinaryInfo to (number, ?, ?).
671 * Create dates.ts and time_of_days.ts to mirror Java versions. This is a near-identical conversion of c.g.type.util.{Dates,TimeOfDays} respectively.
672 * Migrate moneys to TypeScript.
Rafi Kamal1a57c132019-10-02 17:06:22 -0700673
674 PHP
675 * Fix incorrect leap day for Timestamp (#6696)
676 * Initialize well known type values (#6713)
Rafi Kamal9c0d61c2019-09-03 18:57:30 -0700677
678 Ruby
679 * Fix scope resolution for Google namespace (#5878)
680 * Support hashes for struct initializers (#5716)
681 * Optimized away the creation of empty string objects. (#6502)
682 * Roll forward Ruby upb changes now that protobuf Ruby build is fixed (#5866)
683 * Optimized layout_mark() for Ruby (#6521)
684 * Optimization for layout_init() (#6547)
685 * Fix for GC of Ruby map frames. (#6533)
Rafi Kamal1a57c132019-10-02 17:06:22 -0700686 * Fixed leap year handling by reworking upb_mktime() -> upb_timegm(). (#6695)
687
688 Objective C
689 * Remove OSReadLittle* due to alignment requirements (#6678)
690 * Don't use unions and instead use memcpy for the type swaps. (#6672)
Rafi Kamal9c0d61c2019-09-03 18:57:30 -0700691
692 Other
693 * Override CocoaPods module to lowercase (#6464)
694
695
Jie Luo43156772019-08-09 13:21:18 -07006962019-06-28 version 3.9.0 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)
697
698 C++
699 * Optimize and simplify implementation of RepeatedPtrFieldBase
700 * Don't create unnecessary unknown field sets.
701 * Remove branch from accessors to repeated field element array.
702 * Added delimited parse and serialize util.
703 * Reduce size by not emitting constants for fieldnumbers
704 * Fix a bug when comparing finite and infinite field values with explicit tolerances.
705 * TextFormat::Parser should use a custom Finder to look up extensions by number if one is provided.
706 * Add MessageLite::Utf8DebugString() to make MessageLite more compatible with Message.
707 * Fail fast for better performance in DescriptorPool::FindExtensionByNumber() if descriptor has no defined extensions.
708 * Adding the file name to help debug colliding extensions
709 * Added FieldDescriptor::PrintableNameForExtension() and DescriptorPool::FindExtensionByPrintableName().
710 The latter will replace Reflection::FindKnownExtensionByName().
711 * Replace NULL with nullptr
712 * Created a new Add method in repeated field that allows adding a range of elements all at once.
713 * Enabled enum name-to-value mapping functions for C++ lite
714 * Avoid dynamic initialization in descriptor.proto generated code
715 * Move stream functions to MessageLite from Message.
716 * Move all zero_copy_stream functionality to io_lite.
717 * Do not create array of matched fields for simple repeated fields
718 * Enabling silent mode by default to reduce make compilation noise. (#6237)
719
720 Java
721 * Expose TextFormat.Printer and make it configurable. Deprecate the static methods.
722 * Library for constructing google.protobuf.Struct and google.protobuf.Value
723 * Make OneofDescriptor extend GenericDescriptor.
724 * Expose streamingness of service methods from MethodDescriptor.
725 * Fix a bug where TextFormat fails to parse Any filed with > 1 embedded message sub-fields.
726 * Establish consistent JsonFormat behavior for nulls in oneofs, regardless of order.
727 * Update GSON version to 3.8.5. (#6268)
728 * Add `protobuf_java_lite` Bazel target. (#6177)
729
730 Python
731 * Change implementation of Name() for enums that allow aliases in proto2 in Python
732 to be in line with claims in C++ implementation (to return first value).
733 * Explicitly say what field cannot be set when the new value fails a type check.
734 * Duplicate register in descriptor pool will raise errors
735 * Add __slots__ to all well_known_types classes, custom attributes are not allowed anymore.
736 * text_format only present 8 valid digits for float fields by default
737
738 JavaScript
739 * Add Oneof enum to the list of goog.provide
740
741 PHP
742 * Make php message class final to avoid mocking. (#6277)
743 * Rename get/setXXXValue to get/setXXXWrapper. (#6295)
744
745 Ruby
746 * Remove to_hash methods. (#6166)
747
748
Hao Nguyen3a5fe3b2019-04-29 13:01:54 -07007492019-04-29 version 3.8.0 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)
750
751 C++
752 * Use std::atomic<int32> in case of myriad2 platform
753 * Always declare enums to be int-sized
754 * Added DebugString() and ShortDebugString() methods on MessageLite
755 * Specialized different parse loop control flows
756 * 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.
757 * Move to an internal MACRO for parser validity checks.
758 * Improve map parsing performance.
759 * Make MergePartialFromCodedStream non virtual. This allows direct calls, potential inlining and is also a code health improvement
760 * Add an overall limit to parse_context to prevent reading past it. This allows to remove a annoying level of indirection.
761 * Fix a mistake, we shouldn't verify map key/value strings for utf8 in opt mode for proto2.
762 * Further improvements to cut binary size.
763 * Prepare to make MergePartialFromCodedStream non-virtual.
764 * 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.
765 * Add a note of caution to the comments around skip in CodedOutputStream.
766 * Simplify end check.
767 * Add overload for ParseMessage for MessageLite/Message types. If the explicit type is not known inlining won't help de-virtualizing the virtual call.
768 * 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.
769 * Improve the parser.
770 * [c++17] Changed proto2::RepeatedPtrField iterators to no longer derive from the deprecated std::iterator class.
771 * Change the default value of case_insensitive_enum_parsing to false for JsonStringToMessage.
772 * Add a warning if a field name doesn't match the style guide.
773 * Fix TextFormat not round-trip correctly when float value is max float.
774 * Added locationed info for some errors at compiler
775 * Python reserved keywords are now working with getattr()/setattr() for most descriptors.
776 * Added AllowUnknownField() in text_format
777 * Append '_' to C++ reserved keywords for message, enum, extension
778 * Fix MSVC warning C4244 in protobuf's parse_context.h.
779 * Updating Iterators to be compatible with C++17 in MSVC.
780 * Use capability annotation in mutex.h
781 * Fix "UndefinedBehaviorSanitizer: cfi-bad-type"
782 * CriticalSectionLock class as a lightweight replacement for std::mutex on Windows platforms.
783 * Removed vestigial wire_format_lite_inl.h
784
785 C#
786 * Added System.Memory dependency.
787
788 Java
789 * Make Java protoc code generator ignore optimize_for LITE_RUNTIME. Users should instead use the Java lite protoc plugin.
790 * Change Extension getMessageDefaultInstance() to return Message instead of MessageLite.
791 * Prevent malicious input streams from leaking buffers for ByteString or ByteBuffer parsing.
792 * Release new Javalite runtime.
793 * Show warning in case potential file name conflict.
794 * Allow Java reserved keywords to be used in extensions.
795 * Added setAllowUnknownFields() in text format
796 * Add memoization to ExtensionRegistryLite.getEmptyRegistry()
797 * Improve performance of CodedOutputStream.writeUInt32NoTag
798 * Add an optimized mismatch-finding algorithm to UnsafeUtil.
799 * When serializing uint32 varints, check that we have MAX_VARINT32_SIZE bytes left, not just MAX_VARINT_SIZE.
800 * Minor optimization to RopeByteString.PieceIterator
801
802 JavaScript
803 * Simplify generated toObject code when the default value is used.
804
805 Python
806 * 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).
807 * Added double_format option in text format printer.
808 * Added iter and __contains__ to extension dict
809 * Added allow_unknown_field option in python text format parser
810 * Fixed Timestamp.ToDatetime() loses precision issue
811 * Support unknown field in text format printer.
812 * 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,
813 convert to -inf if smaller than -3.4028234664e+38
814 * Allowed casting str->bytes in Message.__setstate__
815
816 Ruby
817 * Helper methods to get enum name for Ruby.
818
819
Hao Nguyen6b434dc2019-01-24 14:35:47 -08008202019-01-24 version 3.7.0 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)
821
822 C++
823 * Introduced new MOMI (maybe-outside-memory-interval) parser.
824 * Add an option to json_util to parse enum as case-insensitive. In the future, enum parsing in json_util will become case-sensitive.
825 * Added conformance test for enum aliases
826 * Added support for --cpp_out=speed:...
827 * Added use of C++ override keyword where appropriate
828 * Many other cleanups and fixes.
829
830 Java
831 * Fix illegal reflective access warning in JDK 9+
832 * Add BOM
833
834 Python
835 * Added Python 3.7 compatibility.
836 * Modified ParseFromString to return bytes parsed .
837 * Introduce Proto C API.
838 * FindFileContainingSymbol in descriptor pool is now able to find field and enum values.
839 * reflection.MakeClass() and reflection.ParseMessage() are deprecated.
Brian Wignalla104dff2020-01-08 13:18:20 -0500840 * Added DescriptorPool.FindMethodByName() method in pure python (c extension already has it)
Hao Nguyen6b434dc2019-01-24 14:35:47 -0800841 * Flipped proto3 to preserve unknown fields by default.
842 * Added support for memoryview in python3 proto message parsing.
843 * Added MergeFrom for repeated scalar fields in c extension (pure python already has it)
844 * Surrogates are now rejected at setters in python3.
845 * Added public unknown field API.
846 * RecursionLimit is also set to max if allow_oversize_protos is enabled.
847 * Disallow duplicate scalars in proto3 text_format parse.
848 * Fix some segment faults for c extension map field.
849
850 PHP
851 * 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.
852 * Supports php 7.3
853 * Added helper methods to convert between enum values and names.
854 * Allow setting/getting wrapper message fields using primitive values.
855 * Various bug fixes.
856
857 Ruby
858 * Ruby 2.6 support.
859 * Drops support for ruby < 2.3.
860 * 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.
861 * Json parsing can specify an option to ignore unknown fields: msg.decode_json(data, {ignore_unknown_fields: true}).
862 * Added support for proto2 syntax (partially).
863 * Various bug fixes.
864
865 Csharp
866 * More support for FieldMask include merge, intersect and more.
867 * Increasing the default recursion limit to 100.
868 * Support loading FileDescriptors dynamically.
869 * Provide access to comments from descriptors.
870 * Added Any.Is method.
871 * Compatible with C# 6
872 * Added IComparable and comparison operators on Timestamp.
873
874 Objective C
875 * Add ability to introspect list of enum values (#4678)
876 * Copy the value when setting message/data fields (#5215)
877 * Support suppressing the objc package prefix checks on a list of files (#5309)
878 * 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)
879 * Small fixes to TextFormat generation for extensions (#5362)
880 * Provide more details/context in deprecation messages (#5412)
881 * Array/Dictionary enumeration blocks NS_NOESCAPE annotation for Swift (#5421)
882 * Properly annotate extensions for ARC when their names imply behaviors (#5427)
883 * Enum alias name collision improvements (#5480)
884
885
Adam Cozzette48cb18e2018-07-27 11:19:52 -07008862018-07-27 version 3.6.1 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)
887
888 C++
889 * Introduced workaround for Windows issue with std::atomic and std::once_flag
890 initialization (#4777, #4773).
891
892 PHP
893 * Added compatibility with PHP 7.3 (#4898).
894
895 Ruby
896 * Fixed Ruby crash involving Any encoding (#4718).
897
Adam Cozzetteadf84b42018-06-01 13:58:09 -07008982018-06-01 version 3.6.0 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)
899
900 C++
901 * Starting from this release, we now require C++11. For those we cannot yet
902 upgrade to C++11, we will try to keep the 3.5.x branch updated with
903 critical bug fixes only. If you have any concerns about this, please
904 comment on issue #2780.
905 * Moved to C++11 types like std::atomic and std::unique_ptr and away from our
906 old custom-built equivalents.
907 * Added support for repeated message fields in lite protos using implicit
908 weak fields. This is an experimental feature that allows the linker to
909 strip out more unused messages than previously was possible.
910 * Fixed SourceCodeInfo for interpreted options and extension range options.
911 * Fixed always_print_enums_as_ints option for JSON serialization.
912 * Added support for ignoring unknown enum values when parsing JSON.
913 * Create std::string in Arena memory.
914 * Fixed ValidateDateTime to correctly check the day.
915 * Fixed bug in ZeroCopyStreamByteSink.
916 * Various other cleanups and fixes.
917
918 Java
919 * Dropped support for Java 6.
920 * Added a UTF-8 decoder that uses Unsafe to directly decode a byte buffer.
921 * Added deprecation annotations to generated code for deprecated oneof
922 fields.
923 * Fixed map field serialization in DynamicMessage.
924 * Cleanup and documentation for Java Lite runtime.
925 * Various other fixes and cleanups
926 * Fixed unboxed arraylists to handle an edge case
927 * Improved performance for copying between unboxed arraylists
928 * Fixed lite protobuf to avoid Java compiler warnings
929 * Improved test coverage for lite runtime
930 * Performance improvements for lite runtime
931
932 Python
933 * Fixed bytes/string map key incompatibility between C++ and pure-Python
934 implementations (issue #4029)
935 * Added __init__.py files to compiler and util subpackages
936 * Use /MT for all Windows versions
937 * Fixed an issue affecting the Python-C++ implementation when used with
938 Cython (issue #2896)
939 * Various text format fixes
940 * Various fixes to resolve behavior differences between the pure-Python and
941 Python-C++ implementations
942
943 PHP
944 * Added php_metadata_namespace to control the file path of generated metadata
945 file.
946 * Changed generated classes of nested message/enum. E.g., Foo.Bar, which
947 previously generates Foo_Bar, now generates Foo/Bar
948 * Added array constructor. When creating a message, users can pass a php
949 array whose content is field name to value pairs into constructor. The
950 created message will be initialized according to the array. Note that
951 message field should use a message value instead of a sub-array.
952 * Various bug fixes.
953
954 Objective-C
955 * We removed some helper class methods from GPBDictionary to shrink the size
956 of the library, the functionary is still there, but you may need to do some
957 specific +alloc / -init… methods instead.
958 * Minor improvements in the performance of object field getters/setters by
959 avoiding some memory management overhead.
960 * Fix a memory leak during the raising of some errors.
961 * Make header importing completely order independent.
962 * Small code improvements for things the undefined behaviors compiler option
963 was flagging.
964
965 Ruby
966 * Added ruby_package file option to control the module of generated class.
967 * Various bug fixes.
968
969 Javascript
970 * Allow setting string to int64 field.
971
972 Csharp
973 * Unknown fields are now parsed and then sent back on the wire. They can be
974 discarded at parse time via a CodedInputStream option.
975 * Movement towards working with .NET 3.5 and Unity
976 * Expression trees are no longer used
977 * AOT generics issues in Unity/il2cpp have a workaround (see this commit for
978 details)
979 * Floating point values are now compared bitwise (affects NaN value
980 comparisons)
981 * The default size limit when parsing is now 2GB rather than 64MB
982 * MessageParser now supports parsing from a slice of a byte array
983 * JSON list parsing now accepts null values where the underlying proto
984 representation does
985
Jisi Liu7bf1e192017-12-20 10:59:22 -08009862017-12-20 version 3.5.1 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)
Jisi Liu7bd16062017-12-19 11:28:30 -0800987 Planned Future Changes
988 * Make C++ implementation C++11 only: we plan to require C++11 to build
989 protobuf code starting from 3.6.0 release. Please join this github issue:
Feng Xiaoafe98de2018-08-22 11:55:30 -0700990 https://github.com/protocolbuffers/protobuf/issues/2780 to provide your feedback.
Jisi Liu7bd16062017-12-19 11:28:30 -0800991
Jisi Liu62616e12017-12-19 15:22:18 -0800992 protoc
993 * Fixed a bug introduced in 3.5.0 and protoc in Windows now accepts non-ascii
994 characters in paths again.
995
Jisi Liu7bd16062017-12-19 11:28:30 -0800996 C++
Jisi Liu62616e12017-12-19 15:22:18 -0800997 * Removed several usages of C++11 features in the code base.
Jisi Liu7bd16062017-12-19 11:28:30 -0800998 * Fixed some compiler warnings.
999
1000 PHP
1001 * Fixed memory leak in C-extension implementation.
1002 * Added discardUnknokwnFields API.
Brian Wignalla104dff2020-01-08 13:18:20 -05001003 * Removed duplicated typedef in C-extension headers.
Jisi Liu7bd16062017-12-19 11:28:30 -08001004 * Avoided calling private php methods (timelib_update_ts).
1005 * Fixed Any.php to use fully-qualified name for DescriptorPool.
1006
1007 Ruby
1008 * Added Google_Protobuf_discard_unknown for discarding unknown fields in
1009 messages.
1010
1011 C#
1012 * Unknown fields are now preserved by default.
Jisi Liu62616e12017-12-19 15:22:18 -08001013 * Floating point values are now bitwise compared, affecting message equality
1014 check and Contains() API in map and repeated fields.
Jisi Liu7bd16062017-12-19 11:28:30 -08001015
1016
Jisi Liu44935952017-11-13 10:47:48 -080010172017-11-13 version 3.5.0 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)
Jisi Liuce2d5282017-11-08 13:50:25 -08001018 Planned Future Changes
1019 * Make C++ implementation C++11 only: we plan to require C++11 to build
1020 protobuf code starting from 3.6.0 release. Please join this github issue:
Feng Xiaoafe98de2018-08-22 11:55:30 -07001021 https://github.com/protocolbuffers/protobuf/issues/2780 to provide your feedback.
Jisi Liuce2d5282017-11-08 13:50:25 -08001022
1023 General
1024 * Unknown fields are now preserved in proto3 for most of the language
1025 implementations for proto3 by default. See the per-language section for
1026 details.
1027 * reserve keyword are now supported in enums
1028
1029 C++
1030 * Proto3 messages are now preserving unknown fields by default. If you rely on
1031 unknowns fields being dropped. Please use DiscardUnknownFields() explicitly.
1032 * Deprecated the unsafe_arena_release_* and unsafe_arena_add_allocated_*
1033 methods for string fields.
1034 * Added move constructor and move assignment to RepeatedField,
1035 RepeatedPtrField and google::protobuf::Any.
1036 * Added perfect forwarding in Arena::CreateMessage
1037 * In-progress experimental support for implicit weak fields with lite protos.
1038 This feature allows the linker to strip out more unused messages and reduce
1039 binary size.
1040 * Various performance optimizations.
1041
1042 Java
1043 * Proto3 messages are now preserving unknown fields by default. If you’d like
Jisi Liu44935952017-11-13 10:47:48 -08001044 to drop unknown fields, please use the DiscardUnknownFieldsParser API. For
Jisi Liuce2d5282017-11-08 13:50:25 -08001045 example:
Jisi Liu8a3c5cc2017-11-08 13:55:55 -08001046 Parser<Foo> parser = DiscardUnknownFieldsParser.wrap(Foo.parser());
1047 Foo foo = parser.parseFrom(input);
Jisi Liuce2d5282017-11-08 13:50:25 -08001048 * Added a new CodedInputStream decoder for Iterable<ByteBuffer> with direct
1049 ByteBuffers.
1050 * TextFormat now prints unknown length-delimited fields as messages if
1051 possible.
1052 * FieldMaskUtil.merge() no longer creates unnecessary empty messages when a
1053 message field is unset in both source message and destination message.
1054 * Various performance optimizations.
1055
1056 Python
1057 * Proto3 messages are now preserving unknown fields by default. Use
1058 message.DiscardUnknownFields() to drop unknown fields.
1059 * Add FieldDescriptor.file in generated code.
1060 * Add descriptor pool FindOneofByName in pure python.
1061 * Change unknown enum values into unknown field set .
1062 * Add more Python dict/list compatibility for Struct/ListValue.
1063 * Add utf-8 support for text_format.Merge()/Parse().
1064 * Support numeric unknown enum values for proto3 JSON format.
1065 * Add warning for Unexpected end-group tag in cpp extension.
1066
1067 PHP
1068 * Proto3 messages are now preserving unknown fields.
1069 * Provide well known type messages in runtime.
1070 * Add prefix ‘PB’ to generated class of reserved names.
1071 * Fixed all conformance tests for encode/decode json in php runtime. C
1072 extension needs more work.
1073
1074 Objective-C
1075 * Fixed some issues around copying of messages with unknown fields and then
1076 mutating the unknown fields in the copy.
1077
1078 C#
1079 * Added unknown field support in JsonParser.
1080 * Fixed oneof message field merge.
Jan Tattermusch07df2302017-11-10 18:37:33 +01001081 * Simplify parsing messages from array slices.
Jisi Liuce2d5282017-11-08 13:50:25 -08001082
1083 Ruby
1084 * Unknown fields are now preserved by default.
1085 * Fixed several bugs for segment fault.
1086
1087 Javascript
1088 * Decoder can handle both paced and unpacked data no matter how the proto is
1089 defined.
1090 * Decoder now accept long varint for 32 bit integers.
1091
1092
Jisi Liu3ae8c4c2017-08-14 14:32:48 -070010932017-08-14 version 3.4.0 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)
Jisi Liu8a5208f2017-08-01 15:47:26 -07001094 Planned Future Changes
1095 * There are some changes that are not included in this release but are planned
1096 for the near future
1097 - Preserve unknown fields in proto3: We are going to bring unknown fields
1098 back into proto3. In this release, some languages start to support
1099 preserving unknown fields in proto3, controlled by flags/options. Some
Jisi Liu3ae8c4c2017-08-14 14:32:48 -07001100 languages also introduce explicit APIs to drop unknown fields for
Jisi Liu8a5208f2017-08-01 15:47:26 -07001101 migration. Please read the change log sections by languages for details.
1102 For general timeline and plan:
1103
1104 https://docs.google.com/document/d/1KMRX-G91Aa-Y2FkEaHeeviLRRNblgIahbsk4wA14gRk/view
1105
1106 For issues and discussions:
1107
Feng Xiaoafe98de2018-08-22 11:55:30 -07001108 https://github.com/protocolbuffers/protobuf/issues/272
Jisi Liu8a5208f2017-08-01 15:47:26 -07001109
1110 - Make C++ implementation C++11 only: we plan to require C++11 to build
1111 protobuf code starting from 3.5.0 or 3.6.0 release, after unknown fields
1112 semantic changes are finished. Please join this
1113 github issue:
1114
Feng Xiaoafe98de2018-08-22 11:55:30 -07001115 https://github.com/protocolbuffers/protobuf/issues/2780
Jisi Liu8a5208f2017-08-01 15:47:26 -07001116
1117 to provide your feedback.
1118
1119 General
1120 * Extension ranges now accept options and are customizable.
1121 * "reserve" keyword now supports “max” in field number ranges,
1122 e.g. reserve 1000 to max;
1123
1124 C++
1125 * Proto3 messages are now able to preserve unknown fields. The default
1126 behavior is still to drop unknowns, which will be flipped in a future
1127 release. If you rely on unknowns fields being dropped. Please use
Jisi Liu39a91d32017-08-03 11:15:47 -07001128 Message::DiscardUnknownFields() explicitly.
Jisi Liu8a5208f2017-08-01 15:47:26 -07001129 * Packable proto3 fields are now packed by default in serialization.
1130 * Following C++11 features are introduced when C++11 is available:
1131 - move-constructor and move-assignment are introduced to messages
1132 - Repeated fields constructor now takes std::initializer_list
1133 - rvalue setters are introduced for string fields
1134 * Experimental Table-Driven parsing and serialization available to test. To
1135 enable it, pass in table_driven_parsing table_driven_serialization protoc
1136 generator flags for C++
1137
1138 $ protoc --cpp_out=table_driven_parsing,table_driven_serialization:./ \
1139 test.proto
Jisi Liu3ae8c4c2017-08-14 14:32:48 -07001140
Jisi Liu8a5208f2017-08-01 15:47:26 -07001141 * lite generator parameter supported by the generator. Once set, all generated
1142 files, use lite runtime regardless of the optimizer_for setting in the
1143 .proto file.
1144 * Various optimizations to make C++ code more performant on PowerPC platform
1145 * Fixed maps data corruption when the maps are modified by both reflection API
1146 and generated API.
1147 * Deterministic serialization on maps reflection now uses stable sort.
1148 * file() accessors are introduced to various *Descriptor classes to make
1149 writing template function easier.
1150 * ByteSize() and SpaceUsed() are deprecated.Use ByteSizeLong() and
1151 SpaceUsedLong() instead
1152 * Consistent hash function is used for maps in DEBUG and NDEBUG build.
1153 * "using namespace std" is removed from stubs/common.h
1154 * Various performance optimizations and bug fixes
1155
1156 Java
1157 * Introduced new parser API DiscardUnknownFieldsParser in preparation of
1158 proto3 unknown fields preservation change. Users who want to drop unknown
1159 fields should migrate to use this new parser API. For example:
1160
1161 Parser<Foo> parser = DiscardUnknownFieldsParser.wrap(Foo.parser());
1162 Foo foo = parser.parseFrom(input);
1163
1164 * Introduced new TextFormat API printUnicodeFieldValue() that prints field
1165 value without escaping unicode characters.
1166 * Added Durations.compare(Duration, Duration) and
1167 Timestamps.compare(Timestamp, Timestamp).
1168 * JsonFormat now accepts base64url encoded bytes fields.
1169 * Optimized CodedInputStream to do less copies when parsing large bytes
1170 fields.
1171 * Optimized TextFormat to allocate less memory when printing.
1172
1173 Python
1174 * SerializeToString API is changed to SerializeToString(self, **kwargs),
1175 deterministic parameter is accepted for deterministic serialization.
1176 * Added sort_keys parameter in json format to make the output deterministic.
1177 * Added indent parameter in json format.
1178 * Added extension support in json format.
1179 * Added __repr__ support for repeated field in cpp implementation.
1180 * Added file in FieldDescriptor.
1181 * Added pretty-print filter to text format.
1182 * Services and method descriptors are always printed even if generic_service
1183 option is turned off.
Jie Luod1484cd2017-08-16 14:40:59 -07001184 * Note: AppEngine 2.5 is deprecated on June 2017 that AppEngine 2.5 will
1185 never update protobuf runtime. Users who depend on AppEngine 2.5 should use
1186 old protoc.
Jisi Liu44935952017-11-13 10:47:48 -08001187
Jisi Liu8a5208f2017-08-01 15:47:26 -07001188 PHP
1189 * Support PHP generic services. Specify file option php_generic_service=true
1190 to enable generating service interface.
1191 * Message, repeated and map fields setters take value instead of reference.
1192 * Added map iterator in c extension.
1193 * Support json  encode/decode.
1194 * Added more type info in getter/setter phpdoc
1195 * Fixed the problem that c extension and php implementation cannot be used
1196 together.
1197 * Added file option php_namespace to use custom php namespace instead of
1198 package.
1199 * Added fluent setter.
1200 * Added descriptor API in runtime for custom encode/decode.
1201 * Various bug fixes.
1202
1203 Objective-C
1204 * Fix for GPBExtensionRegistry copying and add tests.
1205 * Optimize GPBDictionary.m codegen to reduce size of overall library by 46K
1206 per architecture.
1207 * Fix some cases of reading of 64bit map values.
1208 * Properly error on a tag with field number zero.
1209 * Preserve unknown fields in proto3 syntax files.
1210 * Document the exceptions on some of the writing apis.
1211
1212 C#
1213 * Implemented IReadOnlyDictionary<K,V> in MapField<K,V>
1214 * Added TryUnpack method for Any message in addition to Unpack.
1215 * Converted C# projects to MSBuild (csproj) format.
1216
1217 Ruby
1218 * Several bug fixes.
1219
1220 Javascript
1221 * Added support of field option js_type. Now one can specify the JS type of a
1222 64-bit integer field to be string in the generated code by adding option
1223 [jstype = JS_STRING] on the field.
1224
Feng Xiao80f0c0a2017-04-05 17:26:46 -070012252017-04-05 version 3.3.0 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)
1226 Planned Future Changes
1227 * There are some changes that are not included in this release but are
1228 planned for the near future:
1229 - Preserve unknown fields in proto3: please read this doc:
1230
1231 https://docs.google.com/document/d/1KMRX-G91Aa-Y2FkEaHeeviLRRNblgIahbsk4wA14gRk/view
1232
1233 for the timeline and follow up this github issue:
1234
Feng Xiaoafe98de2018-08-22 11:55:30 -07001235 https://github.com/protocolbuffers/protobuf/issues/272
Feng Xiao80f0c0a2017-04-05 17:26:46 -07001236
1237 for discussion.
1238 - Make C++ implementation C++11 only: we plan to require C++11 to build
1239 protobuf code starting from 3.4.0 or 3.5.0 release. Please join this
1240 github issue:
1241
Feng Xiaoafe98de2018-08-22 11:55:30 -07001242 https://github.com/protocolbuffers/protobuf/issues/2780
Feng Xiao80f0c0a2017-04-05 17:26:46 -07001243
1244 to provide your feedback.
1245
1246 C++
1247 * Fixed map fields serialization of DynamicMessage to correctly serialize
1248 both key and value regardless of their presence.
1249 * Parser now rejects field number 0 correctly.
1250 * New API Message::SpaceUsedLong() that’s equivalent to
1251 Message::SpaceUsed() but returns the value in size_t.
1252 * JSON support
1253 - New flag always_print_enums_as_ints in JsonPrintOptions.
1254 - New flag preserve_proto_field_names in JsonPrintOptions. It will instruct
1255 the JSON printer to use the original field name declared in the .proto
1256 file instead of converting them to lowerCamelCase when printing JSON.
1257 - JsonPrintOptions.always_print_primtive_fields now works for oneof message
1258 fields.
1259 - Fixed a bug that doesn’t allow different fields to set the same json_name
1260 value.
1261 - Fixed a performance bug that causes excessive memory copy when printing
1262 large messages.
1263 * Various performance optimizations.
1264
1265 Java
1266 * Map field setters eagerly validate inputs and throw NullPointerExceptions
1267 as appropriate.
1268 * Added ByteBuffer overloads to the generated parsing methods and the Parser
1269 interface.
1270 * proto3 enum's getNumber() method now throws on UNRECOGNIZED values.
1271 * Output of JsonFormat is now locale independent.
1272
1273 Python
1274 * Added FindServiceByName() in the pure-Python DescriptorPool. This works only
1275 for descriptors added with DescriptorPool.Add(). Generated descriptor_pool
1276 does not support this yet.
1277 * Added a descriptor_pool parameter for parsing Any in text_format.Parse().
1278 * descriptor_pool.FindFileContainingSymbol() now is able to find nested
1279 extensions.
1280 * Extending empty [] to repeated field now sets parent message presence.
1281
1282 PHP
1283 * Added file option php_class_prefix. The prefix will be prepended to all
1284 generated classes defined in the file.
1285 * When encoding, negative int32 values are sign-extended to int64.
1286 * Repeated/Map field setter accepts a regular PHP array. Type checking is
1287 done on the array elements.
1288 * encode/decode are renamed to serializeToString/mergeFromString.
1289 * Added mergeFrom, clear method on Message.
1290 * Fixed a bug that oneof accessor didn’t return the field name that is
1291 actually set.
1292 * C extension now works with php7.
1293 * This is the first GA release of PHP. We guarantee that old generated code
1294 can always work with new runtime and new generated code.
1295
1296 Objective-C
1297 * Fixed help for GPBTimestamp for dates before the epoch that contain
1298 fractional seconds.
1299 * Added GPBMessageDropUnknownFieldsRecursively() to remove unknowns from a
1300 message and any sub messages.
1301 * Addressed a threading race in extension registration/lookup.
1302 * Increased the max message parsing depth to 100 to match the other languages.
1303 * Removed some use of dispatch_once in favor of atomic compare/set since it
1304 needs to be heap based.
1305 * Fixes for new Xcode 8.3 warnings.
1306
1307 C#
1308 * Fixed MapField.Values.CopyTo, which would throw an exception unnecessarily
1309 if provided exactly the right size of array to copy to.
1310 * Fixed enum JSON formatting when multiple names mapped to the same numeric
1311 value.
1312 * Added JSON formatting option to format enums as integers.
1313 * Modified RepeatedField<T> to implement IReadOnlyList<T>.
1314 * Introduced the start of custom option handling; it's not as pleasant as it
1315 might be, but the information is at least present. We expect to extend code
1316 generation to improve this in the future.
1317 * Introduced ByteString.FromStream and ByteString.FromStreamAsync to
1318 efficiently create a ByteString from a stream.
1319 * Added whole-message deprecation, which decorates the class with [Obsolete].
1320
1321 Ruby
1322 * Fixed Message#to_h for messages with map fields.
1323 * Fixed memcpy() in binary gems to work for old glibc, without breaking the
1324 build for non-glibc libc’s like musl.
1325
1326 Javascript
1327 * Added compatibility tests for version 3.0.0.
1328 * Added conformance tests.
1329 * Fixed serialization of extensions: we need to emit a value even if it is
1330 falsy (like the number 0).
1331 * Use closurebuilder.py in favor of calcdeps.py for compiling JavaScript.
1332
Paul Yang7f3e2372017-01-31 09:17:32 -080013332017-01-23 version 3.2.0 (C++/Java/Python/PHP/Ruby/Objective-C/C#/JavaScript/Lite)
1334 General
1335 * Added protoc version number to protoc plugin protocol. It can be used by
1336 protoc plugin to detect which version of protoc is used with the plugin and
1337 mitigate known problems in certain version of protoc.
1338
1339 C++
1340 * The default parsing byte size limit has been raised from 64MB to 2GB.
1341 * Added rvalue setters for non-arena string fields.
1342 * Enabled debug logging for Android.
1343 * Fixed a double-free problem when using Reflection::SetAllocatedMessage()
1344 with extension fields.
1345 * Fixed several deterministic serialization bugs:
1346 * MessageLite::SerializeAsString() now respects the global deterministic
1347 serialization flag.
1348 * Extension fields are serialized deterministically as well. Fixed protocol
1349 compiler to correctly report importing-self as an error.
1350 * Fixed FileDescriptor::DebugString() to print custom options correctly.
1351 * Various performance/codesize optimizations and cleanups.
1352
1353 Java
1354 * The default parsing byte size limit has been raised from 64MB to 2GB.
1355 * Added recursion limit when parsing JSON.
1356 * Fixed a bug that enumType.getDescriptor().getOptions() doesn't have custom
1357 options.
1358 * Fixed generated code to support field numbers up to 2^29-1.
1359
1360 Python
1361 * You can now assign NumPy scalars/arrays (np.int32, np.int64) to protobuf
1362 fields, and assigning other numeric types has been optimized for
1363 performance.
1364 * Pure-Python: message types are now garbage-collectable.
1365 * Python/C++: a lot of internal cleanup/refactoring.
1366
1367 PHP (Alpha)
1368 * For 64-bit integers type (int64/uint64/sfixed64/fixed64/sint64), use PHP
1369 integer on 64-bit environment and PHP string on 32-bit environment.
1370 * PHP generated code also conforms to PSR-4 now.
1371 * Fixed ZTS build for c extension.
1372 * Fixed c extension build on Mac.
1373 * Fixed c extension build on 32-bit linux.
1374 * Fixed the bug that message without namespace is not found in the descriptor
1375 pool. (#2240)
1376 * Fixed the bug that repeated field is not iterable in c extension.
1377 * Message names Empty will be converted to GPBEmpty in generated code.
1378 * Added phpdoc in generated files.
1379 * The released API is almost stable. Unless there is large problem, we won't
1380 change it. See
1381 https://developers.google.com/protocol-buffers/docs/reference/php-generated
1382 for more details.
1383
1384 Objective-C
1385 * Added support for push/pop of the stream limit on CodedInputStream for
1386 anyone doing manual parsing.
1387
1388 C#
1389 * No changes.
1390
1391 Ruby
1392 * Message objects now support #respond_to? for field getters/setters.
1393 * You can now compare “message == non_message_object” and it will return false
1394 instead of throwing an exception.
1395 * JRuby: fixed #hashCode to properly reflect the values in the message.
1396
1397 Javascript
1398 * Deserialization of repeated fields no longer has quadratic performance
1399 behavior.
1400 * UTF-8 encoding/decoding now properly supports high codepoints.
1401 * Added convenience methods for some well-known types: Any, Struct, and
1402 Timestamp. These make it easier to convert data between native JavaScript
1403 types and the well-known protobuf types.
1404
Paul Yang17cc42a2016-09-23 18:33:25 -070014052016-09-23 version 3.1.0 (C++/Java/Python/PHP/Ruby/Objective-C/C#/JavaScript/Lite)
1406 General
1407 * Proto3 support in PHP (alpha).
1408 * Various bug fixes.
1409
1410 C++
1411 * Added MessageLite::ByteSizeLong() that’s equivalent to
1412 MessageLite::ByteSize() but returns the value in size_t. Useful to check
1413 whether a message is over the 2G size limit that protobuf can support.
1414 * Moved default_instances to global variables. This allows default_instance
1415 addresses to be known at compile time.
1416 * Adding missing generic gcc 64-bit atomicops.
1417 * Restore New*Callback into google::protobuf namespace since these are used
1418 by the service stubs code
1419 * JSON support.
1420 * Fixed some conformance issues.
1421 * Fixed a JSON serialization bug for bytes fields.
1422
1423 Java
1424 * Fixed a bug in TextFormat that doesn’t accept empty repeated fields (i.e.,
1425 “field: [ ]”).
1426 * JSON support
1427 * Fixed JsonFormat to do correct snake_case-to-camelCase conversion for
1428 non-style-conforming field names.
1429 * Fixed JsonFormat to parse empty Any message correctly.
1430 * Added an option to JsonFormat.Parser to ignore unknown fields.
1431 * Experimental API
1432 * Added UnsafeByteOperations.unsafeWrap(byte[]) to wrap a byte array into
1433 ByteString without copy.
1434
1435 Python
1436 * JSON support
1437 * Fixed some conformance issues.
1438
1439 PHP (Alpha)
1440 * We have added the proto3 support for PHP via both a pure PHP package and a
1441 native c extension. The pure PHP package is intended to provide usability
1442 to wider range of PHP platforms, while the c extension is intended to
1443 provide higher performance. Both implementations provide the same runtime
1444 APIs and share the same generated code. Users don’t need to re-generate
1445 code for the same proto definition when they want to switch the
1446 implementation later. The pure PHP package is included in the php/src
Paul Yang7f3e2372017-01-31 09:17:32 -08001447 directory, and the c extension is included in the php/ext directory.
1448
Paul Yang17cc42a2016-09-23 18:33:25 -07001449 Both implementations provide idiomatic PHP APIs:
1450 * All messages and enums are defined as PHP classes.
1451 * All message fields can only be accessed via getter/setter.
1452 * Both repeated field elements and map elements are stored in containers
1453 that act like a normal PHP array.
Paul Yang7f3e2372017-01-31 09:17:32 -08001454
Paul Yang17cc42a2016-09-23 18:33:25 -07001455 Unlike several existing third-party PHP implementations for protobuf, our
1456 implementations are built on a "strongly-typed" philosophy: message fields
1457 and array/map containers will throw exceptions eagerly when values of the
1458 incorrect type (not including those that can be type converted, e.g.,
1459 double <-> integer <-> numeric string) are inserted.
Paul Yang7f3e2372017-01-31 09:17:32 -08001460
Paul Yang17cc42a2016-09-23 18:33:25 -07001461 Currently, pure PHP runtime supports php5.5, 5.6 and 7 on linux. C
1462 extension runtime supports php5.5 and 5.6 on linux.
Paul Yang7f3e2372017-01-31 09:17:32 -08001463
Paul Yang17cc42a2016-09-23 18:33:25 -07001464 See php/README.md for more details about installment. See
1465 https://developers.google.com/protocol-buffers/docs/phptutorial for more
1466 details about APIs.
1467
1468 Objective-C
Benjamin Peterson5939bc32019-03-21 12:31:41 -07001469 * Helpers are now provided for working the Any well known type (see
Paul Yang17cc42a2016-09-23 18:33:25 -07001470 GPBWellKnownTypes.h for the api additions).
1471 * Some improvements in startup code (especially when extensions aren’t used).
1472
1473 Javascript
1474 * Fixed missing import of jspb.Map
1475 * Fixed valueWriterFn variable name
1476
1477 Ruby
1478 * Fixed hash computation for JRuby's RubyMessage
1479 * Make sure map parsing frames are GC-rooted.
1480 * Added API support for well-known types.
1481
1482 C#
1483 * Removed check on dependency in the C# reflection API.
1484
Jisi Liue298ce52016-09-06 14:37:35 -070014852016-09-06 version 3.0.2 (C++/Java/Python/Ruby/Objective-C/C#/JavaScript/Lite)
Jisi Liu4041ed42016-09-02 11:24:58 -07001486 General
1487 * Various bug fixes.
1488
1489 Objective C
1490 * Fix for oneofs in proto3 syntax files where fields were set to the zero
1491 value.
1492 * Fix for embedded null character in strings.
1493 * CocoaDocs support
1494
1495 Ruby
Jisi Liu0c9999f2016-09-02 11:40:58 -07001496 * Fixed memory corruption bug in parsing that could occur under GC pressure.
Jisi Liu4041ed42016-09-02 11:24:58 -07001497
1498 Javascript
Jisi Liu0c9999f2016-09-02 11:40:58 -07001499 * jspb.Map is now properly exported to CommonJS modules.
1500
1501 C#
1502 * Removed legacy_enum_values flag.
1503
Jisi Liu4041ed42016-09-02 11:24:58 -07001504
Jisi Liue0d817e2016-07-27 12:08:01 -070015052016-07-27 version 3.0.0 (C++/Java/Python/Ruby/Objective-C/C#/JavaScript/Lite)
1506 General
1507 * This log only contains changes since the beta-4 release. Summarized change
1508 log since the last stable release (v2.6.1) can be found in the github
1509 release page.
1510
1511 Compatibility Notice
1512 * v3.0.0 is the first API stable release of the v3.x series. We do not expect
1513 any future API breaking changes.
1514 * For C++, Java Lite and Objective-C, source level compatibility is
1515 guaranteed. Upgrading from v3.0.0 to newer minor version releases will be
1516 source compatible. For example, if your code compiles against protobuf
1517 v3.0.0, it will continue to compile after you upgrade protobuf library to
1518 v3.1.0.
1519 * For other languages, both source level compatibility and binary level
1520 compatibility are guaranteed. For example, if you have a Java binary built
1521 against protobuf v3.0.0. After switching the protobuf runtime binary to
1522 v3.1.0, your built binary should continue to work.
1523 * Compatibility is only guaranteed for documented API and documented
1524 behaviors. If you are using undocumented API (e.g., use anything in the C++
1525 internal namespace), it can be broken by minor version releases in an
1526 undetermined manner.
1527
1528 Ruby
1529 * When you assign a string field `a.string_field = "X"`, we now call
1530 #encode(UTF-8) on the string and freeze the copy. This saves you from
1531 needing to ensure the string is already encoded as UTF-8. It also prevents
1532 you from mutating the string after it has been assigned (this is how we
1533 ensure it stays valid UTF-8).
1534 * The generated file for `foo.proto` is now `foo_pb.rb` instead of just
1535 `foo.rb`. This makes it easier to see which imports/requires are from
1536 protobuf generated code, and also prevents conflicts with any `foo.rb` file
1537 you might have written directly in Ruby. It is a backward-incompatible
1538 change: you will need to update all of your `require` statements.
1539 * For package names like `foo_bar`, we now translate this to the Ruby module
1540 `FooBar`. This is more idiomatic Ruby than what we used to do (`Foo_bar`).
1541
1542 JavaScript
1543 * Scalar fields like numbers and boolean now return defaults instead of
1544 `undefined` or `null` when they are unset. You can test for presence
1545 explicitly by calling `hasFoo()`, which we now generate for scalar fields.
1546
1547 Java Lite
1548 * Java Lite is now implemented as a separate plugin, maintained in the
1549 `javalite` branch. Both lite runtime and protoc artifacts will be available
1550 in Maven.
1551
1552 C#
1553 * Target platforms now .NET 4.5, selected portable subsets and .NET Core.
1554 * legacy_enum_values option is no longer supported.
1555
Feng Xiao1349fb82016-07-15 12:19:15 -070015562016-07-15 version 3.0.0-beta-4 (C++/Java/Python/Ruby/Objective-C/C#/JavaScript)
1557 General
Feng Xiao82b43d12016-07-18 10:36:04 -07001558 * Added a deterministic serialization API for C++. The deterministic
Feng Xiao1349fb82016-07-15 12:19:15 -07001559 serialization guarantees that given a binary, equal messages will be
1560 serialized to the same bytes. This allows applications like MapReduce to
1561 group equal messages based on the serialized bytes. The deterministic
1562 serialization is, however, NOT canonical across languages; it is also
1563 unstable across different builds with schema changes due to unknown fields.
1564 Users who need canonical serialization, e.g. persistent storage in a
1565 canonical form, fingerprinting, etc, should define their own
1566 canonicalization specification and implement the serializer using reflection
1567 APIs rather than relying on this API.
1568 * Added OneofOptions. You can now define custom options for oneof groups.
1569 import "google/protobuf/descriptor.proto";
1570 extend google.protobuf.OneofOptions {
1571 optional int32 my_oneof_extension = 12345;
1572 }
1573 message Foo {
1574 oneof oneof_group {
1575 (my_oneof_extension) = 54321;
1576 ...
1577 }
1578 }
1579
1580 C++ (beta)
1581 * Introduced a deterministic serialization API in
1582 CodedOutputStream::SetSerializationDeterministic(bool). See the notes about
1583 deterministic serialization in the General section.
1584 * Added google::protobuf::Map::swap() to swap two map fields.
1585 * Fixed a memory leak when calling Reflection::ReleaseMessage() on a message
1586 allocated on arena.
1587 * Improved error reporting when parsing text format protos.
1588 * JSON
1589 - Added a new parser option to ignore unknown fields when parsing JSON.
1590 - Added convenient methods for message to/from JSON conversion.
1591 * Various performance optimizations.
1592
1593 Java (beta)
Feng Xiao1349fb82016-07-15 12:19:15 -07001594 * File option "java_generate_equals_and_hash" is now deprecated. equals() and
1595 hashCode() methods are generated by default.
1596 * Added a new JSON printer option "omittingInsignificantWhitespace" to produce
1597 a more compact JSON output. The printer will pretty-print by default.
1598 * Updated Java runtime to be compatible with 2.5.0/2.6.1 generated protos.
1599
1600 Python (beta)
1601 * Added support to pretty print Any messages in text format.
1602 * Added a flag to ignore unknown fields when parsing JSON.
1603 * Bugfix: "@type" field of a JSON Any message is now correctly put before
1604 other fields.
1605
1606 Objective-C (beta)
1607 * Updated the code to support compiling with more compiler warnings
1608 enabled. (Issue 1616)
1609 * Exposing more detailed errors for parsing failures. (PR 1623)
1610 * Small (breaking) change to the naming of some methods on the support classes
1611 for map<>. There were collisions with the system provided KVO support, so
1612 the names were changed to avoid those issues. (PR 1699)
1613 * Fixed for proper Swift bridging of error handling during parsing. (PR 1712)
1614 * Complete support for generating sources that will go into a Framework and
1615 depend on generated sources from other Frameworks. (Issue 1457)
1616
1617 C# (beta)
1618 * RepeatedField optimizations.
1619 * Support for .NET Core.
1620 * Minor bug fixes.
1621 * Ability to format a single value in JsonFormatter (advanced usage only).
1622 * Modifications to attributes applied to generated code.
1623
1624 Javascript (alpha)
1625 * Maps now have a real map API instead of being treated as repeated fields.
1626 * Well-known types are now provided in the google-protobuf package, and the
1627 code generator knows to require() them from that package.
1628 * Bugfix: non-canonical varints are correctly decoded.
1629
1630 Ruby (alpha)
1631 * Accessors for oneof fields now return default values instead of nil.
1632
Feng Xiao3d9726f2016-07-15 15:26:44 -07001633 Java Lite
1634 * Java lite support is removed from protocol compiler. It will be supported
1635 as a protocol compiler plugin in a separate code branch.
1636
Jisi Liu0ec34bf2016-05-16 11:20:33 -070016372016-05-16 version 3.0.0-beta-3 (C++/Java/Python/Ruby/Nano/Objective-C/C#/JavaScript)
Jisi Liu0e4d1ea2016-05-10 17:32:35 -07001638 General
1639 * Supported Proto3 lite-runtime in C++/Java for mobile platforms.
1640 * Any type now supports APIs to specify prefixes other than
1641 type.googleapis.com
Jisi Liu0ec34bf2016-05-16 11:20:33 -07001642 * Removed javanano_use_deprecated_package option; Nano will always has its own
1643 ".nano" package.
Jisi Liu0e4d1ea2016-05-10 17:32:35 -07001644
1645 C++ (Beta)
Jisi Liu034867f2016-05-13 16:16:14 -07001646 * Improved hash maps.
1647 - Improved hash maps comments. In particular, please note that equal hash
1648 maps will not necessarily have the same iteration order and
1649 serialization.
1650 - Added a new hash maps implementation that will become the default in a
1651 later release.
Jisi Liu0e4d1ea2016-05-10 17:32:35 -07001652 * Arenas
1653 - Several inlined methods in Arena were moved to out-of-line to improve
1654 build performance and code size.
1655 - Added SpaceAllocatedAndUsed() to report both space used and allocated
1656 - Added convenient class UnsafeArenaAllocatedRepeatedPtrFieldBackInserter
1657 * Any
Jisi Liuede9cc42016-05-11 15:30:21 -07001658 - Allow custom type URL prefixes in Any packing.
Jisi Liu0e4d1ea2016-05-10 17:32:35 -07001659 - TextFormat now expand the Any type rather than printing bytes.
1660 * Performance optimizations and various bug fixes.
1661
1662 Java (Beta)
1663 * Introduced an ExperimentalApi annotation. Annotated APIs are experimental
1664 and are subject to change in a backward incompatible way in future releases.
Jisi Liuede9cc42016-05-11 15:30:21 -07001665 * Introduced zero-copy serialization as an ExperimentalApi
1666 - Introduction of the `ByteOutput` interface. This is similar to
1667 `OutputStream` but provides semantics for lazy writing (i.e. no
1668 immediate copy required) of fields that are considered to be immutable.
1669 - `ByteString` now supports writing to a `ByteOutput`, which will directly
1670 expose the internals of the `ByteString` (i.e. `byte[]` or `ByteBuffer`)
1671 to the `ByteOutput` without copying.
1672 - `CodedOutputStream` now supports writing to a `ByteOutput`. `ByteString`
1673 instances that are too large to fit in the internal buffer will be
1674 (lazily) written to the `ByteOutput` directly.
1675 - This allows applications using large `ByteString` fields to avoid
1676 duplication of these fields entirely. Such an application can supply a
1677 `ByteOutput` that chains together the chunks received from
1678 `CodedOutputStream` before forwarding them onto the IO system.
1679 * Other related changes to `CodedOutputStream`
1680 - Additional use of `sun.misc.Unsafe` where possible to perform fast
1681 access to `byte[]` and `ByteBuffer` values and avoiding unnecessary
1682 range checking.
1683 - `ByteBuffer`-backed `CodedOutputStream` now writes directly to the
1684 `ByteBuffer` rather than to an intermediate array.
Jisi Liu0ec34bf2016-05-16 11:20:33 -07001685 * Improved lite-runtime.
1686 - Lite protos now implement deep equals/hashCode/toString
1687 - Significantly improved the performance of Builder#mergeFrom() and
1688 Builder#mergeDelimitedFrom()
Jisi Liu0e4d1ea2016-05-10 17:32:35 -07001689 * Various bug fixes and small feature enhancement.
1690 - Fixed stack overflow when in hashCode() for infinite recursive oneofs.
1691 - Fixed the lazy field parsing in lite to merge rather than overwrite.
1692 - TextFormat now supports reporting line/column numbers on errors.
Jisi Liu0ec34bf2016-05-16 11:20:33 -07001693 - Updated to add appropriate @Override for better compiler errors.
Jisi Liu0e4d1ea2016-05-10 17:32:35 -07001694
1695 Python (Beta)
Jie Luoe4ca6942016-05-11 16:39:50 -07001696 * Added JSON format for Any, Struct, Value and ListValue
1697 * [ ] is now accepted for both repeated scalar fields and repeated message
1698 fields in text format parser.
1699 * Numerical field name is now supported in text format.
1700 * Added DiscardUnknownFields API for python protobuf message.
Jisi Liu0e4d1ea2016-05-10 17:32:35 -07001701
1702 Objective-C (Beta)
Jisi Liuede9cc42016-05-11 15:30:21 -07001703 * Proto comments now come over as HeaderDoc comments in the generated sources
1704 so Xcode can pick them up and display them.
1705 * The library headers have been updated to use HeaderDoc comments so Xcode can
1706 pick them up and display them.
1707 * The per message and per field overhead in both generated code and runtime
1708 object sizes was reduced.
1709 * Generated code now include deprecated annotations when the proto file
1710 included them.
Jisi Liu0e4d1ea2016-05-10 17:32:35 -07001711
1712 C# (Beta)
Jisi Liuede9cc42016-05-11 15:30:21 -07001713 In general: some changes are breaking, which require regenerating messages.
1714 Most user-written code will not be impacted *except* for the renaming of enum
1715 values.
1716
1717 * Allow custom type URL prefixes in `Any` packing, and ignore them when
1718 unpacking
1719 * `protoc` is now in a separate NuGet package (Google.Protobuf.Tools)
1720 * New option: `internal_access` to generate internal classes
1721 * Enum values are now PascalCased, and if there's a prefix which matches the
1722 name of the enum, that is removed (so an enum `COLOR` with a value
1723 `COLOR_BLUE` would generate a value of just `Blue`). An option
1724 (`legacy_enum_values`) is temporarily available to disable this, but the
1725 option will be removed for GA.
1726 * `json_name` option is now honored
1727 * If group tags are encountered when parsing, they are validated more
1728 thoroughly (although we don't support actual groups)
1729 * NuGet dependencies are better specified
1730 * Breaking: `Preconditions` is renamed to `ProtoPreconditions`
1731 * Breaking: `GeneratedCodeInfo` is renamed to `GeneratedClrTypeInfo`
1732 * `JsonFormatter` now allows writing to a `TextWriter`
1733 * New interface, `ICustomDiagnosticMessage` to allow more compact
1734 representations from `ToString`
1735 * `CodedInputStream` and `CodedOutputStream` now implement `IDisposable`,
1736 which simply disposes of the streams they were constructed with
1737 * Map fields no longer support null values (in line with other languages)
1738 * Improvements in JSON formatting and parsing
Jisi Liu0e4d1ea2016-05-10 17:32:35 -07001739
1740 Javascript (Alpha)
Josh Habermand346f492016-05-12 17:55:56 -07001741 * Better support for "bytes" fields: bytes fields can be read as either a
1742 base64 string or UInt8Array (in environments where TypedArray is supported).
1743 * New support for CommonJS imports. This should make it easier to use the
1744 JavaScript support in Node.js and tools like WebPack. See js/README.md for
1745 more information.
1746 * Some significant internal refactoring to simplify and modularize the code.
1747
1748 Ruby (Alpha)
1749 * JSON serialization now properly uses camelCased names, with a runtime option
1750 that will preserve original names from .proto files instead.
1751 * Well-known types are now included in the distribution.
1752 * Release now includes binary gems for Windows, Mac, and Linux instead of just
1753 source gems.
1754 * Bugfix for serializing oneofs.
Jisi Liu0e4d1ea2016-05-10 17:32:35 -07001755
1756 C++/Java Lite (Alpha)
1757 A new "lite" generator parameter was introduced in the protoc for C++ and
Jisi Liu5668e2e2016-05-11 14:57:06 -07001758 Java for Proto3 syntax messages. Example usage:
Jisi Liu0e4d1ea2016-05-10 17:32:35 -07001759
1760 ./protoc --cpp_out=lite:$OUTPUT_PATH foo.proto
1761
1762 The protoc will treat the current input and all the transitive dependencies
1763 as LITE. The same generator parameter must be used to generate the
1764 dependencies.
1765
1766 In Proto3 syntax files, "optimized_for=LITE_RUNTIME" is no longer supported.
1767
1768
Josh Haberman81e75c12015-12-30 14:03:49 -080017692015-12-30 version 3.0.0-beta-2 (C++/Java/Python/Ruby/Nano/Objective-C/C#/JavaScript)
Feng Xiaod5fb4082015-12-21 14:36:30 -08001770 General
Dongjoon Hyun7b08d492016-01-11 14:52:01 -08001771 * Introduced a new language implementation: JavaScript.
Feng Xiaod5fb4082015-12-21 14:36:30 -08001772 * Added a new field option "json_name". By default proto field names are
1773 converted to "lowerCamelCase" in proto3 JSON format. This option can be
1774 used to override this behavior and specify a different JSON name for the
1775 field.
1776 * Added conformance tests to ensure implementations are following proto3 JSON
1777 specification.
1778
1779 C++ (Beta)
1780 * Various bug fixes and improvements to the JSON support utility:
1781 - Duplicate map keys in JSON are now rejected (i.e., translation will
1782 fail).
1783 - Fixed wire-format for google.protobuf.Value/ListValue.
1784 - Fixed precision loss when converting google.protobuf.Timestamp.
1785 - Fixed a bug when parsing invalid UTF-8 code points.
1786 - Fixed a memory leak.
1787 - Reduced call stack usage.
1788
1789 Java (Beta)
1790 * Cleaned up some unused methods on CodedOutputStream.
1791 * Presized lists for packed fields during parsing in the lite runtime to
1792 reduce allocations and improve performance.
1793 * Improved the performance of unknown fields in the lite runtime.
1794 * Introduced UnsafeByteStrings to support zero-copy ByteString creation.
1795 * Various bug fixes and improvements to the JSON support utility:
1796 - Fixed a thread-safety bug.
1797 - Added a new option “preservingProtoFieldNames” to JsonFormat.
1798 - Added a new option “includingDefaultValueFields” to JsonFormat.
1799 - Updated the JSON utility to comply with proto3 JSON specification.
1800
1801 Python (Beta)
1802 * Added proto3 JSON format utility. It includes support for all field types
1803 and a few well-known types except for Any and Struct.
1804 * Added runtime support for Any, Timestamp, Duration and FieldMask.
1805 * [ ] is now accepted for repeated scalar fields in text format parser.
Josh Haberman81e75c12015-12-30 14:03:49 -08001806 * Map fields now have proper O(1) performance for lookup/insert/delete
1807 when using the Python/C++ implementation. They were previously using O(n)
1808 search-based algorithms because the C++ reflection interface didn't
1809 support true map operations.
Feng Xiaod5fb4082015-12-21 14:36:30 -08001810
1811 Objective-C (Beta)
1812 * Various bug-fixes and code tweaks to pass more strict compiler warnings.
1813 * Now has conformance test coverage and is passing all tests.
1814
1815 C# (Beta)
1816 * Various bug-fixes.
1817 * Code generation: Files generated in directories based on namespace.
1818 * Code generation: Include comments from .proto files in XML doc
1819 comments (naively)
1820 * Code generation: Change organization/naming of "reflection class" (access
1821 to file descriptor)
1822 * Code generation and library: Add Parser property to MessageDescriptor,
1823 and introduce a non-generic parser type.
1824 * Library: Added TypeRegistry to support JSON parsing/formatting of Any.
1825 * Library: Added Any.Pack/Unpack support.
1826 * Library: Implemented JSON parsing.
1827
1828 Javascript (Alpha)
1829 * Added proto3 support for JavaScript. The runtime is written in pure
1830 JavaScript and works in browsers and in Node.js. To generate JavaScript
1831 code for your proto, invoke protoc with "--js_out". See js/README.md
1832 for more build instructions.
1833
Feng Xiaocc607532015-08-26 16:31:30 -070018342015-08-26 version 3.0.0-beta-1 (C++/Java/Python/Ruby/Nano/Objective-C/C#)
1835 About Beta
1836 * This is the first beta release of protobuf v3.0.0. Not all languages
1837 have reached beta stage. Languages not marked as beta are still in
1838 alpha (i.e., be prepared for API breaking changes).
1839
1840 General
1841 * Proto3 JSON is supported in several languages (fully supported in C++
1842 and Java, partially supported in Ruby/C#). The JSON spec is defined in
1843 the proto3 language guide:
1844
1845 https://developers.google.com/protocol-buffers/docs/proto3#json
1846
1847 We will publish a more detailed spec to define the exact behavior of
1848 proto3-conformant JSON serializers and parsers. Until then, do not rely
1849 on specific behaviors of the implementation if it’s not documented in
1850 the above spec. More specifically, the behavior is not yet finalized for
1851 the following:
1852 - Parsing invalid JSON input (e.g., input with trailing commas).
1853 - Non-camelCase names in JSON input.
1854 - The same field appears multiple times in JSON input.
1855 - JSON arrays contain “null” values.
1856 - The message has unknown fields.
1857
1858 * Proto3 now enforces strict UTF-8 checking. Parsing will fail if a string
1859 field contains non UTF-8 data.
1860
1861 C++ (Beta)
1862 * Introduced new utility functions/classes in the google/protobuf/util
1863 directory:
1864 - MessageDifferencer: compare two proto messages and report their
1865 differences.
1866 - JsonUtil: support converting protobuf binary format to/from JSON.
1867 - TimeUtil: utility functions to work with well-known types Timestamp
1868 and Duration.
1869 - FieldMaskUtil: utility functions to work with FieldMask.
1870
1871 * Performance optimization of arena construction and destruction.
1872 * Bug fixes for arena and maps support.
1873 * Changed to use cmake for Windows Visual Studio builds.
1874 * Added Bazel support.
1875
1876 Java (Beta)
1877 * Introduced a new util package that will be distributed as a separate
1878 artifact in maven. It contains:
1879 - JsonFormat: convert proto messages to/from JSON.
1880 - TimeUtil: utility functions to work with Timestamp and Duration.
1881 - FieldMaskUtil: utility functions to work with FieldMask.
1882
1883 * The static PARSER in each generated message is deprecated, and it will
1884 be removed in a future release. A static parser() getter is generated
1885 for each message type instead.
1886 * Performance optimizations for String fields serialization.
1887 * Performance optimizations for Lite runtime on Android:
1888 - Reduced allocations
1889 - Reduced method overhead after ProGuarding
1890 - Reduced code size after ProGuarding
1891
1892 Python (Alpha)
1893 * Removed legacy Python 2.5 support.
1894 * Moved to a single Python 2.x/3.x-compatible codebase, instead of using 2to3.
1895 * Fixed build/tests on Python 2.6, 2.7, 3.3, and 3.4.
1896 - Pure-Python works on all four.
1897 - Python/C++ implementation works on all but 3.4, due to changes in the
1898 Python/C++ API in 3.4.
1899 * Some preliminary work has been done to allow for multiple DescriptorPools
1900 with Python/C++.
1901
1902 Ruby (Alpha)
1903 * Many bugfixes:
1904 - fixed parsing/serialization of bytes, sint, sfixed types
1905 - other parser bugfixes
1906 - fixed memory leak affecting Ruby 2.2
1907
1908 JavaNano (Alpha)
1909 * JavaNano generated code now will be put in a nano package by default to
1910 avoid conflicts with Java generated code.
1911
1912 Objective-C (Alpha)
1913 * Added non-null markup to ObjC library. Requires SDK 8.4+ to build.
1914 * Many bugfixes:
1915 - Removed the class/enum filter.
1916 - Renamed some internal types to avoid conflicts with the well-known types
1917 protos.
1918 - Added missing support for parsing repeated primitive fields in packed or
1919 unpacked forms.
1920 - Added *Count for repeated and map<> fields to avoid auto-create when
1921 checking for them being set.
1922
1923 C# (Alpha)
1924 * Namespace changed to Google.Protobuf (and NuGet package will be named
1925 correspondingly).
1926 * Target platforms now .NET 4.5 and selected portable subsets only.
1927 * Removed lite runtime.
1928 * Reimplementation to use mutable message types.
1929 * Null references used to represent "no value" for message type fields.
1930 * Proto3 semantics supported; proto2 files are prohibited for C# codegen.
1931 Most proto3 features supported:
1932 - JSON formatting (a.k.a. serialization to JSON), including well-known
1933 types (except for Any).
1934 - Wrapper types mapped to nullable value types (or string/ByteString
1935 allowing nullability). JSON parsing is not supported yet.
1936 - maps
1937 - oneof
1938 - enum unknown value preservation
1939
Bo Yang8908cf12015-05-26 14:37:47 -070019402015-05-25 version 3.0.0-alpha-3 (Objective-C/C#):
1941 General
1942 * Introduced two new language implementations (Objective-C, C#) to proto3.
Bo Yang3e2c8a52015-05-28 14:52:44 -07001943 * Explicit "optional" keyword are disallowed in proto3 syntax, as fields are
1944 optional by default.
1945 * Group fields are no longer supported in proto3 syntax.
Bo Yang8908cf12015-05-26 14:37:47 -07001946 * Changed repeated primitive fields to use packed serialization by default in
1947 proto3 (implemented for C++, Java, Python in this release). The user can
1948 still disable packed serialization by setting packed to false for now.
1949 * Added well-known type protos (any.proto, empty.proto, timestamp.proto,
1950 duration.proto, etc.). Users can import and use these protos just like
Dongjoon Hyun7b08d492016-01-11 14:52:01 -08001951 regular proto files. Additional runtime support will be added for them in
Bo Yang8908cf12015-05-26 14:37:47 -07001952 future releases (in the form of utility helper functions, or having them
1953 replaced by language specific types in generated code).
1954 * Added a "reserved" keyword in both proto2 and proto3 syntax. User can use
1955 this keyword to declare reserved field numbers and names to prevent them
1956 from being reused by other fields in the same message.
1957
1958 To reserve field numbers, add a reserved declaration in your message:
1959
1960 message TestMessage {
1961 reserved 2, 15, 9 to 11, 3;
1962 }
1963
1964 This reserves field numbers 2, 3, 9, 10, 11 and 15. If a user uses any of
1965 these as field numbers, the protocol buffer compiler will report an error.
1966
1967 Field names can also be reserved:
1968
1969 message TestMessage {
1970 reserved "foo", "bar";
1971 }
1972
1973 * Various bug fixes since 3.0.0-alpha-2
1974
1975 Objective-C
1976 Objective-C includes a code generator and a native objective-c runtime
1977 library. By adding “--objc_out” to protoc, the code generator will generate
1978 a header(*.pbobjc.h) and an implementation file(*.pbobjc.m) for each proto
1979 file.
1980
1981 In this first release, the generated interface provides: enums, messages,
1982 field support(single, repeated, map, oneof), proto2 and proto3 syntax
1983 support, parsing and serialization. It’s compatible with ARC and non-ARC
1984 usage. Besides, user can also access it via the swift bridging header.
1985
1986 See objectivec/README.md for details.
1987
1988 C#
1989 * C# protobufs are based on project
1990 https://github.com/jskeet/protobuf-csharp-port. The original project was
1991 frozen and all the new development will happen here.
1992 * Codegen plugin for C# was completely rewritten to C++ and is now an
Dongjoon Hyun7b08d492016-01-11 14:52:01 -08001993 integral part of protoc.
Bo Yang8908cf12015-05-26 14:37:47 -07001994 * Some refactorings and cleanup has been applied to the C# runtime library.
1995 * Only proto2 is supported in C# at the moment, proto3 support is in
1996 progress and will likely bring significant breaking changes to the API.
1997
1998 See csharp/README.md for details.
1999
2000 C++
2001 * Added runtime support for Any type. To use Any in your proto file, first
2002 import the definition of Any:
2003
2004 // foo.proto
2005 import "google/protobuf/any.proto";
2006 message Foo {
2007 google.protobuf.Any any_field = 1;
2008 }
2009 message Bar {
2010 int32 value = 1;
2011 }
2012
2013 Then in C++ you can access the Any field using PackFrom()/UnpackTo()
2014 methods:
2015
2016 Foo foo;
2017 Bar bar = ...;
2018 foo.mutable_any_field()->PackFrom(bar);
2019 ...
2020 if (foo.any_field().IsType<Bar>()) {
2021 foo.any_field().UnpackTo(&bar);
2022 ...
2023 }
2024 * In text format, entries of a map field will be sorted by key.
2025
2026 Java
2027 * Continued optimizations on the lite runtime to improve performance for
2028 Android.
2029
2030 Python
2031 * Added map support.
2032 - maps now have a dict-like interface (msg.map_field[key] = value)
2033 - existing code that modifies maps via the repeated field interface
2034 will need to be updated.
2035
2036 Ruby
2037 * Improvements to RepeatedField's emulation of the Ruby Array API.
2038 * Various speedups and internal cleanups.
2039
Josh Haberman7d5cf8d2015-02-25 23:47:09 -080020402015-02-26 version 3.0.0-alpha-2 (Python/Ruby/JavaNano):
Jisi Liu32f5d012015-02-20 14:45:45 -08002041 General
Josh Haberman7d5cf8d2015-02-25 23:47:09 -08002042 * Introduced three new language implementations (Ruby, JavaNano, and
2043 Python) to proto3.
Jisi Liu32f5d012015-02-20 14:45:45 -08002044 * Various bug fixes since 3.0.0-alpha-1
2045
Josh Haberman31e8c202015-02-25 23:06:35 -08002046 Python:
2047 Python has received several updates, most notably support for proto3
2048 semantics in any .proto file that declares syntax="proto3".
2049 Messages declared in proto3 files no longer represent field presence
2050 for scalar fields (number, enums, booleans, or strings). You can
2051 no longer call HasField() for such fields, and they are serialized
2052 based on whether they have a non-zero/empty/false value.
2053
2054 One other notable change is in the C++-accelerated implementation.
2055 Descriptor objects (which describe the protobuf schema and allow
2056 reflection over it) are no longer duplicated between the Python
2057 and C++ layers. The Python descriptors are now simple wrappers
2058 around the C++ descriptors. This change should significantly
2059 reduce the memory usage of programs that use a lot of message
2060 types.
2061
Jisi Liu32f5d012015-02-20 14:45:45 -08002062 Ruby:
Chris Fallin1d4f3212015-02-20 17:32:06 -08002063 We have added proto3 support for Ruby via a native C extension.
2064
2065 The Ruby extension itself is included in the ruby/ directory, and details on
2066 building and installing the extension are in ruby/README.md. The extension
2067 will also be published as a Ruby gem. Code generator support is included as
2068 part of `protoc` with the `--ruby_out` flag.
2069
2070 The Ruby extension implements a user-friendly DSL to define message types
2071 (also generated by the code generator from `.proto` files). Once a message
2072 type is defined, the user may create instances of the message that behave in
2073 ways idiomatic to Ruby. For example:
2074
2075 - Message fields are present as ordinary Ruby properties (getter method
2076 `foo` and setter method `foo=`).
2077 - Repeated field elements are stored in a container that acts like a native
2078 Ruby array, and map elements are stored in a container that acts like a
2079 native Ruby hashmap.
2080 - The usual well-known methods, such as `#to_s`, `#dup`, and the like, are
2081 present.
2082
2083 Unlike several existing third-party Ruby extensions for protobuf, this
2084 extension is built on a "strongly-typed" philosophy: message fields and
2085 array/map containers will throw exceptions eagerly when values of the
2086 incorrect type are inserted.
2087
2088 See ruby/README.md for details.
Jisi Liu32f5d012015-02-20 14:45:45 -08002089
2090 JavaNano:
2091 JavaNano is a special code generator and runtime library designed especially
2092 for resource-restricted systems, like Android. It is very resource-friendly
2093 in both the amount of code and the runtime overhead. Here is an an overview
2094 of JavaNano features compared with the official Java protobuf:
2095
2096 - No descriptors or message builders.
2097 - All messages are mutable; fields are public Java fields.
2098 - For optional fields only, encapsulation behind setter/getter/hazzer/
2099 clearer functions is opt-in, which provide proper 'has' state support.
2100 - For proto2, if not opted in, has state (field presence) is not available.
2101 Serialization outputs all fields not equal to their defaults.
2102 The behavior is consistent with proto3 semantics.
2103 - Required fields (proto2 only) are always serialized.
2104 - Enum constants are integers; protection against invalid values only
2105 when parsing from the wire.
2106 - Enum constants can be generated into container interfaces bearing
2107 the enum's name (so the referencing code is in Java style).
2108 - CodedInputByteBufferNano can only take byte[] (not InputStream).
2109 - Similarly CodedOutputByteBufferNano can only write to byte[].
2110 - Repeated fields are in arrays, not ArrayList or Vector. Null array
2111 elements are allowed and silently ignored.
2112 - Full support for serializing/deserializing repeated packed fields.
2113 - Support extensions (in proto2).
2114 - Unset messages/groups are null, not an immutable empty default
2115 instance.
2116 - toByteArray(...) and mergeFrom(...) are now static functions of
2117 MessageNano.
2118 - The 'bytes' type translates to the Java type byte[].
2119
2120 See javanano/README.txt for details.
2121
Feng Xiao9104da32014-12-09 11:57:52 -080021222014-12-01 version 3.0.0-alpha-1 (C++/Java):
2123
2124 General
2125 * Introduced Protocol Buffers language version 3 (aka proto3).
2126
2127 When protobuf was initially opensourced it implemented Protocol Buffers
2128 language version 2 (aka proto2), which is why the version number
2129 started from v2.0.0. From v3.0.0, a new language version (proto3) is
2130 introduced while the old version (proto2) will continue to be supported.
2131
2132 The main intent of introducing proto3 is to clean up protobuf before
2133 pushing the language as the foundation of Google's new API platform.
2134 In proto3, the language is simplified, both for ease of use and to
2135 make it available in a wider range of programming languages. At the
2136 same time a few features are added to better support common idioms
2137 found in APIs.
2138
2139 The following are the main new features in language version 3:
2140
2141 1. Removal of field presence logic for primitive value fields, removal
2142 of required fields, and removal of default values. This makes proto3
2143 significantly easier to implement with open struct representations,
2144 as in languages like Android Java, Objective C, or Go.
2145 2. Removal of unknown fields.
2146 3. Removal of extensions, which are instead replaced by a new standard
2147 type called Any.
2148 4. Fix semantics for unknown enum values.
2149 5. Addition of maps.
2150 6. Addition of a small set of standard types for representation of time,
2151 dynamic data, etc.
2152 7. A well-defined encoding in JSON as an alternative to binary proto
2153 encoding.
2154
2155 This release (v3.0.0-alpha-1) includes partial proto3 support for C++ and
2156 Java. Items 6 (well-known types) and 7 (JSON format) in the above feature
Dongjoon Hyun7b08d492016-01-11 14:52:01 -08002157 list are not implemented.
Feng Xiao9104da32014-12-09 11:57:52 -08002158
2159 A new notion "syntax" is introduced to specify whether a .proto file
2160 uses proto2 or proto3:
2161
2162 // foo.proto
2163 syntax = "proto3";
2164 message Bar {...}
2165
2166 If omitted, the protocol compiler will generate a warning and "proto2" will
2167 be used as the default. This warning will be turned into an error in a
2168 future release.
2169
2170 We recommend that new Protocol Buffers users use proto3. However, we do not
2171 generally recommend that existing users migrate from proto2 from proto3 due
2172 to API incompatibility, and we will continue to support proto2 for a long
2173 time.
2174
2175 * Added support for map fields (implemented in C++/Java for both proto2 and
2176 proto3).
2177
2178 Map fields can be declared using the following syntax:
2179
2180 message Foo {
2181 map<string, string> values = 1;
2182 }
2183
2184 Data of a map field will be stored in memory as an unordered map and it
2185 can be accessed through generated accessors.
2186
2187 C++
2188 * Added arena allocation support (for both proto2 and proto3).
2189
2190 Profiling shows memory allocation and deallocation constitutes a significant
2191 fraction of CPU-time spent in protobuf code and arena allocation is a
2192 technique introduced to reduce this cost. With arena allocation, new
2193 objects will be allocated from a large piece of preallocated memory and
2194 deallocation of these objects is almost free. Early adoption shows 20% to
2195 50% improvement in some Google binaries.
2196
2197 To enable arena support, add the following option to your .proto file:
2198
2199 option cc_enable_arenas = true;
2200
2201 Protocol compiler will generate additional code to make the generated
2202 message classes work with arenas. This does not change the existing API
2203 of protobuf messages and does not affect wire format. Your existing code
2204 should continue to work after adding this option. In the future we will
2205 make this option enabled by default.
2206
2207 To actually take advantage of arena allocation, you need to use the arena
2208 APIs when creating messages. A quick example of using the arena API:
2209
2210 {
2211 google::protobuf::Arena arena;
2212 // Allocate a protobuf message in the arena.
2213 MyMessage* message = Arena::CreateMessage<MyMessage>(&arena);
2214 // All submessages will be allocated in the same arena.
2215 if (!message->ParseFromString(data)) {
2216 // Deal with malformed input data.
2217 }
2218 // Must not delete the message here. It will be deleted automatically
2219 // when the arena is destroyed.
2220 }
2221
2222 Currently arena does not work with map fields. Enabling arena in a .proto
2223 file containing map fields will result in compile errors in the generated
2224 code. This will be addressed in a future release.
2225
Feng Xiaobba83652014-10-20 17:06:06 -070022262014-10-20 version 2.6.1:
Feng Xiao57b86722014-10-09 11:20:08 -07002227
2228 C++
2229 * Added atomicops support for Solaris.
2230 * Released memory allocated by InitializeDefaultRepeatedFields() and
2231 GetEmptyString(). Some memory sanitizers reported them as memory leaks.
2232
2233 Java
2234 * Updated DynamicMessage.setField() to handle repeated enum values
2235 correctly.
2236 * Fixed a bug that caused NullPointerException to be thrown when
2237 converting manually constructed FileDescriptorProto to
2238 FileDescriptor.
2239
2240 Python
Feng Xiao419c94b2014-10-09 11:40:02 -07002241 * Fixed WhichOneof() to work with de-serialized protobuf messages.
Feng Xiao57b86722014-10-09 11:20:08 -07002242 * Fixed a missing file problem of Python C++ implementation.
2243
jieluo@google.com1eba9d92014-08-25 20:17:53 +000022442014-08-15 version 2.6.0:
2245
2246 General
2247 * Added oneofs(unions) feature. Fields in the same oneof will share
2248 memory and at most one field can be set at the same time. Use the
2249 oneof keyword to define a oneof like:
2250 message SampleMessage {
2251 oneof test_oneof {
2252 string name = 4;
2253 YourMessage sub_message = 9;
2254 }
2255 }
2256 * Files, services, enums, messages, methods and enum values can be marked
2257 as deprecated now.
Dongjoon Hyun7b08d492016-01-11 14:52:01 -08002258 * Added Support for list values, including lists of messages, when
jieluo@google.com1eba9d92014-08-25 20:17:53 +00002259 parsing text-formatted protos in C++ and Java.
2260 For example: foo: [1, 2, 3]
2261
2262 C++
2263 * Enhanced customization on TestFormat printing.
2264 * Added SwapFields() in reflection API to swap a subset of fields.
2265 Added SetAllocatedMessage() in reflection API.
2266 * Repeated primitive extensions are now packable. The
2267 [packed=true] option only affects serializers. Therefore, it is
2268 possible to switch a repeated extension field to packed format
2269 without breaking backwards-compatibility.
2270 * Various speed optimizations.
2271
2272 Java
2273 * writeTo() method in ByteString can now write a substring to an
2274 output stream. Added endWith() method for ByteString.
2275 * ByteString and ByteBuffer are now supported in CodedInputStream
2276 and CodedOutputStream.
2277 * java_generate_equals_and_hash can now be used with the LITE_RUNTIME.
2278
2279 Python
2280 * A new C++-backed extension module (aka "cpp api v2") that replaces the
2281 old ("cpp api v1") one. Much faster than the pure Python code. This one
2282 resolves many bugs and is recommended for general use over the
2283 pure Python when possible.
2284 * Descriptors now have enum_types_by_name and extension_types_by_name dict
2285 attributes.
2286 * Support for Python 3.
2287
xiaofeng@google.com2c9392f2013-02-28 06:12:28 +000022882013-02-27 version 2.5.0:
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00002289
2290 General
2291 * New notion "import public" that allows a proto file to forward the content
2292 it imports to its importers. For example,
2293 // foo.proto
2294 import public "bar.proto";
2295 import "baz.proto";
2296
2297 // qux.proto
2298 import "foo.proto";
2299 // Stuff defined in bar.proto may be used in this file, but stuff from
2300 // baz.proto may NOT be used without importing it explicitly.
2301 This is useful for moving proto files. To move a proto file, just leave
2302 a single "import public" in the old proto file.
2303 * New enum option "allow_alias" that specifies whether different symbols can
2304 be assigned the same numeric value. Default value is "true". Setting it to
2305 false causes the compiler to reject enum definitions where multiple symbols
2306 have the same numeric value.
xiaofeng@google.com7f4c9e82013-03-05 01:51:21 +00002307 Note: We plan to flip the default value to "false" in a future release.
2308 Projects using enum aliases should set the option to "true" in their .proto
2309 files.
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00002310
2311 C++
2312 * New generated method set_allocated_foo(Type* foo) for message and string
2313 fields. This method allows you to set the field to a pre-allocated object
2314 and the containing message takes the ownership of that object.
2315 * Added SetAllocatedExtension() and ReleaseExtension() to extensions API.
2316 * Custom options are now formatted correctly when descriptors are printed in
2317 text format.
2318 * Various speed optimizations.
2319
2320 Java
2321 * Comments in proto files are now collected and put into generated code as
2322 comments for corresponding classes and data members.
2323 * Added Parser to parse directly into messages without a Builder. For
2324 example,
xiaofeng@google.com2c9392f2013-02-28 06:12:28 +00002325 Foo foo = Foo.PARSER.ParseFrom(input);
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00002326 Using Parser is ~25% faster than using Builder to parse messages.
2327 * Added getters/setters to access the underlying ByteString of a string field
2328 directly.
2329 * ByteString now supports more operations: substring(), prepend(), and
2330 append(). The implementation of ByteString uses a binary tree structure
2331 to support these operations efficiently.
2332 * New method findInitializationErrors() that lists all missing required
2333 fields.
2334 * Various code size and speed optimizations.
2335
2336 Python
2337 * Added support for dynamic message creation. DescriptorDatabase,
Dongjoon Hyun7b08d492016-01-11 14:52:01 -08002338 DescriptorPool, and MessageFactory work like their C++ counterparts to
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00002339 simplify Descriptor construction from *DescriptorProtos, and MessageFactory
2340 provides a message instance from a Descriptor.
2341 * Added pickle support for protobuf messages.
2342 * Unknown fields are now preserved after parsing.
2343 * Fixed bug where custom options were not correctly populated. Custom
2344 options can be accessed now.
2345 * Added EnumTypeWrapper that provides better accessibility to enum types.
2346 * Added ParseMessage(descriptor, bytes) to generate a new Message instance
2347 from a descriptor and a byte string.
2348
liujisi@google.com5d996322011-04-30 15:29:09 +000023492011-05-01 version 2.4.1:
2350
2351 C++
Dongjoon Hyun7b08d492016-01-11 14:52:01 -08002352 * Fixed the friendship problem for old compilers to make the library now gcc 3
liujisi@google.com5d996322011-04-30 15:29:09 +00002353 compatible again.
2354 * Fixed vcprojects/extract_includes.bat to extract compiler/plugin.h.
2355
2356 Java
2357 * Removed usages of JDK 1.6 only features to make the library now JDK 1.5
2358 compatible again.
2359 * Fixed a bug about negative enum values.
2360 * serialVersionUID is now defined in generated messages for java serializing.
2361 * Fixed protoc to use java.lang.Object, which makes "Object" now a valid
2362 message name again.
2363
2364 Python
2365 * Experimental C++ implementation now requires C++ protobuf library installed.
2366 See the README.txt in the python directory for details.
2367
liujisi@google.com7a261472011-02-02 14:04:22 +000023682011-02-02 version 2.4.0:
liujisi@google.com33165fe2010-11-02 13:14:58 +00002369
2370 General
2371 * The RPC (cc|java|py)_generic_services default value is now false instead of
2372 true.
2373 * Custom options can have aggregate types. For example,
2374 message MyOption {
2375 optional string comment = 1;
2376 optional string author = 2;
2377 }
2378 extend google.protobuf.FieldOptions {
2379 optional MyOption myoption = 12345;
2380 }
2381 This option can now be set as follows:
2382 message SomeType {
2383 optional int32 field = 1 [(myoption) = { comment:'x' author:'y' }];
2384 }
2385
2386 C++
2387 * Various speed and code size optimizations.
2388 * Added a release_foo() method on string and message fields.
2389 * Fixed gzip_output_stream sub-stream handling.
2390
2391 Java
2392 * Builders now maintain sub-builders for sub-messages. Use getFooBuilder() to
2393 get the builder for the sub-message "foo". This allows you to repeatedly
2394 modify deeply-nested sub-messages without rebuilding them.
2395 * Builder.build() no longer invalidates the Builder for generated messages
2396 (You may continue to modify it and then build another message).
2397 * Code generator will generate efficient equals() and hashCode()
2398 implementations if new option java_generate_equals_and_hash is enabled.
2399 (Otherwise, reflection-based implementations are used.)
2400 * Generated messages now implement Serializable.
2401 * Fields with [deprecated=true] will be marked with @Deprecated in Java.
2402 * Added lazy conversion of UTF-8 encoded strings to String objects to improve
2403 performance.
2404 * Various optimizations.
2405 * Enum value can be accessed directly, instead of calling getNumber() on the
2406 enum member.
2407 * For each enum value, an integer constant is also generated with the suffix
2408 _VALUE.
2409
2410 Python
2411 * Added an experimental C++ implementation for Python messages via a Python
2412 extension. Implementation type is controlled by an environment variable
2413 PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION (valid values: "cpp" and "python")
2414 The default value is currently "python" but will be changed to "cpp" in
2415 future release.
2416 * Improved performance on message instantiation significantly.
2417 Most of the work on message instantiation is done just once per message
2418 class, instead of once per message instance.
2419 * Improved performance on text message parsing.
2420 * Allow add() to forward keyword arguments to the concrete class.
2421 E.g. instead of
2422 item = repeated_field.add()
2423 item.foo = bar
2424 item.baz = quux
2425 You can do:
2426 repeated_field.add(foo=bar, baz=quux)
2427 * Added a sort() interface to the BaseContainer.
2428 * Added an extend() method to repeated composite fields.
2429 * Added UTF8 debug string support.
2430
temporald4e38c72010-01-09 07:35:50 +000024312010-01-08 version 2.3.0:
kenton@google.comfccb1462009-12-18 02:11:36 +00002432
2433 General
2434 * Parsers for repeated numeric fields now always accept both packed and
2435 unpacked input. The [packed=true] option only affects serializers.
2436 Therefore, it is possible to switch a field to packed format without
2437 breaking backwards-compatibility -- as long as all parties are using
2438 protobuf 2.3.0 or above, at least.
2439 * The generic RPC service code generated by the C++, Java, and Python
2440 generators can be disabled via file options:
2441 option cc_generic_services = false;
2442 option java_generic_services = false;
2443 option py_generic_services = false;
2444 This allows plugins to generate alternative code, possibly specific to some
2445 particular RPC implementation.
2446
2447 protoc
2448 * Now supports a plugin system for code generators. Plugins can generate
2449 code for new languages or inject additional code into the output of other
2450 code generators. Plugins are just binaries which accept a protocol buffer
2451 on stdin and write a protocol buffer to stdout, so they may be written in
2452 any language. See src/google/protobuf/compiler/plugin.proto.
kenton@google.com7f4938b2009-12-22 22:57:39 +00002453 **WARNING**: Plugins are experimental. The interface may change in a
2454 future version.
kenton@google.com0225b352010-01-04 22:07:09 +00002455 * If the output location ends in .zip or .jar, protoc will write its output
2456 to a zip/jar archive instead of a directory. For example:
2457 protoc --java_out=myproto_srcs.jar --python_out=myproto.zip myproto.proto
2458 Currently the archive contents are not compressed, though this could change
2459 in the future.
kenton@google.comfccb1462009-12-18 02:11:36 +00002460 * inf, -inf, and nan can now be used as default values for float and double
2461 fields.
2462
2463 C++
2464 * Various speed and code size optimizations.
2465 * DynamicMessageFactory is now fully thread-safe.
2466 * Message::Utf8DebugString() method is like DebugString() but avoids escaping
2467 UTF-8 bytes.
2468 * Compiled-in message types can now contain dynamic extensions, through use
2469 of CodedInputStream::SetExtensionRegistry().
kenton@google.comc0ee4d22009-12-22 02:05:33 +00002470 * Now compiles shared libraries (DLLs) by default on Cygwin and MinGW, to
2471 match other platforms. Use --disable-shared to avoid this.
kenton@google.comfccb1462009-12-18 02:11:36 +00002472
2473 Java
2474 * parseDelimitedFrom() and mergeDelimitedFrom() now detect EOF and return
2475 false/null instead of throwing an exception.
2476 * Fixed some initialization ordering bugs.
2477 * Fixes for OpenJDK 7.
2478
2479 Python
2480 * 10-25 times faster than 2.2.0, still pure-Python.
2481 * Calling a mutating method on a sub-message always instantiates the message
2482 in its parent even if the mutating method doesn't actually mutate anything
2483 (e.g. parsing from an empty string).
2484 * Expanded descriptors a bit.
2485
kenton@google.com201b9be2009-08-12 00:23:05 +000024862009-08-11 version 2.2.0:
kenton@google.comceb561d2009-06-25 19:05:36 +00002487
2488 C++
kenton@google.com80b1d622009-07-29 01:13:20 +00002489 * Lite mode: The "optimize_for = LITE_RUNTIME" option causes the compiler
2490 to generate code which only depends libprotobuf-lite, which is much smaller
2491 than libprotobuf but lacks descriptors, reflection, and some other features.
kenton@google.comceb561d2009-06-25 19:05:36 +00002492 * Fixed bug where Message.Swap(Message) was only implemented for
2493 optimize_for_speed. Swap now properly implemented in both modes
2494 (Issue 91).
2495 * Added RemoveLast and SwapElements(index1, index2) to Reflection
2496 interface for repeated elements.
2497 * Added Swap(Message) to Reflection interface.
kenton@google.comd2fd0632009-07-24 01:00:35 +00002498 * Floating-point literals in generated code that are intended to be
2499 single-precision now explicitly have 'f' suffix to avoid pedantic warnings
2500 produced by some compilers.
kenton@google.com80b1d622009-07-29 01:13:20 +00002501 * The [deprecated=true] option now causes the C++ code generator to generate
2502 a GCC-style deprecation annotation (no-op on other compilers).
2503 * google::protobuf::GetEnumDescriptor<SomeGeneratedEnumType>() returns the
2504 EnumDescriptor for that type -- useful for templates which cannot call
2505 SomeGeneratedEnumType_descriptor().
2506 * Various optimizations and obscure bug fixes.
2507
2508 Java
2509 * Lite mode: The "optimize_for = LITE_RUNTIME" option causes the compiler
2510 to generate code which only depends libprotobuf-lite, which is much smaller
2511 than libprotobuf but lacks descriptors, reflection, and some other features.
kenton@google.com80b1d622009-07-29 01:13:20 +00002512 * Lots of style cleanups.
2513
2514 Python
2515 * Fixed endianness bug with floats and doubles.
2516 * Text format parsing support.
2517 * Fix bug with parsing packed repeated fields in embedded messages.
2518 * Ability to initialize fields by passing keyword args to constructor.
2519 * Support iterators in extend and __setslice__ for containers.
kenton@google.comceb561d2009-06-25 19:05:36 +00002520
kenton@google.com1fb3d392009-05-13 23:20:03 +000025212009-05-13 version 2.1.0:
kenton@google.com2d6daa72009-01-22 01:27:00 +00002522
2523 General
2524 * Repeated fields of primitive types (types other that string, group, and
2525 nested messages) may now use the option [packed = true] to get a more
2526 efficient encoding. In the new encoding, the entire list is written
2527 as a single byte blob using the "length-delimited" wire type. Within
2528 this blob, the individual values are encoded the same way they would
2529 be normally except without a tag before each value (thus, they are
2530 tightly "packed").
kenton@google.comcfa2d8a2009-04-18 00:02:12 +00002531 * For each field, the generated code contains an integer constant assigned
2532 to the field number. For example, the .proto file:
2533 message Foo { optional int bar_baz = 123; }
2534 would generate the following constants, all with the integer value 123:
2535 C++: Foo::kBarBazFieldNumber
2536 Java: Foo.BAR_BAZ_FIELD_NUMBER
2537 Python: Foo.BAR_BAZ_FIELD_NUMBER
2538 Constants are also generated for extensions, with the same naming scheme.
2539 These constants may be used as switch cases.
kenton@google.com37ad00d2009-04-21 21:00:39 +00002540 * Updated bundled Google Test to version 1.3.0. Google Test is now bundled
2541 in its verbatim form as a nested autoconf package, so you can drop in any
2542 other version of Google Test if needed.
kenton@google.comd37d46d2009-04-25 02:53:47 +00002543 * optimize_for = SPEED is now the default, by popular demand. Use
2544 optimize_for = CODE_SIZE if code size is more important in your app.
2545 * It is now an error to define a default value for a repeated field.
2546 Previously, this was silently ignored (it had no effect on the generated
2547 code).
2548 * Fields can now be marked deprecated like:
2549 optional int32 foo = 1 [deprecated = true];
2550 Currently this does not have any actual effect, but in the future the code
2551 generators may generate deprecation annotations in each language.
kenton@google.com9824eda2009-05-06 17:49:37 +00002552 * Cross-compiling should now be possible using the --with-protoc option to
2553 configure. See README.txt for more info.
kenton@google.com2d6daa72009-01-22 01:27:00 +00002554
kenton@google.comf663b162009-04-15 19:50:54 +00002555 protoc
2556 * --error_format=msvs option causes errors to be printed in Visual Studio
2557 format, which should allow them to be clicked on in the build log to go
kenton@google.comd37d46d2009-04-25 02:53:47 +00002558 directly to the error location.
2559 * The type name resolver will no longer resolve type names to fields. For
2560 example, this now works:
2561 message Foo {}
2562 message Bar {
2563 optional int32 Foo = 1;
2564 optional Foo baz = 2;
2565 }
2566 Previously, the type of "baz" would resolve to "Bar.Foo", and you'd get
2567 an error because Bar.Foo is a field, not a type. Now the type of "baz"
2568 resolves to the message type Foo. This change is unlikely to make a
2569 difference to anyone who follows the Protocol Buffers style guide.
kenton@google.comf663b162009-04-15 19:50:54 +00002570
kenton@google.com2d6daa72009-01-22 01:27:00 +00002571 C++
kenton@google.comd37d46d2009-04-25 02:53:47 +00002572 * Several optimizations, including but not limited to:
2573 - Serialization, especially to flat arrays, is 10%-50% faster, possibly
2574 more for small objects.
2575 - Several descriptor operations which previously required locking no longer
2576 do.
2577 - Descriptors are now constructed lazily on first use, rather than at
2578 process startup time. This should save memory in programs which do not
2579 use descriptors or reflection.
2580 - UnknownFieldSet completely redesigned to be more efficient (especially in
2581 terms of memory usage).
2582 - Various optimizations to reduce code size (though the serialization speed
2583 optimizations increased code size).
kenton@google.com2d6daa72009-01-22 01:27:00 +00002584 * Message interface has method ParseFromBoundedZeroCopyStream() which parses
2585 a limited number of bytes from an input stream rather than parsing until
2586 EOF.
kenton@google.come59427a2009-04-16 22:30:56 +00002587 * GzipInputStream and GzipOutputStream support reading/writing gzip- or
2588 zlib-compressed streams if zlib is available.
2589 (google/protobuf/io/gzip_stream.h)
kenton@google.comd37d46d2009-04-25 02:53:47 +00002590 * DescriptorPool::FindAllExtensions() and corresponding
2591 DescriptorDatabase::FindAllExtensions() can be used to enumerate all
2592 extensions of a given type.
2593 * For each enum type Foo, protoc will generate functions:
2594 const string& Foo_Name(Foo value);
2595 bool Foo_Parse(const string& name, Foo* result);
2596 The former returns the name of the enum constant corresponding to the given
2597 value while the latter finds the value corresponding to a name.
2598 * RepeatedField and RepeatedPtrField now have back-insertion iterators.
2599 * String fields now have setters that take a char* and a size, in addition
2600 to the existing ones that took char* or const string&.
2601 * DescriptorPool::AllowUnknownDependencies() may be used to tell
2602 DescriptorPool to create placeholder descriptors for unknown entities
2603 referenced in a FileDescriptorProto. This can allow you to parse a .proto
2604 file without having access to other .proto files that it imports, for
2605 example.
2606 * Updated gtest to latest version. The gtest package is now included as a
2607 nested autoconf package, so it should be able to drop new versions into the
2608 "gtest" subdirectory without modification.
kenton@google.com2d6daa72009-01-22 01:27:00 +00002609
2610 Java
2611 * Fixed bug where Message.mergeFrom(Message) failed to merge extensions.
2612 * Message interface has new method toBuilder() which is equivalent to
2613 newBuilderForType().mergeFrom(this).
2614 * All enums now implement the ProtocolMessageEnum interface.
2615 * Setting a field to null now throws NullPointerException.
2616 * Fixed tendency for TextFormat's parsing to overflow the stack when
2617 parsing large string values. The underlying problem is with Java's
2618 regex implementation (which unfortunately uses recursive backtracking
Dongjoon Hyun7b08d492016-01-11 14:52:01 -08002619 rather than building an NFA). Worked around by making use of possessive
kenton@google.com2d6daa72009-01-22 01:27:00 +00002620 quantifiers.
kenton@google.comd37d46d2009-04-25 02:53:47 +00002621 * Generated service classes now also generate pure interfaces. For a service
2622 Foo, Foo.Interface is a pure interface containing all of the service's
2623 defined methods. Foo.newReflectiveService() can be called to wrap an
2624 instance of this interface in a class that implements the generic
2625 RpcService interface, which provides reflection support that is usually
2626 needed by RPC server implementations.
2627 * RPC interfaces now support blocking operation in addition to non-blocking.
2628 The protocol compiler generates separate blocking and non-blocking stubs
2629 which operate against separate blocking and non-blocking RPC interfaces.
2630 RPC implementations will have to implement the new interfaces in order to
2631 support blocking mode.
2632 * New I/O methods parseDelimitedFrom(), mergeDelimitedFrom(), and
Dongjoon Hyun7b08d492016-01-11 14:52:01 -08002633 writeDelimitedTo() read and write "delimited" messages from/to a stream,
kenton@google.comd37d46d2009-04-25 02:53:47 +00002634 meaning that the message size precedes the data. This way, you can write
2635 multiple messages to a stream without having to worry about delimiting
2636 them yourself.
2637 * Throw a more descriptive exception when build() is double-called.
2638 * Add a method to query whether CodedInputStream is at the end of the input
2639 stream.
2640 * Add a method to reset a CodedInputStream's size counter; useful when
2641 reading many messages with the same stream.
2642 * equals() and hashCode() now account for unknown fields.
pesho.petrov87e64e12008-12-24 01:07:22 +00002643
2644 Python
2645 * Added slicing support for repeated scalar fields. Added slice retrieval and
2646 removal of repeated composite fields.
kenton@google.com2d6daa72009-01-22 01:27:00 +00002647 * Updated RPC interfaces to allow for blocking operation. A client may
2648 now pass None for a callback when making an RPC, in which case the
2649 call will block until the response is received, and the response
2650 object will be returned directly to the caller. This interface change
2651 cannot be used in practice until RPC implementations are updated to
2652 implement it.
kenton@google.comd37d46d2009-04-25 02:53:47 +00002653 * Changes to input_stream.py should make protobuf compatible with appengine.
pesho.petrov87e64e12008-12-24 01:07:22 +00002654
kenton@google.com9f175282008-11-25 19:37:10 +000026552008-11-25 version 2.0.3:
2656
2657 protoc
2658 * Enum values may now have custom options, using syntax similar to field
2659 options.
2660 * Fixed bug where .proto files which use custom options but don't actually
2661 define them (i.e. they import another .proto file defining the options)
2662 had to explicitly import descriptor.proto.
2663 * Adjacent string literals in .proto files will now be concatenated, like in
2664 C.
kenton@google.com2f669cb2008-12-02 05:59:15 +00002665 * If an input file is a Windows absolute path (e.g. "C:\foo\bar.proto") and
2666 the import path only contains "." (or contains "." but does not contain
2667 the file), protoc incorrectly thought that the file was under ".", because
2668 it thought that the path was relative (since it didn't start with a slash).
2669 This has been fixed.
kenton@google.com9f175282008-11-25 19:37:10 +00002670
2671 C++
2672 * Generated message classes now have a Swap() method which efficiently swaps
2673 the contents of two objects.
2674 * All message classes now have a SpaceUsed() method which returns an estimate
2675 of the number of bytes of allocated memory currently owned by the object.
2676 This is particularly useful when you are reusing a single message object
2677 to improve performance but want to make sure it doesn't bloat up too large.
2678 * New method Message::SerializeAsString() returns a string containing the
2679 serialized data. May be more convenient than calling
2680 SerializeToString(string*).
2681 * In debug mode, log error messages when string-type fields are found to
2682 contain bytes that are not valid UTF-8.
2683 * Fixed bug where a message with multiple extension ranges couldn't parse
2684 extensions.
2685 * Fixed bug where MergeFrom(const Message&) didn't do anything if invoked on
2686 a message that contained no fields (but possibly contained extensions).
2687 * Fixed ShortDebugString() to not be O(n^2). Durr.
2688 * Fixed crash in TextFormat parsing if the first token in the input caused a
2689 tokenization error.
2690 * Fixed obscure bugs in zero_copy_stream_impl.cc.
2691 * Added support for HP C++ on Tru64.
2692 * Only build tests on "make check", not "make".
2693 * Fixed alignment issue that caused crashes when using DynamicMessage on
2694 64-bit Sparc machines.
2695 * Simplify template usage to work with MSVC 2003.
2696 * Work around GCC 4.3.x x86_64 compiler bug that caused crashes on startup.
2697 (This affected Fedora 9 in particular.)
kenton@google.com25bc5cd2008-12-04 20:34:50 +00002698 * Now works on "Solaris 10 using recent Sun Studio".
kenton@google.com9f175282008-11-25 19:37:10 +00002699
2700 Java
2701 * New overload of mergeFrom() which parses a slice of a byte array instead
2702 of the whole thing.
2703 * New method ByteString.asReadOnlyByteBuffer() does what it sounds like.
2704 * Improved performance of isInitialized() when optimizing for code size.
2705
2706 Python
2707 * Corrected ListFields() signature in Message base class to match what
2708 subclasses actually implement.
2709 * Some minor refactoring.
kenton@google.com2f669cb2008-12-02 05:59:15 +00002710 * Don't pass self as first argument to superclass constructor (no longer
2711 allowed in Python 2.6).
kenton@google.com9f175282008-11-25 19:37:10 +00002712
kenton@google.com9b10f582008-09-30 00:09:40 +000027132008-09-29 version 2.0.2:
2714
kenton@google.com24bf56f2008-09-24 20:31:01 +00002715 General
Sebastian Schuberth902af082017-02-28 09:58:24 +01002716 * License changed from Apache 2.0 to 3-Clause BSD.
kenton@google.com24bf56f2008-09-24 20:31:01 +00002717 * It is now possible to define custom "options", which are basically
2718 annotations which may be placed on definitions in a .proto file.
2719 For example, you might define a field option called "foo" like so:
2720 import "google/protobuf/descriptor.proto"
2721 extend google.protobuf.FieldOptions {
2722 optional string foo = 12345;
2723 }
2724 Then you annotate a field using the "foo" option:
2725 message MyMessage {
2726 optional int32 some_field = 1 [(foo) = "bar"]
2727 }
2728 The value of this option is then visible via the message's
2729 Descriptor:
2730 const FieldDescriptor* field =
2731 MyMessage::descriptor()->FindFieldByName("some_field");
2732 assert(field->options().GetExtension(foo) == "bar");
2733 This feature has been implemented and tested in C++ and Java.
2734 Other languages may or may not need to do extra work to support
2735 custom options, depending on how they construct descriptors.
2736
2737 C++
2738 * Fixed some GCC warnings that only occur when using -pedantic.
2739 * Improved static initialization code, making ordering more
2740 predictable among other things.
2741 * TextFormat will no longer accept messages which contain multiple
2742 instances of a singular field. Previously, the latter instance
kenton@google.com9b10f582008-09-30 00:09:40 +00002743 would overwrite the former.
kenton@google.com24bf56f2008-09-24 20:31:01 +00002744 * Now works on systems that don't have hash_map.
2745
kenton@google.com9b10f582008-09-30 00:09:40 +00002746 Java
2747 * Print @Override annotation in generated code where appropriate.
2748
kenton@google.com24bf56f2008-09-24 20:31:01 +00002749 Python
2750 * Strings now use the "unicode" type rather than the "str" type.
2751 String fields may still be assigned ASCII "str" values; they will
2752 automatically be converted.
2753 * Adding a property to an object representing a repeated field now
2754 raises an exception. For example:
2755 # No longer works (and never should have).
2756 message.some_repeated_field.foo = 1
kenton@google.com9b10f582008-09-30 00:09:40 +00002757
2758 Windows
2759 * We now build static libraries rather than DLLs by default on MSVC.
2760 See vsprojects/readme.txt for more information.
2761
temporala44f3c32008-08-15 18:32:02 +000027622008-08-15 version 2.0.1:
kenton@google.com9b10f582008-09-30 00:09:40 +00002763
2764 protoc
2765 * New flags --encode and --decode can be used to convert between protobuf text
2766 format and binary format from the command-line.
2767 * New flag --descriptor_set_out can be used to write FileDescriptorProtos for
2768 all parsed files directly into a single output file. This is particularly
2769 useful if you wish to parse .proto files from programs written in languages
2770 other than C++: just run protoc as a background process and have it output
2771 a FileDescriptorList, then parse that natively.
2772 * Improved error message when an enum value's name conflicts with another
2773 symbol defined in the enum type's scope, e.g. if two enum types declared
2774 in the same scope have values with the same name. This is disallowed for
temporala44f3c32008-08-15 18:32:02 +00002775 compatibility with C++, but this wasn't clear from the error.
kenton@google.com9b10f582008-09-30 00:09:40 +00002776 * Fixed absolute output paths on Windows.
temporala44f3c32008-08-15 18:32:02 +00002777 * Allow trailing slashes in --proto_path mappings.
kenton@google.com9b10f582008-09-30 00:09:40 +00002778
2779 C++
2780 * Reflection objects are now per-class rather than per-instance. To make this
2781 possible, the Reflection interface had to be changed such that all methods
2782 take the Message instance as a parameter. This change improves performance
2783 significantly in memory-bandwidth-limited use cases, since it makes the
2784 message objects smaller. Note that source-incompatible interface changes
2785 like this will not be made again after the library leaves beta.
temporala44f3c32008-08-15 18:32:02 +00002786 * Heuristically detect sub-messages when printing unknown fields.
kenton@google.com9b10f582008-09-30 00:09:40 +00002787 * Fix static initialization ordering bug that caused crashes at startup when
temporala44f3c32008-08-15 18:32:02 +00002788 compiling on Mac with static linking.
kenton@google.com9b10f582008-09-30 00:09:40 +00002789 * Fixed TokenizerTest when compiling with -DNDEBUG on Linux.
2790 * Fixed incorrect definition of kint32min.
temporala44f3c32008-08-15 18:32:02 +00002791 * Fix bytes type setter to work with byte sequences with embedded NULLs.
2792 * Other irrelevant tweaks.
2793
kenton@google.com9b10f582008-09-30 00:09:40 +00002794 Java
2795 * Fixed UnknownFieldSet's parsing of varints larger than 32 bits.
2796 * Fixed TextFormat's parsing of "inf" and "nan".
2797 * Fixed TextFormat's parsing of comments.
2798 * Added info to Java POM that will be required when we upload the
temporala44f3c32008-08-15 18:32:02 +00002799 package to a Maven repo.
2800
kenton@google.com9b10f582008-09-30 00:09:40 +00002801 Python
2802 * MergeFrom(message) and CopyFrom(message) are now implemented.
2803 * SerializeToString() raises an exception if the message is missing required
2804 fields.
2805 * Code organization improvements.
2806 * Fixed doc comments for RpcController and RpcChannel, which had somehow been
temporala44f3c32008-08-15 18:32:02 +00002807 swapped.
kenton@google.com9b10f582008-09-30 00:09:40 +00002808 * Fixed text_format_test on Windows where floating-point exponents sometimes
2809 contain extra zeros.
temporala44f3c32008-08-15 18:32:02 +00002810 * Fix Python service CallMethod() implementation.
2811
2812 Other
2813 * Improved readmes.
2814 * VIM syntax highlighting improvements.
2815
temporal40ee5512008-07-10 02:12:20 +000028162008-07-07 version 2.0.0:
2817
2818 * First public release.