CHANGES.txt 57 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263
  1. 2016-07-15 version 3.0.0-beta-4 (C++/Java/Python/Ruby/Objective-C/C#/JavaScript)
  2. General
  3. * Added a deterministic serialization API for C++. The deterministic
  4. serialization guarantees that given a binary, equal messages will be
  5. serialized to the same bytes. This allows applications like MapReduce to
  6. group equal messages based on the serialized bytes. The deterministic
  7. serialization is, however, NOT canonical across languages; it is also
  8. unstable across different builds with schema changes due to unknown fields.
  9. Users who need canonical serialization, e.g. persistent storage in a
  10. canonical form, fingerprinting, etc, should define their own
  11. canonicalization specification and implement the serializer using reflection
  12. APIs rather than relying on this API.
  13. * Added OneofOptions. You can now define custom options for oneof groups.
  14. import "google/protobuf/descriptor.proto";
  15. extend google.protobuf.OneofOptions {
  16. optional int32 my_oneof_extension = 12345;
  17. }
  18. message Foo {
  19. oneof oneof_group {
  20. (my_oneof_extension) = 54321;
  21. ...
  22. }
  23. }
  24. C++ (beta)
  25. * Introduced a deterministic serialization API in
  26. CodedOutputStream::SetSerializationDeterministic(bool). See the notes about
  27. deterministic serialization in the General section.
  28. * Added google::protobuf::Map::swap() to swap two map fields.
  29. * Fixed a memory leak when calling Reflection::ReleaseMessage() on a message
  30. allocated on arena.
  31. * Improved error reporting when parsing text format protos.
  32. * JSON
  33. - Added a new parser option to ignore unknown fields when parsing JSON.
  34. - Added convenient methods for message to/from JSON conversion.
  35. * Various performance optimizations.
  36. Java (beta)
  37. * File option "java_generate_equals_and_hash" is now deprecated. equals() and
  38. hashCode() methods are generated by default.
  39. * Added a new JSON printer option "omittingInsignificantWhitespace" to produce
  40. a more compact JSON output. The printer will pretty-print by default.
  41. * Updated Java runtime to be compatible with 2.5.0/2.6.1 generated protos.
  42. Python (beta)
  43. * Added support to pretty print Any messages in text format.
  44. * Added a flag to ignore unknown fields when parsing JSON.
  45. * Bugfix: "@type" field of a JSON Any message is now correctly put before
  46. other fields.
  47. Objective-C (beta)
  48. * Updated the code to support compiling with more compiler warnings
  49. enabled. (Issue 1616)
  50. * Exposing more detailed errors for parsing failures. (PR 1623)
  51. * Small (breaking) change to the naming of some methods on the support classes
  52. for map<>. There were collisions with the system provided KVO support, so
  53. the names were changed to avoid those issues. (PR 1699)
  54. * Fixed for proper Swift bridging of error handling during parsing. (PR 1712)
  55. * Complete support for generating sources that will go into a Framework and
  56. depend on generated sources from other Frameworks. (Issue 1457)
  57. C# (beta)
  58. * RepeatedField optimizations.
  59. * Support for .NET Core.
  60. * Minor bug fixes.
  61. * Ability to format a single value in JsonFormatter (advanced usage only).
  62. * Modifications to attributes applied to generated code.
  63. Javascript (alpha)
  64. * Maps now have a real map API instead of being treated as repeated fields.
  65. * Well-known types are now provided in the google-protobuf package, and the
  66. code generator knows to require() them from that package.
  67. * Bugfix: non-canonical varints are correctly decoded.
  68. Ruby (alpha)
  69. * Accessors for oneof fields now return default values instead of nil.
  70. Java Lite
  71. * Java lite support is removed from protocol compiler. It will be supported
  72. as a protocol compiler plugin in a separate code branch.
  73. 2016-05-16 version 3.0.0-beta-3 (C++/Java/Python/Ruby/Nano/Objective-C/C#/JavaScript)
  74. General
  75. * Supported Proto3 lite-runtime in C++/Java for mobile platforms.
  76. * Any type now supports APIs to specify prefixes other than
  77. type.googleapis.com
  78. * Removed javanano_use_deprecated_package option; Nano will always has its own
  79. ".nano" package.
  80. C++ (Beta)
  81. * Improved hash maps.
  82. - Improved hash maps comments. In particular, please note that equal hash
  83. maps will not necessarily have the same iteration order and
  84. serialization.
  85. - Added a new hash maps implementation that will become the default in a
  86. later release.
  87. * Arenas
  88. - Several inlined methods in Arena were moved to out-of-line to improve
  89. build performance and code size.
  90. - Added SpaceAllocatedAndUsed() to report both space used and allocated
  91. - Added convenient class UnsafeArenaAllocatedRepeatedPtrFieldBackInserter
  92. * Any
  93. - Allow custom type URL prefixes in Any packing.
  94. - TextFormat now expand the Any type rather than printing bytes.
  95. * Performance optimizations and various bug fixes.
  96. Java (Beta)
  97. * Introduced an ExperimentalApi annotation. Annotated APIs are experimental
  98. and are subject to change in a backward incompatible way in future releases.
  99. * Introduced zero-copy serialization as an ExperimentalApi
  100. - Introduction of the `ByteOutput` interface. This is similar to
  101. `OutputStream` but provides semantics for lazy writing (i.e. no
  102. immediate copy required) of fields that are considered to be immutable.
  103. - `ByteString` now supports writing to a `ByteOutput`, which will directly
  104. expose the internals of the `ByteString` (i.e. `byte[]` or `ByteBuffer`)
  105. to the `ByteOutput` without copying.
  106. - `CodedOutputStream` now supports writing to a `ByteOutput`. `ByteString`
  107. instances that are too large to fit in the internal buffer will be
  108. (lazily) written to the `ByteOutput` directly.
  109. - This allows applications using large `ByteString` fields to avoid
  110. duplication of these fields entirely. Such an application can supply a
  111. `ByteOutput` that chains together the chunks received from
  112. `CodedOutputStream` before forwarding them onto the IO system.
  113. * Other related changes to `CodedOutputStream`
  114. - Additional use of `sun.misc.Unsafe` where possible to perform fast
  115. access to `byte[]` and `ByteBuffer` values and avoiding unnecessary
  116. range checking.
  117. - `ByteBuffer`-backed `CodedOutputStream` now writes directly to the
  118. `ByteBuffer` rather than to an intermediate array.
  119. * Improved lite-runtime.
  120. - Lite protos now implement deep equals/hashCode/toString
  121. - Significantly improved the performance of Builder#mergeFrom() and
  122. Builder#mergeDelimitedFrom()
  123. * Various bug fixes and small feature enhancement.
  124. - Fixed stack overflow when in hashCode() for infinite recursive oneofs.
  125. - Fixed the lazy field parsing in lite to merge rather than overwrite.
  126. - TextFormat now supports reporting line/column numbers on errors.
  127. - Updated to add appropriate @Override for better compiler errors.
  128. Python (Beta)
  129. * Added JSON format for Any, Struct, Value and ListValue
  130. * [ ] is now accepted for both repeated scalar fields and repeated message
  131. fields in text format parser.
  132. * Numerical field name is now supported in text format.
  133. * Added DiscardUnknownFields API for python protobuf message.
  134. Objective-C (Beta)
  135. * Proto comments now come over as HeaderDoc comments in the generated sources
  136. so Xcode can pick them up and display them.
  137. * The library headers have been updated to use HeaderDoc comments so Xcode can
  138. pick them up and display them.
  139. * The per message and per field overhead in both generated code and runtime
  140. object sizes was reduced.
  141. * Generated code now include deprecated annotations when the proto file
  142. included them.
  143. C# (Beta)
  144. In general: some changes are breaking, which require regenerating messages.
  145. Most user-written code will not be impacted *except* for the renaming of enum
  146. values.
  147. * Allow custom type URL prefixes in `Any` packing, and ignore them when
  148. unpacking
  149. * `protoc` is now in a separate NuGet package (Google.Protobuf.Tools)
  150. * New option: `internal_access` to generate internal classes
  151. * Enum values are now PascalCased, and if there's a prefix which matches the
  152. name of the enum, that is removed (so an enum `COLOR` with a value
  153. `COLOR_BLUE` would generate a value of just `Blue`). An option
  154. (`legacy_enum_values`) is temporarily available to disable this, but the
  155. option will be removed for GA.
  156. * `json_name` option is now honored
  157. * If group tags are encountered when parsing, they are validated more
  158. thoroughly (although we don't support actual groups)
  159. * NuGet dependencies are better specified
  160. * Breaking: `Preconditions` is renamed to `ProtoPreconditions`
  161. * Breaking: `GeneratedCodeInfo` is renamed to `GeneratedClrTypeInfo`
  162. * `JsonFormatter` now allows writing to a `TextWriter`
  163. * New interface, `ICustomDiagnosticMessage` to allow more compact
  164. representations from `ToString`
  165. * `CodedInputStream` and `CodedOutputStream` now implement `IDisposable`,
  166. which simply disposes of the streams they were constructed with
  167. * Map fields no longer support null values (in line with other languages)
  168. * Improvements in JSON formatting and parsing
  169. Javascript (Alpha)
  170. * Better support for "bytes" fields: bytes fields can be read as either a
  171. base64 string or UInt8Array (in environments where TypedArray is supported).
  172. * New support for CommonJS imports. This should make it easier to use the
  173. JavaScript support in Node.js and tools like WebPack. See js/README.md for
  174. more information.
  175. * Some significant internal refactoring to simplify and modularize the code.
  176. Ruby (Alpha)
  177. * JSON serialization now properly uses camelCased names, with a runtime option
  178. that will preserve original names from .proto files instead.
  179. * Well-known types are now included in the distribution.
  180. * Release now includes binary gems for Windows, Mac, and Linux instead of just
  181. source gems.
  182. * Bugfix for serializing oneofs.
  183. C++/Java Lite (Alpha)
  184. A new "lite" generator parameter was introduced in the protoc for C++ and
  185. Java for Proto3 syntax messages. Example usage:
  186. ./protoc --cpp_out=lite:$OUTPUT_PATH foo.proto
  187. The protoc will treat the current input and all the transitive dependencies
  188. as LITE. The same generator parameter must be used to generate the
  189. dependencies.
  190. In Proto3 syntax files, "optimized_for=LITE_RUNTIME" is no longer supported.
  191. 2015-12-30 version 3.0.0-beta-2 (C++/Java/Python/Ruby/Nano/Objective-C/C#/JavaScript)
  192. General
  193. * Introduced a new language implementation: JavaScript.
  194. * Added a new field option "json_name". By default proto field names are
  195. converted to "lowerCamelCase" in proto3 JSON format. This option can be
  196. used to override this behavior and specify a different JSON name for the
  197. field.
  198. * Added conformance tests to ensure implementations are following proto3 JSON
  199. specification.
  200. C++ (Beta)
  201. * Various bug fixes and improvements to the JSON support utility:
  202. - Duplicate map keys in JSON are now rejected (i.e., translation will
  203. fail).
  204. - Fixed wire-format for google.protobuf.Value/ListValue.
  205. - Fixed precision loss when converting google.protobuf.Timestamp.
  206. - Fixed a bug when parsing invalid UTF-8 code points.
  207. - Fixed a memory leak.
  208. - Reduced call stack usage.
  209. Java (Beta)
  210. * Cleaned up some unused methods on CodedOutputStream.
  211. * Presized lists for packed fields during parsing in the lite runtime to
  212. reduce allocations and improve performance.
  213. * Improved the performance of unknown fields in the lite runtime.
  214. * Introduced UnsafeByteStrings to support zero-copy ByteString creation.
  215. * Various bug fixes and improvements to the JSON support utility:
  216. - Fixed a thread-safety bug.
  217. - Added a new option “preservingProtoFieldNames” to JsonFormat.
  218. - Added a new option “includingDefaultValueFields” to JsonFormat.
  219. - Updated the JSON utility to comply with proto3 JSON specification.
  220. Python (Beta)
  221. * Added proto3 JSON format utility. It includes support for all field types
  222. and a few well-known types except for Any and Struct.
  223. * Added runtime support for Any, Timestamp, Duration and FieldMask.
  224. * [ ] is now accepted for repeated scalar fields in text format parser.
  225. * Map fields now have proper O(1) performance for lookup/insert/delete
  226. when using the Python/C++ implementation. They were previously using O(n)
  227. search-based algorithms because the C++ reflection interface didn't
  228. support true map operations.
  229. Objective-C (Beta)
  230. * Various bug-fixes and code tweaks to pass more strict compiler warnings.
  231. * Now has conformance test coverage and is passing all tests.
  232. C# (Beta)
  233. * Various bug-fixes.
  234. * Code generation: Files generated in directories based on namespace.
  235. * Code generation: Include comments from .proto files in XML doc
  236. comments (naively)
  237. * Code generation: Change organization/naming of "reflection class" (access
  238. to file descriptor)
  239. * Code generation and library: Add Parser property to MessageDescriptor,
  240. and introduce a non-generic parser type.
  241. * Library: Added TypeRegistry to support JSON parsing/formatting of Any.
  242. * Library: Added Any.Pack/Unpack support.
  243. * Library: Implemented JSON parsing.
  244. Javascript (Alpha)
  245. * Added proto3 support for JavaScript. The runtime is written in pure
  246. JavaScript and works in browsers and in Node.js. To generate JavaScript
  247. code for your proto, invoke protoc with "--js_out". See js/README.md
  248. for more build instructions.
  249. 2015-08-26 version 3.0.0-beta-1 (C++/Java/Python/Ruby/Nano/Objective-C/C#)
  250. About Beta
  251. * This is the first beta release of protobuf v3.0.0. Not all languages
  252. have reached beta stage. Languages not marked as beta are still in
  253. alpha (i.e., be prepared for API breaking changes).
  254. General
  255. * Proto3 JSON is supported in several languages (fully supported in C++
  256. and Java, partially supported in Ruby/C#). The JSON spec is defined in
  257. the proto3 language guide:
  258. https://developers.google.com/protocol-buffers/docs/proto3#json
  259. We will publish a more detailed spec to define the exact behavior of
  260. proto3-conformant JSON serializers and parsers. Until then, do not rely
  261. on specific behaviors of the implementation if it’s not documented in
  262. the above spec. More specifically, the behavior is not yet finalized for
  263. the following:
  264. - Parsing invalid JSON input (e.g., input with trailing commas).
  265. - Non-camelCase names in JSON input.
  266. - The same field appears multiple times in JSON input.
  267. - JSON arrays contain “null” values.
  268. - The message has unknown fields.
  269. * Proto3 now enforces strict UTF-8 checking. Parsing will fail if a string
  270. field contains non UTF-8 data.
  271. C++ (Beta)
  272. * Introduced new utility functions/classes in the google/protobuf/util
  273. directory:
  274. - MessageDifferencer: compare two proto messages and report their
  275. differences.
  276. - JsonUtil: support converting protobuf binary format to/from JSON.
  277. - TimeUtil: utility functions to work with well-known types Timestamp
  278. and Duration.
  279. - FieldMaskUtil: utility functions to work with FieldMask.
  280. * Performance optimization of arena construction and destruction.
  281. * Bug fixes for arena and maps support.
  282. * Changed to use cmake for Windows Visual Studio builds.
  283. * Added Bazel support.
  284. Java (Beta)
  285. * Introduced a new util package that will be distributed as a separate
  286. artifact in maven. It contains:
  287. - JsonFormat: convert proto messages to/from JSON.
  288. - TimeUtil: utility functions to work with Timestamp and Duration.
  289. - FieldMaskUtil: utility functions to work with FieldMask.
  290. * The static PARSER in each generated message is deprecated, and it will
  291. be removed in a future release. A static parser() getter is generated
  292. for each message type instead.
  293. * Performance optimizations for String fields serialization.
  294. * Performance optimizations for Lite runtime on Android:
  295. - Reduced allocations
  296. - Reduced method overhead after ProGuarding
  297. - Reduced code size after ProGuarding
  298. Python (Alpha)
  299. * Removed legacy Python 2.5 support.
  300. * Moved to a single Python 2.x/3.x-compatible codebase, instead of using 2to3.
  301. * Fixed build/tests on Python 2.6, 2.7, 3.3, and 3.4.
  302. - Pure-Python works on all four.
  303. - Python/C++ implementation works on all but 3.4, due to changes in the
  304. Python/C++ API in 3.4.
  305. * Some preliminary work has been done to allow for multiple DescriptorPools
  306. with Python/C++.
  307. Ruby (Alpha)
  308. * Many bugfixes:
  309. - fixed parsing/serialization of bytes, sint, sfixed types
  310. - other parser bugfixes
  311. - fixed memory leak affecting Ruby 2.2
  312. JavaNano (Alpha)
  313. * JavaNano generated code now will be put in a nano package by default to
  314. avoid conflicts with Java generated code.
  315. Objective-C (Alpha)
  316. * Added non-null markup to ObjC library. Requires SDK 8.4+ to build.
  317. * Many bugfixes:
  318. - Removed the class/enum filter.
  319. - Renamed some internal types to avoid conflicts with the well-known types
  320. protos.
  321. - Added missing support for parsing repeated primitive fields in packed or
  322. unpacked forms.
  323. - Added *Count for repeated and map<> fields to avoid auto-create when
  324. checking for them being set.
  325. C# (Alpha)
  326. * Namespace changed to Google.Protobuf (and NuGet package will be named
  327. correspondingly).
  328. * Target platforms now .NET 4.5 and selected portable subsets only.
  329. * Removed lite runtime.
  330. * Reimplementation to use mutable message types.
  331. * Null references used to represent "no value" for message type fields.
  332. * Proto3 semantics supported; proto2 files are prohibited for C# codegen.
  333. Most proto3 features supported:
  334. - JSON formatting (a.k.a. serialization to JSON), including well-known
  335. types (except for Any).
  336. - Wrapper types mapped to nullable value types (or string/ByteString
  337. allowing nullability). JSON parsing is not supported yet.
  338. - maps
  339. - oneof
  340. - enum unknown value preservation
  341. 2015-05-25 version 3.0.0-alpha-3 (Objective-C/C#):
  342. General
  343. * Introduced two new language implementations (Objective-C, C#) to proto3.
  344. * Explicit "optional" keyword are disallowed in proto3 syntax, as fields are
  345. optional by default.
  346. * Group fields are no longer supported in proto3 syntax.
  347. * Changed repeated primitive fields to use packed serialization by default in
  348. proto3 (implemented for C++, Java, Python in this release). The user can
  349. still disable packed serialization by setting packed to false for now.
  350. * Added well-known type protos (any.proto, empty.proto, timestamp.proto,
  351. duration.proto, etc.). Users can import and use these protos just like
  352. regular proto files. Additional runtime support will be added for them in
  353. future releases (in the form of utility helper functions, or having them
  354. replaced by language specific types in generated code).
  355. * Added a "reserved" keyword in both proto2 and proto3 syntax. User can use
  356. this keyword to declare reserved field numbers and names to prevent them
  357. from being reused by other fields in the same message.
  358. To reserve field numbers, add a reserved declaration in your message:
  359. message TestMessage {
  360. reserved 2, 15, 9 to 11, 3;
  361. }
  362. This reserves field numbers 2, 3, 9, 10, 11 and 15. If a user uses any of
  363. these as field numbers, the protocol buffer compiler will report an error.
  364. Field names can also be reserved:
  365. message TestMessage {
  366. reserved "foo", "bar";
  367. }
  368. * Various bug fixes since 3.0.0-alpha-2
  369. Objective-C
  370. Objective-C includes a code generator and a native objective-c runtime
  371. library. By adding “--objc_out” to protoc, the code generator will generate
  372. a header(*.pbobjc.h) and an implementation file(*.pbobjc.m) for each proto
  373. file.
  374. In this first release, the generated interface provides: enums, messages,
  375. field support(single, repeated, map, oneof), proto2 and proto3 syntax
  376. support, parsing and serialization. It’s compatible with ARC and non-ARC
  377. usage. Besides, user can also access it via the swift bridging header.
  378. See objectivec/README.md for details.
  379. C#
  380. * C# protobufs are based on project
  381. https://github.com/jskeet/protobuf-csharp-port. The original project was
  382. frozen and all the new development will happen here.
  383. * Codegen plugin for C# was completely rewritten to C++ and is now an
  384. integral part of protoc.
  385. * Some refactorings and cleanup has been applied to the C# runtime library.
  386. * Only proto2 is supported in C# at the moment, proto3 support is in
  387. progress and will likely bring significant breaking changes to the API.
  388. See csharp/README.md for details.
  389. C++
  390. * Added runtime support for Any type. To use Any in your proto file, first
  391. import the definition of Any:
  392. // foo.proto
  393. import "google/protobuf/any.proto";
  394. message Foo {
  395. google.protobuf.Any any_field = 1;
  396. }
  397. message Bar {
  398. int32 value = 1;
  399. }
  400. Then in C++ you can access the Any field using PackFrom()/UnpackTo()
  401. methods:
  402. Foo foo;
  403. Bar bar = ...;
  404. foo.mutable_any_field()->PackFrom(bar);
  405. ...
  406. if (foo.any_field().IsType<Bar>()) {
  407. foo.any_field().UnpackTo(&bar);
  408. ...
  409. }
  410. * In text format, entries of a map field will be sorted by key.
  411. Java
  412. * Continued optimizations on the lite runtime to improve performance for
  413. Android.
  414. Python
  415. * Added map support.
  416. - maps now have a dict-like interface (msg.map_field[key] = value)
  417. - existing code that modifies maps via the repeated field interface
  418. will need to be updated.
  419. Ruby
  420. * Improvements to RepeatedField's emulation of the Ruby Array API.
  421. * Various speedups and internal cleanups.
  422. 2015-02-26 version 3.0.0-alpha-2 (Python/Ruby/JavaNano):
  423. General
  424. * Introduced three new language implementations (Ruby, JavaNano, and
  425. Python) to proto3.
  426. * Various bug fixes since 3.0.0-alpha-1
  427. Python:
  428. Python has received several updates, most notably support for proto3
  429. semantics in any .proto file that declares syntax="proto3".
  430. Messages declared in proto3 files no longer represent field presence
  431. for scalar fields (number, enums, booleans, or strings). You can
  432. no longer call HasField() for such fields, and they are serialized
  433. based on whether they have a non-zero/empty/false value.
  434. One other notable change is in the C++-accelerated implementation.
  435. Descriptor objects (which describe the protobuf schema and allow
  436. reflection over it) are no longer duplicated between the Python
  437. and C++ layers. The Python descriptors are now simple wrappers
  438. around the C++ descriptors. This change should significantly
  439. reduce the memory usage of programs that use a lot of message
  440. types.
  441. Ruby:
  442. We have added proto3 support for Ruby via a native C extension.
  443. The Ruby extension itself is included in the ruby/ directory, and details on
  444. building and installing the extension are in ruby/README.md. The extension
  445. will also be published as a Ruby gem. Code generator support is included as
  446. part of `protoc` with the `--ruby_out` flag.
  447. The Ruby extension implements a user-friendly DSL to define message types
  448. (also generated by the code generator from `.proto` files). Once a message
  449. type is defined, the user may create instances of the message that behave in
  450. ways idiomatic to Ruby. For example:
  451. - Message fields are present as ordinary Ruby properties (getter method
  452. `foo` and setter method `foo=`).
  453. - Repeated field elements are stored in a container that acts like a native
  454. Ruby array, and map elements are stored in a container that acts like a
  455. native Ruby hashmap.
  456. - The usual well-known methods, such as `#to_s`, `#dup`, and the like, are
  457. present.
  458. Unlike several existing third-party Ruby extensions for protobuf, this
  459. extension is built on a "strongly-typed" philosophy: message fields and
  460. array/map containers will throw exceptions eagerly when values of the
  461. incorrect type are inserted.
  462. See ruby/README.md for details.
  463. JavaNano:
  464. JavaNano is a special code generator and runtime library designed especially
  465. for resource-restricted systems, like Android. It is very resource-friendly
  466. in both the amount of code and the runtime overhead. Here is an an overview
  467. of JavaNano features compared with the official Java protobuf:
  468. - No descriptors or message builders.
  469. - All messages are mutable; fields are public Java fields.
  470. - For optional fields only, encapsulation behind setter/getter/hazzer/
  471. clearer functions is opt-in, which provide proper 'has' state support.
  472. - For proto2, if not opted in, has state (field presence) is not available.
  473. Serialization outputs all fields not equal to their defaults.
  474. The behavior is consistent with proto3 semantics.
  475. - Required fields (proto2 only) are always serialized.
  476. - Enum constants are integers; protection against invalid values only
  477. when parsing from the wire.
  478. - Enum constants can be generated into container interfaces bearing
  479. the enum's name (so the referencing code is in Java style).
  480. - CodedInputByteBufferNano can only take byte[] (not InputStream).
  481. - Similarly CodedOutputByteBufferNano can only write to byte[].
  482. - Repeated fields are in arrays, not ArrayList or Vector. Null array
  483. elements are allowed and silently ignored.
  484. - Full support for serializing/deserializing repeated packed fields.
  485. - Support extensions (in proto2).
  486. - Unset messages/groups are null, not an immutable empty default
  487. instance.
  488. - toByteArray(...) and mergeFrom(...) are now static functions of
  489. MessageNano.
  490. - The 'bytes' type translates to the Java type byte[].
  491. See javanano/README.txt for details.
  492. 2014-12-01 version 3.0.0-alpha-1 (C++/Java):
  493. General
  494. * Introduced Protocol Buffers language version 3 (aka proto3).
  495. When protobuf was initially opensourced it implemented Protocol Buffers
  496. language version 2 (aka proto2), which is why the version number
  497. started from v2.0.0. From v3.0.0, a new language version (proto3) is
  498. introduced while the old version (proto2) will continue to be supported.
  499. The main intent of introducing proto3 is to clean up protobuf before
  500. pushing the language as the foundation of Google's new API platform.
  501. In proto3, the language is simplified, both for ease of use and to
  502. make it available in a wider range of programming languages. At the
  503. same time a few features are added to better support common idioms
  504. found in APIs.
  505. The following are the main new features in language version 3:
  506. 1. Removal of field presence logic for primitive value fields, removal
  507. of required fields, and removal of default values. This makes proto3
  508. significantly easier to implement with open struct representations,
  509. as in languages like Android Java, Objective C, or Go.
  510. 2. Removal of unknown fields.
  511. 3. Removal of extensions, which are instead replaced by a new standard
  512. type called Any.
  513. 4. Fix semantics for unknown enum values.
  514. 5. Addition of maps.
  515. 6. Addition of a small set of standard types for representation of time,
  516. dynamic data, etc.
  517. 7. A well-defined encoding in JSON as an alternative to binary proto
  518. encoding.
  519. This release (v3.0.0-alpha-1) includes partial proto3 support for C++ and
  520. Java. Items 6 (well-known types) and 7 (JSON format) in the above feature
  521. list are not implemented.
  522. A new notion "syntax" is introduced to specify whether a .proto file
  523. uses proto2 or proto3:
  524. // foo.proto
  525. syntax = "proto3";
  526. message Bar {...}
  527. If omitted, the protocol compiler will generate a warning and "proto2" will
  528. be used as the default. This warning will be turned into an error in a
  529. future release.
  530. We recommend that new Protocol Buffers users use proto3. However, we do not
  531. generally recommend that existing users migrate from proto2 from proto3 due
  532. to API incompatibility, and we will continue to support proto2 for a long
  533. time.
  534. * Added support for map fields (implemented in C++/Java for both proto2 and
  535. proto3).
  536. Map fields can be declared using the following syntax:
  537. message Foo {
  538. map<string, string> values = 1;
  539. }
  540. Data of a map field will be stored in memory as an unordered map and it
  541. can be accessed through generated accessors.
  542. C++
  543. * Added arena allocation support (for both proto2 and proto3).
  544. Profiling shows memory allocation and deallocation constitutes a significant
  545. fraction of CPU-time spent in protobuf code and arena allocation is a
  546. technique introduced to reduce this cost. With arena allocation, new
  547. objects will be allocated from a large piece of preallocated memory and
  548. deallocation of these objects is almost free. Early adoption shows 20% to
  549. 50% improvement in some Google binaries.
  550. To enable arena support, add the following option to your .proto file:
  551. option cc_enable_arenas = true;
  552. Protocol compiler will generate additional code to make the generated
  553. message classes work with arenas. This does not change the existing API
  554. of protobuf messages and does not affect wire format. Your existing code
  555. should continue to work after adding this option. In the future we will
  556. make this option enabled by default.
  557. To actually take advantage of arena allocation, you need to use the arena
  558. APIs when creating messages. A quick example of using the arena API:
  559. {
  560. google::protobuf::Arena arena;
  561. // Allocate a protobuf message in the arena.
  562. MyMessage* message = Arena::CreateMessage<MyMessage>(&arena);
  563. // All submessages will be allocated in the same arena.
  564. if (!message->ParseFromString(data)) {
  565. // Deal with malformed input data.
  566. }
  567. // Must not delete the message here. It will be deleted automatically
  568. // when the arena is destroyed.
  569. }
  570. Currently arena does not work with map fields. Enabling arena in a .proto
  571. file containing map fields will result in compile errors in the generated
  572. code. This will be addressed in a future release.
  573. 2014-10-20 version 2.6.1:
  574. C++
  575. * Added atomicops support for Solaris.
  576. * Released memory allocated by InitializeDefaultRepeatedFields() and
  577. GetEmptyString(). Some memory sanitizers reported them as memory leaks.
  578. Java
  579. * Updated DynamicMessage.setField() to handle repeated enum values
  580. correctly.
  581. * Fixed a bug that caused NullPointerException to be thrown when
  582. converting manually constructed FileDescriptorProto to
  583. FileDescriptor.
  584. Python
  585. * Fixed WhichOneof() to work with de-serialized protobuf messages.
  586. * Fixed a missing file problem of Python C++ implementation.
  587. 2014-08-15 version 2.6.0:
  588. General
  589. * Added oneofs(unions) feature. Fields in the same oneof will share
  590. memory and at most one field can be set at the same time. Use the
  591. oneof keyword to define a oneof like:
  592. message SampleMessage {
  593. oneof test_oneof {
  594. string name = 4;
  595. YourMessage sub_message = 9;
  596. }
  597. }
  598. * Files, services, enums, messages, methods and enum values can be marked
  599. as deprecated now.
  600. * Added Support for list values, including lists of messages, when
  601. parsing text-formatted protos in C++ and Java.
  602. For example: foo: [1, 2, 3]
  603. C++
  604. * Enhanced customization on TestFormat printing.
  605. * Added SwapFields() in reflection API to swap a subset of fields.
  606. Added SetAllocatedMessage() in reflection API.
  607. * Repeated primitive extensions are now packable. The
  608. [packed=true] option only affects serializers. Therefore, it is
  609. possible to switch a repeated extension field to packed format
  610. without breaking backwards-compatibility.
  611. * Various speed optimizations.
  612. Java
  613. * writeTo() method in ByteString can now write a substring to an
  614. output stream. Added endWith() method for ByteString.
  615. * ByteString and ByteBuffer are now supported in CodedInputStream
  616. and CodedOutputStream.
  617. * java_generate_equals_and_hash can now be used with the LITE_RUNTIME.
  618. Python
  619. * A new C++-backed extension module (aka "cpp api v2") that replaces the
  620. old ("cpp api v1") one. Much faster than the pure Python code. This one
  621. resolves many bugs and is recommended for general use over the
  622. pure Python when possible.
  623. * Descriptors now have enum_types_by_name and extension_types_by_name dict
  624. attributes.
  625. * Support for Python 3.
  626. 2013-02-27 version 2.5.0:
  627. General
  628. * New notion "import public" that allows a proto file to forward the content
  629. it imports to its importers. For example,
  630. // foo.proto
  631. import public "bar.proto";
  632. import "baz.proto";
  633. // qux.proto
  634. import "foo.proto";
  635. // Stuff defined in bar.proto may be used in this file, but stuff from
  636. // baz.proto may NOT be used without importing it explicitly.
  637. This is useful for moving proto files. To move a proto file, just leave
  638. a single "import public" in the old proto file.
  639. * New enum option "allow_alias" that specifies whether different symbols can
  640. be assigned the same numeric value. Default value is "true". Setting it to
  641. false causes the compiler to reject enum definitions where multiple symbols
  642. have the same numeric value.
  643. Note: We plan to flip the default value to "false" in a future release.
  644. Projects using enum aliases should set the option to "true" in their .proto
  645. files.
  646. C++
  647. * New generated method set_allocated_foo(Type* foo) for message and string
  648. fields. This method allows you to set the field to a pre-allocated object
  649. and the containing message takes the ownership of that object.
  650. * Added SetAllocatedExtension() and ReleaseExtension() to extensions API.
  651. * Custom options are now formatted correctly when descriptors are printed in
  652. text format.
  653. * Various speed optimizations.
  654. Java
  655. * Comments in proto files are now collected and put into generated code as
  656. comments for corresponding classes and data members.
  657. * Added Parser to parse directly into messages without a Builder. For
  658. example,
  659. Foo foo = Foo.PARSER.ParseFrom(input);
  660. Using Parser is ~25% faster than using Builder to parse messages.
  661. * Added getters/setters to access the underlying ByteString of a string field
  662. directly.
  663. * ByteString now supports more operations: substring(), prepend(), and
  664. append(). The implementation of ByteString uses a binary tree structure
  665. to support these operations efficiently.
  666. * New method findInitializationErrors() that lists all missing required
  667. fields.
  668. * Various code size and speed optimizations.
  669. Python
  670. * Added support for dynamic message creation. DescriptorDatabase,
  671. DescriptorPool, and MessageFactory work like their C++ counterparts to
  672. simplify Descriptor construction from *DescriptorProtos, and MessageFactory
  673. provides a message instance from a Descriptor.
  674. * Added pickle support for protobuf messages.
  675. * Unknown fields are now preserved after parsing.
  676. * Fixed bug where custom options were not correctly populated. Custom
  677. options can be accessed now.
  678. * Added EnumTypeWrapper that provides better accessibility to enum types.
  679. * Added ParseMessage(descriptor, bytes) to generate a new Message instance
  680. from a descriptor and a byte string.
  681. 2011-05-01 version 2.4.1:
  682. C++
  683. * Fixed the friendship problem for old compilers to make the library now gcc 3
  684. compatible again.
  685. * Fixed vcprojects/extract_includes.bat to extract compiler/plugin.h.
  686. Java
  687. * Removed usages of JDK 1.6 only features to make the library now JDK 1.5
  688. compatible again.
  689. * Fixed a bug about negative enum values.
  690. * serialVersionUID is now defined in generated messages for java serializing.
  691. * Fixed protoc to use java.lang.Object, which makes "Object" now a valid
  692. message name again.
  693. Python
  694. * Experimental C++ implementation now requires C++ protobuf library installed.
  695. See the README.txt in the python directory for details.
  696. 2011-02-02 version 2.4.0:
  697. General
  698. * The RPC (cc|java|py)_generic_services default value is now false instead of
  699. true.
  700. * Custom options can have aggregate types. For example,
  701. message MyOption {
  702. optional string comment = 1;
  703. optional string author = 2;
  704. }
  705. extend google.protobuf.FieldOptions {
  706. optional MyOption myoption = 12345;
  707. }
  708. This option can now be set as follows:
  709. message SomeType {
  710. optional int32 field = 1 [(myoption) = { comment:'x' author:'y' }];
  711. }
  712. C++
  713. * Various speed and code size optimizations.
  714. * Added a release_foo() method on string and message fields.
  715. * Fixed gzip_output_stream sub-stream handling.
  716. Java
  717. * Builders now maintain sub-builders for sub-messages. Use getFooBuilder() to
  718. get the builder for the sub-message "foo". This allows you to repeatedly
  719. modify deeply-nested sub-messages without rebuilding them.
  720. * Builder.build() no longer invalidates the Builder for generated messages
  721. (You may continue to modify it and then build another message).
  722. * Code generator will generate efficient equals() and hashCode()
  723. implementations if new option java_generate_equals_and_hash is enabled.
  724. (Otherwise, reflection-based implementations are used.)
  725. * Generated messages now implement Serializable.
  726. * Fields with [deprecated=true] will be marked with @Deprecated in Java.
  727. * Added lazy conversion of UTF-8 encoded strings to String objects to improve
  728. performance.
  729. * Various optimizations.
  730. * Enum value can be accessed directly, instead of calling getNumber() on the
  731. enum member.
  732. * For each enum value, an integer constant is also generated with the suffix
  733. _VALUE.
  734. Python
  735. * Added an experimental C++ implementation for Python messages via a Python
  736. extension. Implementation type is controlled by an environment variable
  737. PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION (valid values: "cpp" and "python")
  738. The default value is currently "python" but will be changed to "cpp" in
  739. future release.
  740. * Improved performance on message instantiation significantly.
  741. Most of the work on message instantiation is done just once per message
  742. class, instead of once per message instance.
  743. * Improved performance on text message parsing.
  744. * Allow add() to forward keyword arguments to the concrete class.
  745. E.g. instead of
  746. item = repeated_field.add()
  747. item.foo = bar
  748. item.baz = quux
  749. You can do:
  750. repeated_field.add(foo=bar, baz=quux)
  751. * Added a sort() interface to the BaseContainer.
  752. * Added an extend() method to repeated composite fields.
  753. * Added UTF8 debug string support.
  754. 2010-01-08 version 2.3.0:
  755. General
  756. * Parsers for repeated numeric fields now always accept both packed and
  757. unpacked input. The [packed=true] option only affects serializers.
  758. Therefore, it is possible to switch a field to packed format without
  759. breaking backwards-compatibility -- as long as all parties are using
  760. protobuf 2.3.0 or above, at least.
  761. * The generic RPC service code generated by the C++, Java, and Python
  762. generators can be disabled via file options:
  763. option cc_generic_services = false;
  764. option java_generic_services = false;
  765. option py_generic_services = false;
  766. This allows plugins to generate alternative code, possibly specific to some
  767. particular RPC implementation.
  768. protoc
  769. * Now supports a plugin system for code generators. Plugins can generate
  770. code for new languages or inject additional code into the output of other
  771. code generators. Plugins are just binaries which accept a protocol buffer
  772. on stdin and write a protocol buffer to stdout, so they may be written in
  773. any language. See src/google/protobuf/compiler/plugin.proto.
  774. **WARNING**: Plugins are experimental. The interface may change in a
  775. future version.
  776. * If the output location ends in .zip or .jar, protoc will write its output
  777. to a zip/jar archive instead of a directory. For example:
  778. protoc --java_out=myproto_srcs.jar --python_out=myproto.zip myproto.proto
  779. Currently the archive contents are not compressed, though this could change
  780. in the future.
  781. * inf, -inf, and nan can now be used as default values for float and double
  782. fields.
  783. C++
  784. * Various speed and code size optimizations.
  785. * DynamicMessageFactory is now fully thread-safe.
  786. * Message::Utf8DebugString() method is like DebugString() but avoids escaping
  787. UTF-8 bytes.
  788. * Compiled-in message types can now contain dynamic extensions, through use
  789. of CodedInputStream::SetExtensionRegistry().
  790. * Now compiles shared libraries (DLLs) by default on Cygwin and MinGW, to
  791. match other platforms. Use --disable-shared to avoid this.
  792. Java
  793. * parseDelimitedFrom() and mergeDelimitedFrom() now detect EOF and return
  794. false/null instead of throwing an exception.
  795. * Fixed some initialization ordering bugs.
  796. * Fixes for OpenJDK 7.
  797. Python
  798. * 10-25 times faster than 2.2.0, still pure-Python.
  799. * Calling a mutating method on a sub-message always instantiates the message
  800. in its parent even if the mutating method doesn't actually mutate anything
  801. (e.g. parsing from an empty string).
  802. * Expanded descriptors a bit.
  803. 2009-08-11 version 2.2.0:
  804. C++
  805. * Lite mode: The "optimize_for = LITE_RUNTIME" option causes the compiler
  806. to generate code which only depends libprotobuf-lite, which is much smaller
  807. than libprotobuf but lacks descriptors, reflection, and some other features.
  808. * Fixed bug where Message.Swap(Message) was only implemented for
  809. optimize_for_speed. Swap now properly implemented in both modes
  810. (Issue 91).
  811. * Added RemoveLast and SwapElements(index1, index2) to Reflection
  812. interface for repeated elements.
  813. * Added Swap(Message) to Reflection interface.
  814. * Floating-point literals in generated code that are intended to be
  815. single-precision now explicitly have 'f' suffix to avoid pedantic warnings
  816. produced by some compilers.
  817. * The [deprecated=true] option now causes the C++ code generator to generate
  818. a GCC-style deprecation annotation (no-op on other compilers).
  819. * google::protobuf::GetEnumDescriptor<SomeGeneratedEnumType>() returns the
  820. EnumDescriptor for that type -- useful for templates which cannot call
  821. SomeGeneratedEnumType_descriptor().
  822. * Various optimizations and obscure bug fixes.
  823. Java
  824. * Lite mode: The "optimize_for = LITE_RUNTIME" option causes the compiler
  825. to generate code which only depends libprotobuf-lite, which is much smaller
  826. than libprotobuf but lacks descriptors, reflection, and some other features.
  827. * Lots of style cleanups.
  828. Python
  829. * Fixed endianness bug with floats and doubles.
  830. * Text format parsing support.
  831. * Fix bug with parsing packed repeated fields in embedded messages.
  832. * Ability to initialize fields by passing keyword args to constructor.
  833. * Support iterators in extend and __setslice__ for containers.
  834. 2009-05-13 version 2.1.0:
  835. General
  836. * Repeated fields of primitive types (types other that string, group, and
  837. nested messages) may now use the option [packed = true] to get a more
  838. efficient encoding. In the new encoding, the entire list is written
  839. as a single byte blob using the "length-delimited" wire type. Within
  840. this blob, the individual values are encoded the same way they would
  841. be normally except without a tag before each value (thus, they are
  842. tightly "packed").
  843. * For each field, the generated code contains an integer constant assigned
  844. to the field number. For example, the .proto file:
  845. message Foo { optional int bar_baz = 123; }
  846. would generate the following constants, all with the integer value 123:
  847. C++: Foo::kBarBazFieldNumber
  848. Java: Foo.BAR_BAZ_FIELD_NUMBER
  849. Python: Foo.BAR_BAZ_FIELD_NUMBER
  850. Constants are also generated for extensions, with the same naming scheme.
  851. These constants may be used as switch cases.
  852. * Updated bundled Google Test to version 1.3.0. Google Test is now bundled
  853. in its verbatim form as a nested autoconf package, so you can drop in any
  854. other version of Google Test if needed.
  855. * optimize_for = SPEED is now the default, by popular demand. Use
  856. optimize_for = CODE_SIZE if code size is more important in your app.
  857. * It is now an error to define a default value for a repeated field.
  858. Previously, this was silently ignored (it had no effect on the generated
  859. code).
  860. * Fields can now be marked deprecated like:
  861. optional int32 foo = 1 [deprecated = true];
  862. Currently this does not have any actual effect, but in the future the code
  863. generators may generate deprecation annotations in each language.
  864. * Cross-compiling should now be possible using the --with-protoc option to
  865. configure. See README.txt for more info.
  866. protoc
  867. * --error_format=msvs option causes errors to be printed in Visual Studio
  868. format, which should allow them to be clicked on in the build log to go
  869. directly to the error location.
  870. * The type name resolver will no longer resolve type names to fields. For
  871. example, this now works:
  872. message Foo {}
  873. message Bar {
  874. optional int32 Foo = 1;
  875. optional Foo baz = 2;
  876. }
  877. Previously, the type of "baz" would resolve to "Bar.Foo", and you'd get
  878. an error because Bar.Foo is a field, not a type. Now the type of "baz"
  879. resolves to the message type Foo. This change is unlikely to make a
  880. difference to anyone who follows the Protocol Buffers style guide.
  881. C++
  882. * Several optimizations, including but not limited to:
  883. - Serialization, especially to flat arrays, is 10%-50% faster, possibly
  884. more for small objects.
  885. - Several descriptor operations which previously required locking no longer
  886. do.
  887. - Descriptors are now constructed lazily on first use, rather than at
  888. process startup time. This should save memory in programs which do not
  889. use descriptors or reflection.
  890. - UnknownFieldSet completely redesigned to be more efficient (especially in
  891. terms of memory usage).
  892. - Various optimizations to reduce code size (though the serialization speed
  893. optimizations increased code size).
  894. * Message interface has method ParseFromBoundedZeroCopyStream() which parses
  895. a limited number of bytes from an input stream rather than parsing until
  896. EOF.
  897. * GzipInputStream and GzipOutputStream support reading/writing gzip- or
  898. zlib-compressed streams if zlib is available.
  899. (google/protobuf/io/gzip_stream.h)
  900. * DescriptorPool::FindAllExtensions() and corresponding
  901. DescriptorDatabase::FindAllExtensions() can be used to enumerate all
  902. extensions of a given type.
  903. * For each enum type Foo, protoc will generate functions:
  904. const string& Foo_Name(Foo value);
  905. bool Foo_Parse(const string& name, Foo* result);
  906. The former returns the name of the enum constant corresponding to the given
  907. value while the latter finds the value corresponding to a name.
  908. * RepeatedField and RepeatedPtrField now have back-insertion iterators.
  909. * String fields now have setters that take a char* and a size, in addition
  910. to the existing ones that took char* or const string&.
  911. * DescriptorPool::AllowUnknownDependencies() may be used to tell
  912. DescriptorPool to create placeholder descriptors for unknown entities
  913. referenced in a FileDescriptorProto. This can allow you to parse a .proto
  914. file without having access to other .proto files that it imports, for
  915. example.
  916. * Updated gtest to latest version. The gtest package is now included as a
  917. nested autoconf package, so it should be able to drop new versions into the
  918. "gtest" subdirectory without modification.
  919. Java
  920. * Fixed bug where Message.mergeFrom(Message) failed to merge extensions.
  921. * Message interface has new method toBuilder() which is equivalent to
  922. newBuilderForType().mergeFrom(this).
  923. * All enums now implement the ProtocolMessageEnum interface.
  924. * Setting a field to null now throws NullPointerException.
  925. * Fixed tendency for TextFormat's parsing to overflow the stack when
  926. parsing large string values. The underlying problem is with Java's
  927. regex implementation (which unfortunately uses recursive backtracking
  928. rather than building an NFA). Worked around by making use of possessive
  929. quantifiers.
  930. * Generated service classes now also generate pure interfaces. For a service
  931. Foo, Foo.Interface is a pure interface containing all of the service's
  932. defined methods. Foo.newReflectiveService() can be called to wrap an
  933. instance of this interface in a class that implements the generic
  934. RpcService interface, which provides reflection support that is usually
  935. needed by RPC server implementations.
  936. * RPC interfaces now support blocking operation in addition to non-blocking.
  937. The protocol compiler generates separate blocking and non-blocking stubs
  938. which operate against separate blocking and non-blocking RPC interfaces.
  939. RPC implementations will have to implement the new interfaces in order to
  940. support blocking mode.
  941. * New I/O methods parseDelimitedFrom(), mergeDelimitedFrom(), and
  942. writeDelimitedTo() read and write "delimited" messages from/to a stream,
  943. meaning that the message size precedes the data. This way, you can write
  944. multiple messages to a stream without having to worry about delimiting
  945. them yourself.
  946. * Throw a more descriptive exception when build() is double-called.
  947. * Add a method to query whether CodedInputStream is at the end of the input
  948. stream.
  949. * Add a method to reset a CodedInputStream's size counter; useful when
  950. reading many messages with the same stream.
  951. * equals() and hashCode() now account for unknown fields.
  952. Python
  953. * Added slicing support for repeated scalar fields. Added slice retrieval and
  954. removal of repeated composite fields.
  955. * Updated RPC interfaces to allow for blocking operation. A client may
  956. now pass None for a callback when making an RPC, in which case the
  957. call will block until the response is received, and the response
  958. object will be returned directly to the caller. This interface change
  959. cannot be used in practice until RPC implementations are updated to
  960. implement it.
  961. * Changes to input_stream.py should make protobuf compatible with appengine.
  962. 2008-11-25 version 2.0.3:
  963. protoc
  964. * Enum values may now have custom options, using syntax similar to field
  965. options.
  966. * Fixed bug where .proto files which use custom options but don't actually
  967. define them (i.e. they import another .proto file defining the options)
  968. had to explicitly import descriptor.proto.
  969. * Adjacent string literals in .proto files will now be concatenated, like in
  970. C.
  971. * If an input file is a Windows absolute path (e.g. "C:\foo\bar.proto") and
  972. the import path only contains "." (or contains "." but does not contain
  973. the file), protoc incorrectly thought that the file was under ".", because
  974. it thought that the path was relative (since it didn't start with a slash).
  975. This has been fixed.
  976. C++
  977. * Generated message classes now have a Swap() method which efficiently swaps
  978. the contents of two objects.
  979. * All message classes now have a SpaceUsed() method which returns an estimate
  980. of the number of bytes of allocated memory currently owned by the object.
  981. This is particularly useful when you are reusing a single message object
  982. to improve performance but want to make sure it doesn't bloat up too large.
  983. * New method Message::SerializeAsString() returns a string containing the
  984. serialized data. May be more convenient than calling
  985. SerializeToString(string*).
  986. * In debug mode, log error messages when string-type fields are found to
  987. contain bytes that are not valid UTF-8.
  988. * Fixed bug where a message with multiple extension ranges couldn't parse
  989. extensions.
  990. * Fixed bug where MergeFrom(const Message&) didn't do anything if invoked on
  991. a message that contained no fields (but possibly contained extensions).
  992. * Fixed ShortDebugString() to not be O(n^2). Durr.
  993. * Fixed crash in TextFormat parsing if the first token in the input caused a
  994. tokenization error.
  995. * Fixed obscure bugs in zero_copy_stream_impl.cc.
  996. * Added support for HP C++ on Tru64.
  997. * Only build tests on "make check", not "make".
  998. * Fixed alignment issue that caused crashes when using DynamicMessage on
  999. 64-bit Sparc machines.
  1000. * Simplify template usage to work with MSVC 2003.
  1001. * Work around GCC 4.3.x x86_64 compiler bug that caused crashes on startup.
  1002. (This affected Fedora 9 in particular.)
  1003. * Now works on "Solaris 10 using recent Sun Studio".
  1004. Java
  1005. * New overload of mergeFrom() which parses a slice of a byte array instead
  1006. of the whole thing.
  1007. * New method ByteString.asReadOnlyByteBuffer() does what it sounds like.
  1008. * Improved performance of isInitialized() when optimizing for code size.
  1009. Python
  1010. * Corrected ListFields() signature in Message base class to match what
  1011. subclasses actually implement.
  1012. * Some minor refactoring.
  1013. * Don't pass self as first argument to superclass constructor (no longer
  1014. allowed in Python 2.6).
  1015. 2008-09-29 version 2.0.2:
  1016. General
  1017. * License changed from Apache 2.0 to New BSD.
  1018. * It is now possible to define custom "options", which are basically
  1019. annotations which may be placed on definitions in a .proto file.
  1020. For example, you might define a field option called "foo" like so:
  1021. import "google/protobuf/descriptor.proto"
  1022. extend google.protobuf.FieldOptions {
  1023. optional string foo = 12345;
  1024. }
  1025. Then you annotate a field using the "foo" option:
  1026. message MyMessage {
  1027. optional int32 some_field = 1 [(foo) = "bar"]
  1028. }
  1029. The value of this option is then visible via the message's
  1030. Descriptor:
  1031. const FieldDescriptor* field =
  1032. MyMessage::descriptor()->FindFieldByName("some_field");
  1033. assert(field->options().GetExtension(foo) == "bar");
  1034. This feature has been implemented and tested in C++ and Java.
  1035. Other languages may or may not need to do extra work to support
  1036. custom options, depending on how they construct descriptors.
  1037. C++
  1038. * Fixed some GCC warnings that only occur when using -pedantic.
  1039. * Improved static initialization code, making ordering more
  1040. predictable among other things.
  1041. * TextFormat will no longer accept messages which contain multiple
  1042. instances of a singular field. Previously, the latter instance
  1043. would overwrite the former.
  1044. * Now works on systems that don't have hash_map.
  1045. Java
  1046. * Print @Override annotation in generated code where appropriate.
  1047. Python
  1048. * Strings now use the "unicode" type rather than the "str" type.
  1049. String fields may still be assigned ASCII "str" values; they will
  1050. automatically be converted.
  1051. * Adding a property to an object representing a repeated field now
  1052. raises an exception. For example:
  1053. # No longer works (and never should have).
  1054. message.some_repeated_field.foo = 1
  1055. Windows
  1056. * We now build static libraries rather than DLLs by default on MSVC.
  1057. See vsprojects/readme.txt for more information.
  1058. 2008-08-15 version 2.0.1:
  1059. protoc
  1060. * New flags --encode and --decode can be used to convert between protobuf text
  1061. format and binary format from the command-line.
  1062. * New flag --descriptor_set_out can be used to write FileDescriptorProtos for
  1063. all parsed files directly into a single output file. This is particularly
  1064. useful if you wish to parse .proto files from programs written in languages
  1065. other than C++: just run protoc as a background process and have it output
  1066. a FileDescriptorList, then parse that natively.
  1067. * Improved error message when an enum value's name conflicts with another
  1068. symbol defined in the enum type's scope, e.g. if two enum types declared
  1069. in the same scope have values with the same name. This is disallowed for
  1070. compatibility with C++, but this wasn't clear from the error.
  1071. * Fixed absolute output paths on Windows.
  1072. * Allow trailing slashes in --proto_path mappings.
  1073. C++
  1074. * Reflection objects are now per-class rather than per-instance. To make this
  1075. possible, the Reflection interface had to be changed such that all methods
  1076. take the Message instance as a parameter. This change improves performance
  1077. significantly in memory-bandwidth-limited use cases, since it makes the
  1078. message objects smaller. Note that source-incompatible interface changes
  1079. like this will not be made again after the library leaves beta.
  1080. * Heuristically detect sub-messages when printing unknown fields.
  1081. * Fix static initialization ordering bug that caused crashes at startup when
  1082. compiling on Mac with static linking.
  1083. * Fixed TokenizerTest when compiling with -DNDEBUG on Linux.
  1084. * Fixed incorrect definition of kint32min.
  1085. * Fix bytes type setter to work with byte sequences with embedded NULLs.
  1086. * Other irrelevant tweaks.
  1087. Java
  1088. * Fixed UnknownFieldSet's parsing of varints larger than 32 bits.
  1089. * Fixed TextFormat's parsing of "inf" and "nan".
  1090. * Fixed TextFormat's parsing of comments.
  1091. * Added info to Java POM that will be required when we upload the
  1092. package to a Maven repo.
  1093. Python
  1094. * MergeFrom(message) and CopyFrom(message) are now implemented.
  1095. * SerializeToString() raises an exception if the message is missing required
  1096. fields.
  1097. * Code organization improvements.
  1098. * Fixed doc comments for RpcController and RpcChannel, which had somehow been
  1099. swapped.
  1100. * Fixed text_format_test on Windows where floating-point exponents sometimes
  1101. contain extra zeros.
  1102. * Fix Python service CallMethod() implementation.
  1103. Other
  1104. * Improved readmes.
  1105. * VIM syntax highlighting improvements.
  1106. 2008-07-07 version 2.0.0:
  1107. * First public release.