CHANGES.txt 125 KB

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