CHANGES.txt 104 KB

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