CHANGES.txt 146 KB

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