CHANGES.txt 113 KB

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