CHANGES.txt 137 KB

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