CHANGES.txt 139 KB

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