CHANGES.txt 103 KB

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