CHANGES.txt 128 KB

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