26837 commits
Author | SHA1 | Message | Date | |
---|---|---|---|---|
jdolecek
|
e42ae442b8 | mention 7.1.x goodness, asynchronous signal handling | ||
kamil
|
6877ffb817 |
Upgrade py-protobuf from 2.6.1 to 3.0.0
This version is backward compatible with proto2. Upstream changelog: Version 3.0.0 This change log summarizes all the changes since the last stable release (v2.6.1). See the last section about changes since v3.0.0-beta-4. Proto3 Introduced Protocol Buffers language version 3 (aka proto3). When protocol buffers was initially open sourced it implemented Protocol Buffers language version 2 (aka proto2), which is why the version number started from v2.0.0. From v3.0.0, a new language version (proto3) is introduced while the old version (proto2) will continue to be supported. The main intent of introducing proto3 is to clean up protobuf before pushing the language as the foundation of Google's new API platform. In proto3, the language is simplified, both for ease of use and to make it available in a wider range of programming languages. At the same time a few features are added to better support common idioms found in APIs. The following are the main new features in language version 3: Removal of field presence logic for primitive value fields, removal of required fields, and removal of default values. This makes proto3 significantly easier to implement with open struct representations, as in languages like Android Java, Objective C, or Go. Removal of unknown fields. Removal of extensions, which are instead replaced by a new standard type called Any. Fix semantics for unknown enum values. Addition of maps (back-ported to proto2) Addition of a small set of standard types for representation of time, dynamic data, etc (back-ported to proto2) A well-defined encoding in JSON as an alternative to binary proto encoding. A new notion "syntax" is introduced to specify whether a .proto file uses proto2 or proto3: // foo.proto syntax = "proto3"; message Bar {...} If omitted, the protocol buffer compiler generates a warning and "proto2" is used as the default. This warning will be turned into an error in a future release. We recommend that new Protocol Buffers users use proto3. However, we do not generally recommend that existing users migrate from proto2 from proto3 due to API incompatibility, and we will continue to support proto2 for a long time. Other significant changes in proto3. Explicit "optional" keyword are disallowed in proto3 syntax, as fields are optional by default; required fields are no longer supported. Removed non-zero default values and field presence logic for non-message fields. e.g. has_xxx() methods are removed; primitive fields set to default values (0 for numeric fields, empty for string/bytes fields) will be skipped during serialization. Group fields are no longer supported in proto3 syntax. Changed repeated primitive fields to use packed serialization by default in proto3 (implemented for C++, Java, Python in this release). The user can still disable packed serialization by setting packed to false for now. Added well-known type protos (any.proto, empty.proto, timestamp.proto, duration.proto, etc.). Users can import and use these protos just like regular proto files. Additional runtime support are available for each language. Proto3 JSON is supported in several languages (fully supported in C++, Java, Python and C# partially supported in Ruby). The JSON spec is defined in the proto3 language guide: https://developers.google.com/protocol-buffers/docs/proto3#json We will publish a more detailed spec to define the exact behavior of proto3-conformant JSON serializers and parsers. Until then, do not rely on specific behaviors of the implementation if s not documented in the above spec. Proto3 enforces strict UTF-8 checking. Parsing will fail if a string field contains non UTF-8 data. General Introduced new language implementations (C#, JavaScript, Ruby, Objective-C) to proto3. Added support for map fields (implemented in both proto2 and proto3). Map fields can be declared using the following syntax: message Foo { map<string, string> values = 1; } The data of a map field is stored in memory as an unordered map and can be accessed through generated accessors. Added a "reserved" keyword in both proto2 and proto3 syntax. Users can use this keyword to declare reserved field numbers and names to prevent them from being reused by other fields in the same message. To reserve field numbers, add a reserved declaration in your message: message TestMessage { reserved 2, 15, 9 to 11, 3; } This reserves field numbers 2, 3, 9, 10, 11 and 15. If a user uses any of these as field numbers, the protocol buffer compiler will report an error. Field names can also be reserved: message TestMessage { reserved "foo", "bar"; } Added a deterministic serialization API (currently available in C++). The deterministic serialization guarantees that given a binary, equal messages will be serialized to the same bytes. This allows applications like MapReduce to group equal messages based on the serialized bytes. The deterministic serialization is, however, NOT canonical across languages; it is also unstable across different builds with schema changes due to unknown fields. Users who need canonical serialization, e.g. persistent storage in a canonical form, fingerprinting, etc, should define their own canonicalization specification and implement the serializer using reflection APIs rather than relying on this API. Added a new field option "json_name". By default proto field names are converted to "lowerCamelCase" in proto3 JSON format. This option can be used to override this behavior and specify a different JSON name for the field. Added conformance tests to ensure implementations are following proto3 JSON specification. C++ Added arena allocation support (for both proto2 and proto3). Profiling shows memory allocation and deallocation constitutes a significant fraction of CPU-time spent in protobuf code and arena allocation is a technique introduced to reduce this cost. With arena allocation, new objects are allocated from a large piece of preallocated memory and deallocation of these objects is almost free. Early adoption shows 20% to 50% improvement in some Google binaries. To enable arena support, add the following option to your .proto file: option cc_enable_arenas = true; The protocol buffer compiler will generate additional code to make the generated message classes work with arenas. This does not change the existing API of protobuf messages and does not affect wire format. Your existing code should continue to work after adding this option. In the future we will make this option enabled by default. To actually take advantage of arena allocation, you need to use the arena APIs when creating messages. A quick example of using the arena API: { google::protobuf::Arena arena; // Allocate a protobuf message in the arena. MyMessage* message = Arena::CreateMessage<MyMessage>(&arena); // All submessages will be allocated in the same arena. if (!message->ParseFromString(data)) { // Deal with malformed input data. } // Must not delete the message here. It will be deleted automatically // when the arena is destroyed. } Currently arena allocation does not work with map fields. Enabling arenas in a .proto file containing map fields will result in compile errors in the generated code. This will be addressed in a future release. Added runtime support for the Any type. To use Any in your proto file, first import the definition of Any: // foo.proto import "google/protobuf/any.proto"; message Foo { google.protobuf.Any any_field = 1; } message Bar { int32 value = 1; } Then in C++ you can access the Any field using PackFrom()/UnpackTo() methods: Foo foo; Bar bar = ...; foo.mutable_any_field()->PackFrom(bar); ... if (foo.any_field().IsType<Bar>()) { foo.any_field().UnpackTo(&bar); ... } In text format, the entries of a map field will be sorted by key. Introduced new utility functions/classes in the google/protobuf/util directory: MessageDifferencer: compare two proto messages and report their differences. JsonUtil: support converting protobuf binary format to/from JSON. TimeUtil: utility functions to work with well-known types Timestamp and Duration. FieldMaskUtil: utility functions to work with FieldMask. Introduced a deterministic serialization API in CodedOutputStream::SetSerializationDeterministic(bool). See the notes about deterministic serialization in the General section. Java Introduced a new util package that will be distributed as a separate artifact in maven. It contains: JsonFormat: convert proto messages to/from JSON. Timestamps/Durations: utility functions to work with Timestamp and Duration. FieldMaskUtil: utility functions to work with FieldMask. Introduced an ExperimentalApi annotation. Annotated APIs are experimental and are subject to change in a backward incompatible way in future releases. Introduced zero-copy serialization as an ExperimentalApi Introduction of the ByteOutput interface. This is similar to OutputStream but provides semantics for lazy writing (i.e. no immediate copy required) of fields that are considered to be immutable. ByteString now supports writing to a ByteOutput, which will directly expose the internals of the ByteString (i.e. byte[] or ByteBuffer) to the ByteOutput without copying. CodedOutputStream now supports writing to a ByteOutput. ByteString instances that are too large to fit in the internal buffer will be (lazily) written to the ByteOutput directly. This allows applications using large ByteString fields to avoid duplication of these fields entirely. Such an application can supply a ByteOutput that chains together the chunks received from CodedOutputStream before forwarding them onto the IO system. Other related changes to CodedOutputStream Additional use of sun.misc.Unsafe where possible to perform fast access to byte[] and ByteBuffer values and avoiding unnecessary range checking. ByteBuffer-backed CodedOutputStream now writes directly to the ByteBuffer rather than to an intermediate array. Performance optimizations for String fields serialization. The static PARSER in each generated message is deprecated, and it will be removed in a future release. A static parser() getter is generated for each message type instead. File option "java_generate_equals_and_hash" is now deprecated. equals() and hashCode() methods are generated by default. Python Python has received several updates, most notably support for proto3 semantics in any .proto file that declares syntax="proto3". Messages declared in proto3 files no longer represent field presence for scalar fields (number, enums, booleans, or strings). You can no longer call HasField() for such fields, and they are serialized based on whether they have a non-zero/empty/false value. One other notable change is in the C++-accelerated implementation. Descriptor objects (which describe the protobuf schema and allow reflection over it) are no longer duplicated between the Python and C++ layers. The Python descriptors are now simple wrappers around the C++ descriptors. This change should significantly reduce the memory usage of programs that use a lot of message types. Added map support. maps now have a dict-like interface (msg.map_field[key] = value) existing code that modifies maps via the repeated field interface will need to be updated. Added proto3 JSON format utility. It includes support for all field types and a few well-known types. Added runtime support for Any, Timestamp, Duration and FieldMask. "[ ]" is now accepted for repeated scalar fields in text format parser. Removed legacy Python 2.5 support. Moved to a single Python 2.x/3.x-compatible codebase Ruby We have added proto3 support for Ruby via a native C/JRuby extension. For the moment we only support proto3. Proto2 support is planned, but not yet implemented. Proto3 JSON is supported, but the special JSON mappings for the well-known types are not yet implemented. The Ruby extension itself is included in the ruby/ directory, and details on building and installing the extension are in ruby/README.md. The extension is also be published as a Ruby gem. Code generator support is included as part of protoc with the --ruby_out flag. The Ruby extension implements a user-friendly DSL to define message types (also generated by the code generator from .proto files). Once a message type is defined, the user may create instances of the message that behave in ways idiomatic to Ruby. For example: Message fields are present as ordinary Ruby properties (getter method foo and setter method foo=). Repeated field elements are stored in a container that acts like a native Ruby array, and map elements are stored in a container that acts like a native Ruby hashmap. The usual well-known methods, such as #to_s, #dup, and the like, are present. Unlike several existing third-party Ruby extensions for protobuf, this extension is built on a "strongly-typed" philosophy: message fields and array/map containers will throw exceptions eagerly when values of the incorrect type are inserted. See ruby/README.md for details. Objective-C Objective-C includes a code generator and a native objective-c runtime library. By --objc_ to protoc, the code generator will generate a header(.pbobjc.h) and an implementation file(.pbobjc.m) for each proto file. In this first release, the generated interface provides: enums, messages, field support(single, repeated, map, oneof), proto2 and proto3 syntax support, parsing and serialization. s compatible with ARC and non-ARC usage. In addition, users can access it via the swift bridging header. C# C# support is derived from the project at https://github.com/jskeet/protobuf-csharp-port, which is now in maintenance mode. The primary differences between the previous project and the proto3 version are that message types are now mutable, and the codegen is integrated in protoc There are two NuGet packages: Google.Protobuf (the support library) and Google.Protobuf.Tools (containing protoc) Target platforms now .NET 4.5, selected portable subsets and .NET Core. Null values are used to represent "no value" for message type fields, and for wrapper types such as Int32Value which map to C# nullable value types. Proto3 semantics supported; proto2 files are prohibited for C# codegen. Enum values are PascalCased, and if there's a prefix which matches the name of the enum, that is removed (so an enum COLOR with a value COLOR_LIGHT_GRAY would generate a value of just LightGray). JavaScript Added proto2/proto3 support for JavaScript. The runtime is written in pure JavaScript and works in browsers and in Node.js. To generate JavaScript code for your proto, invoke protoc with "--js_out". See js/README.md for more build instructions. JavaScript has support for binary protobuf format, but not proto3 JSON. There is also no support for reflection, since the code size impacts from this are often not the right choice for the browser. There is support for both CommonJS imports and Closure goog.require(). Lite Supported Proto3 lite-runtime in Java for mobile platforms. A new "lite" generator parameter was introduced in the protoc for C++ for Proto3 syntax messages. Example usage: ./protoc --cpp_out=lite:$OUTPUT_PATH foo.proto The protoc will treat the current input and all the transitive dependencies as LITE. The same generator parameter must be used to generate the dependencies. In Proto3 syntax files, "optimized_for=LITE_RUNTIME" is no longer supported. For Java, --javalite_out code generator is supported as a separate compiler plugin in a separate branch. Performance optimizations for Java Lite runtime on Android: - Reduced allocations - Reduced method overhead after ProGuarding - Reduced code size after ProGuarding Java Lite protos now implement deep equals/hashCode/toString Compatibility Notice v3.0.0 is the first API stable release of the v3.x series. We do not expect any future API breaking changes. For C++, Java Lite and Objective-C, source level compatibility is guaranteed. Upgrading from v3.0.0 to newer minor version releases will be source compatible. For example, if your code compiles against protobuf v3.0.0, it will continue to compile after you upgrade protobuf library to v3.1.0. For other languages, both source level compatibility and binary level compatibility are guaranteed. For example, if you have a Java binary built against protobuf v3.0.0. After switching the protobuf runtime binary to v3.1.0, your built binary should continue to work. Compatibility is only guaranteed for documented API and documented behaviors. If you are using undocumented API (e.g., use anything in the C++ internal namespace), it can be broken by minor version releases in an undetermined manner. Changes since v3.0.0-beta-4 Ruby When you assign a string field a.string_, we now call #encode(UTF-8) on the string and freeze the copy. This saves you from needing to ensure the string is already encoded as UTF-8. It also prevents you from mutating the string after it has been assigned (this is how we ensure it stays valid UTF-8). The generated file for foo.proto is now foo_pb.rb instead of just foo.rb. This makes it easier to see which imports/requires are from protobuf generated code, and also prevents conflicts with any foo.rb file you might have written directly in Ruby. It is a backward-incompatible change: you will need to update all of your require statements. For package names like foo_bar, we now translate this to the Ruby module FooBar. This is more idiomatic Ruby than what we used to do (Foo_bar). JavaScript Scalar fields like numbers and boolean now return defaults instead of undefined or null when they are unset. You can test for presence explicitly by calling hasFoo(), which we now generate for scalar fields in proto2. Java Lite Java Lite is now implemented as a separate plugin, maintained in the javalite branch. Both lite runtime and protoc artifacts will be available in Maven. C# Target platforms now .NET 4.5, selected portable subsets and .NET Core. legacy_enum_values option is no longer supported. Version 3.0.0-beta-4 General Added a deterministic serialization API for C++. The deterministic serialization guarantees that given a binary, equal messages will be serialized to the same bytes. This allows applications like MapReduce to group equal messages based on the serialized bytes. The deterministic serialization is, however, NOT canonical across languages; it is also unstable across different builds with schema changes due to unknown fields. Users who need canonical serialization, e.g. persistent storage in a canonical form, fingerprinting, etc, should define their own canonicalization specification and implement the serializer using reflection APIs rather than relying on this API. Added OneofOptions. You can now define custom options for oneof groups. import "google/protobuf/descriptor.proto"; extend google.protobuf.OneofOptions { optional int32 my_oneof_extension = 12345; } message Foo { oneof oneof_group { (my_oneof_extension) = 54321; ... } } C++ (beta) Introduced a deterministic serialization API in CodedOutputStream::SetSerializationDeterministic(bool). See the notes about deterministic serialization in the General section. Added google::protobuf::Map::swap() to swap two map fields. Fixed a memory leak when calling Reflection::ReleaseMessage() on a message allocated on arena. Improved error reporting when parsing text format protos. JSON Added a new parser option to ignore unknown fields when parsing JSON. Added convenient methods for message to/from JSON conversion. Various performance optimizations. Java (beta) File option "java_generate_equals_and_hash" is now deprecated. equals() and hashCode() methods are generated by default. Added a new JSON printer option "omittingInsignificantWhitespace" to produce a more compact JSON output. The printer will pretty-print by default. Updated Java runtime to be compatible with 2.5.0/2.6.1 generated protos. Python (beta) Added support to pretty print Any messages in text format. Added a flag to ignore unknown fields when parsing JSON. Bugfix: "@type" field of a JSON Any message is now correctly put before other fields. Objective-C (beta) Updated the code to support compiling with more compiler warnings enabled. (Issue 1616) Exposing more detailed errors for parsing failures. (PR 1623) Small (breaking) change to the naming of some methods on the support classes for map<>. There were collisions with the system provided KVO support, so the names were changed to avoid those issues. (PR 1699) Fixed for proper Swift bridging of error handling during parsing. (PR 1712) Complete support for generating sources that will go into a Framework and depend on generated sources from other Frameworks. (Issue 1457) C# (beta) RepeatedField optimizations. Support for .NET Core. Minor bug fixes. Ability to format a single value in JsonFormatter (advanced usage only). Modifications to attributes applied to generated code. Javascript (alpha) Maps now have a real map API instead of being treated as repeated fields. Well-known types are now provided in the google-protobuf package, and the code generator knows to require() them from that package. Bugfix: non-canonical varints are correctly decoded. Ruby (alpha) Accessors for oneof fields now return default values instead of nil. Java Lite Java lite support is removed from protocol compiler. It will be supported as a protocol compiler plugin in a separate code branch. Protocol Buffers v3.0.0-beta-3.1 @TeBoring TeBoring released this on 14 Jun Fix iOS framework. Version 3.0.0-beta-3 General Supported Proto3 lite-runtime in C++/Java for mobile platforms. Any type now supports APIs to specify prefixes other than type.googleapis.com Removed javanano_use_deprecated_package option; Nano will always has its own ".nano" package. C++ (Beta) Improved hash maps. Improved hash maps comments. In particular, please note that equal hash maps will not necessarily have the same iteration order and serialization. Added a new hash maps implementation that will become the default in a later release. Arenas Several inlined methods in Arena were moved to out-of-line to improve build performance and code size. Added SpaceAllocatedAndUsed() to report both space used and allocated Added convenient class UnsafeArenaAllocatedRepeatedPtrFieldBackInserter Any Allow custom type URL prefixes in Any packing. TextFormat now expand the Any type rather than printing bytes. Performance optimizations and various bug fixes. Java (Beta) Introduced an ExperimentalApi annotation. Annotated APIs are experimental and are subject to change in a backward incompatible way in future releases. Introduced zero-copy serialization as an ExperimentalApi Introduction of the ByteOutput interface. This is similar to OutputStream but provides semantics for lazy writing (i.e. no immediate copy required) of fields that are considered to be immutable. ByteString now supports writing to a ByteOutput, which will directly expose the internals of the ByteString (i.e. byte[] or ByteBuffer) to the ByteOutput without copying. CodedOutputStream now supports writing to a ByteOutput. ByteString instances that are too large to fit in the internal buffer will be (lazily) written to the ByteOutput directly. This allows applications using large ByteString fields to avoid duplication of these fields entirely. Such an application can supply a ByteOutput that chains together the chunks received from CodedOutputStream before forwarding them onto the IO system. Other related changes to CodedOutputStream Additional use of sun.misc.Unsafe where possible to perform fast access to byte[] and ByteBuffer values and avoiding unnecessary range checking. ByteBuffer-backed CodedOutputStream now writes directly to the ByteBuffer rather than to an intermediate array. Improved lite-runtime. Lite protos now implement deep equals/hashCode/toString Significantly improved the performance of Builder#mergeFrom() and Builder#mergeDelimitedFrom() Various bug fixes and small feature enhancement. Fixed stack overflow when in hashCode() for infinite recursive oneofs. Fixed the lazy field parsing in lite to merge rather than overwrite. TextFormat now supports reporting line/column numbers on errors. Updated to add appropriate @Override for better compiler errors. Python (Beta) Added JSON format for Any, Struct, Value and ListValue "[ ]" is now accepted for both repeated scalar fields and repeated message fields in text format parser. Numerical field name is now supported in text format. Added DiscardUnknownFields API for python protobuf message. Objective-C (Beta) Proto comments now come over as HeaderDoc comments in the generated sources so Xcode can pick them up and display them. The library headers have been updated to use HeaderDoc comments so Xcode can pick them up and display them. The per message and per field overhead in both generated code and runtime object sizes was reduced. Generated code now include deprecated annotations when the proto file included them. C# (Beta) In general: some changes are breaking, which require regenerating messages. Most user-written code will not be impacted except for the renaming of enum values. Allow custom type URL prefixes in Any packing, and ignore them when unpacking protoc is now in a separate NuGet package (Google.Protobuf.Tools) New option: internal_access to generate internal classes Enum values are now PascalCased, and if there's a prefix which matches the name of the enum, that is removed (so an enum COLOR with a value COLOR_BLUE would generate a value of just Blue). An option (legacy_enum_values) is temporarily available to disable this, but the option will be removed for GA. json_name option is now honored If group tags are encountered when parsing, they are validated more thoroughly (although we don't support actual groups) NuGet dependencies are better specified Breaking: Preconditions is renamed to ProtoPreconditions Breaking: GeneratedCodeInfo is renamed to GeneratedClrTypeInfo JsonFormatter now allows writing to a TextWriter New interface, ICustomDiagnosticMessage to allow more compact representations from ToString CodedInputStream and CodedOutputStream now implement IDisposable, which simply disposes of the streams they were constructed with Map fields no longer support null values (in line with other languages) Improvements in JSON formatting and parsing Javascript (Alpha) Better support for "bytes" fields: bytes fields can be read as either a base64 string or UInt8Array (in environments where TypedArray is supported). New support for CommonJS imports. This should make it easier to use the JavaScript support in Node.js and tools like WebPack. See js/README.md for more information. Some significant internal refactoring to simplify and modularize the code. Ruby (Alpha) JSON serialization now properly uses camelCased names, with a runtime option that will preserve original names from .proto files instead. Well-known types are now included in the distribution. Release now includes binary gems for Windows, Mac, and Linux instead of just source gems. Bugfix for serializing oneofs. C++/Java Lite (Alpha) A new "lite" generator parameter was introduced in the protoc for C++ and Java for Proto3 syntax messages. Example usage: ./protoc --cpp_out=lite:$OUTPUT_PATH foo.proto The protoc will treat the current input and all the transitive dependencies as LITE. The same generator parameter must be used to generate the dependencies. In Proto3 syntax files, "optimized_for=LITE_RUNTIME" is no longer supported. Version 3.0.0-beta-2 General Introduced a new language implementation: JavaScript. Added a new field option "json_name". By default proto field names are converted to "lowerCamelCase" in proto3 JSON format. This option can be used to override this behavior and specify a different JSON name for the field. Added conformance tests to ensure implementations are following proto3 JSON specification. C++ (Beta) Various bug fixes and improvements to the JSON support utility: Duplicate map keys in JSON are now rejected (i.e., translation will fail). Fixed wire-format for google.protobuf.Value/ListValue. Fixed precision loss when converting google.protobuf.Timestamp. Fixed a bug when parsing invalid UTF-8 code points. Fixed a memory leak. Reduced call stack usage. Java (Beta) Cleaned up some unused methods on CodedOutputStream. Presized lists for packed fields during parsing in the lite runtime to reduce allocations and improve performance. Improved the performance of unknown fields in the lite runtime. Introduced UnsafeByteStrings to support zero-copy ByteString creation. Various bug fixes and improvements to the JSON support utility: Fixed a thread-safety bug. Added a new to JsonFormat. Added a new to JsonFormat. Updated the JSON utility to comply with proto3 JSON specification. Python (Beta) Added proto3 JSON format utility. It includes support for all field types and a few well-known types except for Any and Struct. Added runtime support for Any, Timestamp, Duration and FieldMask. "[ ]" is now accepted for repeated scalar fields in text format parser. Objective-C (Beta) Various bug-fixes and code tweaks to pass more strict compiler warnings. Now has conformance test coverage and is passing all tests. C# (Beta) Various bug-fixes. Code generation: Files generated in directories based on namespace. Code generation: Include comments from .proto files in XML doc comments (naively) Code generation: Change organization/naming of "reflection class" (access to file descriptor) Code generation and library: Add Parser property to MessageDescriptor, and introduce a non-generic parser type. Library: Added TypeRegistry to support JSON parsing/formatting of Any. Library: Added Any.Pack/Unpack support. Library: Implemented JSON parsing. Javascript (Alpha) Added proto3 support for JavaScript. The runtime is written in pure JavaScript and works in browsers and in Node.js. To generate JavaScript code for your proto, invoke protoc with "--js_out". See js/README.md for more build instructions. Version 3.0.0-beta-1 Supported languages C++/Java/Python/Ruby/Nano/Objective-C/C# About Beta This is the first beta release of protobuf v3.0.0. Not all languages have reached beta stage. Languages not marked as beta are still in alpha (i.e., be prepared for API breaking changes). General Proto3 JSON is supported in several languages (fully supported in C++ and Java, partially supported in Ruby/C#). The JSON spec is defined in the proto3 language guide: https://developers.google.com/protocol-buffers/docs/proto3#json We will publish a more detailed spec to define the exact behavior of proto3-conformant JSON serializers and parsers. Until then, do not rely on specific behaviors of the implementation if s not documented in the above spec. More specifically, the behavior is not yet finalized for the following: Parsing invalid JSON input (e.g., input with trailing commas). Non-camelCase names in JSON input. The same field appears multiple times in JSON input. JSON arrays values. The message has unknown fields. Proto3 now enforces strict UTF-8 checking. Parsing will fail if a string field contains non UTF-8 data. C++ (Beta) Introduced new utility functions/classes in the google/protobuf/util directory: MessageDifferencer: compare two proto messages and report their differences. JsonUtil: support converting protobuf binary format to/from JSON. TimeUtil: utility functions to work with well-known types Timestamp and Duration. FieldMaskUtil: utility functions to work with FieldMask. Performance optimization of arena construction and destruction. Bug fixes for arena and maps support. Changed to use cmake for Windows Visual Studio builds. Added Bazel support. Java (Beta) Introduced a new util package that will be distributed as a separate artifact in maven. It contains: JsonFormat: convert proto messages to/from JSON. TimeUtil: utility functions to work with Timestamp and Duration. FieldMaskUtil: utility functions to work with FieldMask. The static PARSER in each generated message is deprecated, and it will be removed in a future release. A static parser() getter is generated for each message type instead. Performance optimizations for String fields serialization. Performance optimizations for Lite runtime on Android: Reduced allocations Reduced method overhead after ProGuarding Reduced code size after ProGuarding Python (Alpha) Removed legacy Python 2.5 support. Moved to a single Python 2.x/3.x-compatible codebase, instead of using 2to3. Fixed build/tests on Python 2.6, 2.7, 3.3, and 3.4. Pure-Python works on all four. Python/C++ implementation works on all but 3.4, due to changes in the Python/C++ API in 3.4. Some preliminary work has been done to allow for multiple DescriptorPools with Python/C++. Ruby (Alpha) Many bugfixes: fixed parsing/serialization of bytes, sint, sfixed types other parser bugfixes fixed memory leak affecting Ruby 2.2 JavaNano (Alpha) JavaNano generated code now will be put in a nano package by default to avoid conflicts with Java generated code. Objective-C (Alpha) Added non-null markup to ObjC library. Requires SDK 8.4+ to build. Many bugfixes: Removed the class/enum filter. Renamed some internal types to avoid conflicts with the well-known types protos. Added missing support for parsing repeated primitive fields in packed or unpacked forms. Added *Count for repeated and map<> fields to avoid auto-create when checking for them being set. C# (Alpha) Namespace changed to Google.Protobuf (and NuGet package will be named correspondingly). Target platforms now .NET 4.5 and selected portable subsets only. Removed lite runtime. Reimplementation to use mutable message types. Null references used to represent "no value" for message type fields. Proto3 semantics supported; proto2 files are prohibited for C# codegen. Most proto3 features supported: JSON formatting (a.k.a. serialization to JSON), including well-known types (except for Any). Wrapper types mapped to nullable value types (or string/ByteString allowing nullability). JSON parsing is not supported yet. maps oneof enum unknown value preservation Version 3.0.0-alpha-3 (C++/Java/Python/Ruby/JavaNano/Objective-C/C#) General Introduced two new language implementations (Objective-C, C#) to proto3. Explicit "optional" keyword are disallowed in proto3 syntax, as fields are optional by default. Group fields are no longer supported in proto3 syntax. Changed repeated primitive fields to use packed serialization by default in proto3 (implemented for C++, Java, Python in this release). The user can still disable packed serialization by setting packed to false for now. Added well-known type protos (any.proto, empty.proto, timestamp.proto, duration.proto, etc.). Users can import and use these protos just like regular proto files. Addtional runtime support will be added for them in future releases (in the form of utility helper functions, or having them replaced by language specific types in generated code). Added a "reserved" keyword in both proto2 and proto3 syntax. User can use this keyword to declare reserved field numbers and names to prevent them from being reused by other fields in the same message. To reserve field numbers, add a reserved declaration in your message: message TestMessage { reserved 2, 15, 9 to 11, 3; } This reserves field numbers 2, 3, 9, 10, 11 and 15. If a user uses any of these as field numbers, the protocol buffer compiler will report an error. Field names can also be reserved: message TestMessage { reserved "foo", "bar"; } Various bug fixes since 3.0.0-alpha-2 Objective-C Objective-C includes a code generator and a native objective-c runtime library. By --objc_ to protoc, the code generator will generate a header(.pbobjc.h) and an implementation file(.pbobjc.m) for each proto file. In this first release, the generated interface provides: enums, messages, field support(single, repeated, map, oneof), proto2 and proto3 syntax support, parsing and serialization. s compatible with ARC and non-ARC usage. Besides, user can also access it via the swift bridging header. See objectivec/README.md for details. C# C# protobufs are based on project https://github.com/jskeet/protobuf-csharp-port. The original project was frozen and all the new development will happen here. Codegen plugin for C# was completely rewritten to C++ and is now an intergral part of protoc. Some refactorings and cleanup has been applied to the C# runtime library. Only proto2 is supported in C# at the moment, proto3 support is in progress and will likely bring significant breaking changes to the API. See csharp/README.md for details. C++ Added runtime support for Any type. To use Any in your proto file, first import the definition of Any: // foo.proto import "google/protobuf/any.proto"; message Foo { google.protobuf.Any any_field = 1; } message Bar { int32 value = 1; } Then in C++ you can access the Any field using PackFrom()/UnpackTo() methods: Foo foo; Bar bar = ...; foo.mutable_any_field()->PackFrom(bar); ... if (foo.any_field().IsType<Bar>()) { foo.any_field().UnpackTo(&bar); ... } In text format, entries of a map field will be sorted by key. Java Continued optimizations on the lite runtime to improve performance for Android. Python Added map support. maps now have a dict-like interface (msg.map_field[key] = value) existing code that modifies maps via the repeated field interface will need to be updated. Ruby Improvements to RepeatedField's emulation of the Ruby Array API. Various speedups and internal cleanups. Version 3.0.0-alpha-2 (C++/Java/Python/Ruby/JavaNano) General Introduced Protocol Buffers language version 3 (aka proto3). When protobuf was initially opensourced it implemented Protocol Buffers language version 2 (aka proto2), which is why the version number started from v2.0.0. From v3.0.0, a new language version (proto3) is introduced while the old version (proto2) will continue to be supported. The main intent of introducing proto3 is to clean up protobuf before pushing the language as the foundation of Google's new API platform. In proto3, the language is simplified, both for ease of use and to make it available in a wider range of programming languages. At the same time a few features are added to better support common idioms found in APIs. The following are the main new features in language version 3: Removal of field presence logic for primitive value fields, removal of required fields, and removal of default values. This makes proto3 significantly easier to implement with open struct representations, as in languages like Android Java, Objective C, or Go. Removal of unknown fields. Removal of extensions, which are instead replaced by a new standard type called Any. Fix semantics for unknown enum values. Addition of maps. Addition of a small set of standard types for representation of time, dynamic data, etc. A well-defined encoding in JSON as an alternative to binary proto encoding. This release (v3.0.0-alpha-2) includes partial proto3 support for C++, Java, Python, Ruby and JavaNano. Items 6 (well-known types) and 7 (JSON format) in the above feature list are not implemented. A new notion "syntax" is introduced to specify whether a .proto file uses proto2 or proto3: // foo.proto syntax = "proto3"; message Bar {...} If omitted, the protocol compiler will generate a warning and "proto2" will be used as the default. This warning will be turned into an error in a future release. We recommend that new Protocol Buffers users use proto3. However, we do not generally recommend that existing users migrate from proto2 from proto3 due to API incompatibility, and we will continue to support proto2 for a long time. Added support for map fields (implemented in proto2 and proto3 C++/Java/JavaNano and proto3 Ruby). Map fields can be declared using the following syntax: message Foo { map<string, string> values = 1; } Data of a map field will be stored in memory as an unordered map and it can be accessed through generated accessors. C++ Added arena allocation support (for both proto2 and proto3). Profiling shows memory allocation and deallocation constitutes a significant fraction of CPU-time spent in protobuf code and arena allocation is a technique introduced to reduce this cost. With arena allocation, new objects will be allocated from a large piece of preallocated memory and deallocation of these objects is almost free. Early adoption shows 20% to 50% improvement in some Google binaries. To enable arena support, add the following option to your .proto file: option cc_enable_arenas = true; Protocol compiler will generate additional code to make the generated message classes work with arenas. This does not change the existing API of protobuf messages and does not affect wire format. Your existing code should continue to work after adding this option. In the future we will make this option enabled by default. To actually take advantage of arena allocation, you need to use the arena APIs when creating messages. A quick example of using the arena API: { google::protobuf::Arena arena; // Allocate a protobuf message in the arena. MyMessage* message = Arena::CreateMessage<MyMessage>(&arena); // All submessages will be allocated in the same arena. if (!message->ParseFromString(data)) { // Deal with malformed input data. } // Must not delete the message here. It will be deleted automatically // when the arena is destroyed. } Currently arena does not work with map fields. Enabling arena in a .proto file containing map fields will result in compile errors in the generated code. This will be addressed in a future release. Python Python has received several updates, most notably support for proto3 semantics in any .proto file that declares syntax="proto3". Messages declared in proto3 files no longer represent field presence for scalar fields (number, enums, booleans, or strings). You can no longer call HasField() for such fields, and they are serialized based on whether they have a non-zero/empty/false value. One other notable change is in the C++-accelerated implementation. Descriptor objects (which describe the protobuf schema and allow reflection over it) are no longer duplicated between the Python and C++ layers. The Python descriptors are now simple wrappers around the C++ descriptors. This change should significantly reduce the memory usage of programs that use a lot of message types. Ruby We have added proto3 support for Ruby via a native C extension. The Ruby extension itself is included in the ruby/ directory, and details on building and installing the extension are in ruby/README.md. The extension will also be published as a Ruby gem. Code generator support is included as part of protoc with the --ruby_out flag. The Ruby extension implements a user-friendly DSL to define message types (also generated by the code generator from .proto files). Once a message type is defined, the user may create instances of the message that behave in ways idiomatic to Ruby. For example: Message fields are present as ordinary Ruby properties (getter method foo and setter method foo=). Repeated field elements are stored in a container that acts like a native Ruby array, and map elements are stored in a container that acts like a native Ruby hashmap. The usual well-known methods, such as #to_s, #dup, and the like, are present. Unlike several existing third-party Ruby extensions for protobuf, this extension is built on a "strongly-typed" philosophy: message fields and array/map containers will throw exceptions eagerly when values of the incorrect type are inserted. See ruby/README.md for details. JavaNano JavaNano is a special code generator and runtime library designed especially for resource-restricted systems, like Android. It is very resource-friendly in both the amount of code and the runtime overhead. Here is an an overview of JavaNano features compared with the official Java protobuf: No descriptors or message builders. All messages are mutable; fields are public Java fields. For optional fields only, encapsulation behind setter/getter/hazzer/ clearer functions is opt-in, which provide proper 'has' state support. For proto2, if not opted in, has state (field presence) is not available. Serialization outputs all fields not equal to their defaults. The behavior is consistent with proto3 semantics. Required fields (proto2 only) are always serialized. Enum constants are integers; protection against invalid values only when parsing from the wire. Enum constants can be generated into container interfaces bearing the enum's name (so the referencing code is in Java style). CodedInputByteBufferNano can only take byte. Similarly CodedOutputByteBufferNano can only write to byte[]. Repeated fields are in arrays, not ArrayList or Vector. Null array elements are allowed and silently ignored. Full support for serializing/deserializing repeated packed fields. Support extensions (in proto2). Unset messages/groups are null, not an immutable empty default instance. toByteArray(...) and mergeFrom(...) are now static functions of MessageNano. The 'bytes' type translates to the Java type byte[]. See javanano/README.txt for details. Version 3.0.0-alpha-1 (C++/Java) General Introduced Protocol Buffers language version 3 (aka proto3). When protobuf was initially opensourced it implemented Protocol Buffers language version 2 (aka proto2), which is why the version number started from v2.0.0. From v3.0.0, a new language version (proto3) is introduced while the old version (proto2) will continue to be supported. The main intent of introducing proto3 is to clean up protobuf before pushing the language as the foundation of Google's new API platform. In proto3, the language is simplified, both for ease of use and to make it available in a wider range of programming languages. At the same time a few features are added to better support common idioms found in APIs. The following are the main new features in language version 3: Removal of field presence logic for primitive value fields, removal of required fields, and removal of default values. This makes proto3 significantly easier to implement with open struct representations, as in languages like Android Java, Objective C, or Go. Removal of unknown fields. Removal of extensions, which are instead replaced by a new standard type called Any. Fix semantics for unknown enum values. Addition of maps. Addition of a small set of standard types for representation of time, dynamic data, etc. A well-defined encoding in JSON as an alternative to binary proto encoding. This release (v3.0.0-alpha-1) includes partial proto3 support for C++ and Java. Items 6 (well-known types) and 7 (JSON format) in the above feature list are not impelmented. A new notion "syntax" is introduced to specify whether a .proto file uses proto2 or proto3: // foo.proto syntax = "proto3"; message Bar {...} If omitted, the protocol compiler will generate a warning and "proto2" will be used as the default. This warning will be turned into an error in a future release. We recommend that new Protocol Buffers users use proto3. However, we do not generally recommend that existing users migrate from proto2 from proto3 due to API incompatibility, and we will continue to support proto2 for a long time. Added support for map fields (implemented in C++/Java for both proto2 and proto3). Map fields can be declared using the following syntax: message Foo { map<string, string> values = 1; } Data of a map field will be stored in memory as an unordered map and it can be accessed through generated accessors. C++ Added arena allocation support (for both proto2 and proto3). Profiling shows memory allocation and deallocation constitutes a significant fraction of CPU-time spent in protobuf code and arena allocation is a technique introduced to reduce this cost. With arena allocation, new objects will be allocated from a large piece of preallocated memory and deallocation of these objects is almost free. Early adoption shows 20% to 50% improvement in some Google binaries. To enable arena support, add the following option to your .proto file: option cc_enable_arenas = true; Protocol compiler will generate additional code to make the generated message classes work with arenas. This does not change the existing API of protobuf messages and does not affect wire format. Your existing code should continue to work after adding this option. In the future we will make this option enabled by default. To actually take advantage of arena allocation, you need to use the arena APIs when creating messages. A quick example of using the arena API: { google::protobuf::Arena arena; // Allocate a protobuf message in the arena. MyMessage* message = Arena::CreateMessage<MyMessage>(&arena); // All submessages will be allocated in the same arena. if (!message->ParseFromString(data)) { // Deal with malformed input data. } // Must not delete the message here. It will be deleted automatically // when the arena is destroyed. } Currently arena does not work with map fields. Enabling arena in a .proto file containing map fields will result in compile errors in the generated code. This will be addressed in a future release. |
||
kamil
|
2c266d2ca5 |
Upgrade protobuf from 2.6.1 to 3.0.0
This version is backward compatible with proto2. Upstream changelog: Version 3.0.0 This change log summarizes all the changes since the last stable release (v2.6.1). See the last section about changes since v3.0.0-beta-4. Proto3 Introduced Protocol Buffers language version 3 (aka proto3). When protocol buffers was initially open sourced it implemented Protocol Buffers language version 2 (aka proto2), which is why the version number started from v2.0.0. From v3.0.0, a new language version (proto3) is introduced while the old version (proto2) will continue to be supported. The main intent of introducing proto3 is to clean up protobuf before pushing the language as the foundation of Google's new API platform. In proto3, the language is simplified, both for ease of use and to make it available in a wider range of programming languages. At the same time a few features are added to better support common idioms found in APIs. The following are the main new features in language version 3: Removal of field presence logic for primitive value fields, removal of required fields, and removal of default values. This makes proto3 significantly easier to implement with open struct representations, as in languages like Android Java, Objective C, or Go. Removal of unknown fields. Removal of extensions, which are instead replaced by a new standard type called Any. Fix semantics for unknown enum values. Addition of maps (back-ported to proto2) Addition of a small set of standard types for representation of time, dynamic data, etc (back-ported to proto2) A well-defined encoding in JSON as an alternative to binary proto encoding. A new notion "syntax" is introduced to specify whether a .proto file uses proto2 or proto3: // foo.proto syntax = "proto3"; message Bar {...} If omitted, the protocol buffer compiler generates a warning and "proto2" is used as the default. This warning will be turned into an error in a future release. We recommend that new Protocol Buffers users use proto3. However, we do not generally recommend that existing users migrate from proto2 from proto3 due to API incompatibility, and we will continue to support proto2 for a long time. Other significant changes in proto3. Explicit "optional" keyword are disallowed in proto3 syntax, as fields are optional by default; required fields are no longer supported. Removed non-zero default values and field presence logic for non-message fields. e.g. has_xxx() methods are removed; primitive fields set to default values (0 for numeric fields, empty for string/bytes fields) will be skipped during serialization. Group fields are no longer supported in proto3 syntax. Changed repeated primitive fields to use packed serialization by default in proto3 (implemented for C++, Java, Python in this release). The user can still disable packed serialization by setting packed to false for now. Added well-known type protos (any.proto, empty.proto, timestamp.proto, duration.proto, etc.). Users can import and use these protos just like regular proto files. Additional runtime support are available for each language. Proto3 JSON is supported in several languages (fully supported in C++, Java, Python and C# partially supported in Ruby). The JSON spec is defined in the proto3 language guide: https://developers.google.com/protocol-buffers/docs/proto3#json We will publish a more detailed spec to define the exact behavior of proto3-conformant JSON serializers and parsers. Until then, do not rely on specific behaviors of the implementation if s not documented in the above spec. Proto3 enforces strict UTF-8 checking. Parsing will fail if a string field contains non UTF-8 data. General Introduced new language implementations (C#, JavaScript, Ruby, Objective-C) to proto3. Added support for map fields (implemented in both proto2 and proto3). Map fields can be declared using the following syntax: message Foo { map<string, string> values = 1; } The data of a map field is stored in memory as an unordered map and can be accessed through generated accessors. Added a "reserved" keyword in both proto2 and proto3 syntax. Users can use this keyword to declare reserved field numbers and names to prevent them from being reused by other fields in the same message. To reserve field numbers, add a reserved declaration in your message: message TestMessage { reserved 2, 15, 9 to 11, 3; } This reserves field numbers 2, 3, 9, 10, 11 and 15. If a user uses any of these as field numbers, the protocol buffer compiler will report an error. Field names can also be reserved: message TestMessage { reserved "foo", "bar"; } Added a deterministic serialization API (currently available in C++). The deterministic serialization guarantees that given a binary, equal messages will be serialized to the same bytes. This allows applications like MapReduce to group equal messages based on the serialized bytes. The deterministic serialization is, however, NOT canonical across languages; it is also unstable across different builds with schema changes due to unknown fields. Users who need canonical serialization, e.g. persistent storage in a canonical form, fingerprinting, etc, should define their own canonicalization specification and implement the serializer using reflection APIs rather than relying on this API. Added a new field option "json_name". By default proto field names are converted to "lowerCamelCase" in proto3 JSON format. This option can be used to override this behavior and specify a different JSON name for the field. Added conformance tests to ensure implementations are following proto3 JSON specification. C++ Added arena allocation support (for both proto2 and proto3). Profiling shows memory allocation and deallocation constitutes a significant fraction of CPU-time spent in protobuf code and arena allocation is a technique introduced to reduce this cost. With arena allocation, new objects are allocated from a large piece of preallocated memory and deallocation of these objects is almost free. Early adoption shows 20% to 50% improvement in some Google binaries. To enable arena support, add the following option to your .proto file: option cc_enable_arenas = true; The protocol buffer compiler will generate additional code to make the generated message classes work with arenas. This does not change the existing API of protobuf messages and does not affect wire format. Your existing code should continue to work after adding this option. In the future we will make this option enabled by default. To actually take advantage of arena allocation, you need to use the arena APIs when creating messages. A quick example of using the arena API: { google::protobuf::Arena arena; // Allocate a protobuf message in the arena. MyMessage* message = Arena::CreateMessage<MyMessage>(&arena); // All submessages will be allocated in the same arena. if (!message->ParseFromString(data)) { // Deal with malformed input data. } // Must not delete the message here. It will be deleted automatically // when the arena is destroyed. } Currently arena allocation does not work with map fields. Enabling arenas in a .proto file containing map fields will result in compile errors in the generated code. This will be addressed in a future release. Added runtime support for the Any type. To use Any in your proto file, first import the definition of Any: // foo.proto import "google/protobuf/any.proto"; message Foo { google.protobuf.Any any_field = 1; } message Bar { int32 value = 1; } Then in C++ you can access the Any field using PackFrom()/UnpackTo() methods: Foo foo; Bar bar = ...; foo.mutable_any_field()->PackFrom(bar); ... if (foo.any_field().IsType<Bar>()) { foo.any_field().UnpackTo(&bar); ... } In text format, the entries of a map field will be sorted by key. Introduced new utility functions/classes in the google/protobuf/util directory: MessageDifferencer: compare two proto messages and report their differences. JsonUtil: support converting protobuf binary format to/from JSON. TimeUtil: utility functions to work with well-known types Timestamp and Duration. FieldMaskUtil: utility functions to work with FieldMask. Introduced a deterministic serialization API in CodedOutputStream::SetSerializationDeterministic(bool). See the notes about deterministic serialization in the General section. Java Introduced a new util package that will be distributed as a separate artifact in maven. It contains: JsonFormat: convert proto messages to/from JSON. Timestamps/Durations: utility functions to work with Timestamp and Duration. FieldMaskUtil: utility functions to work with FieldMask. Introduced an ExperimentalApi annotation. Annotated APIs are experimental and are subject to change in a backward incompatible way in future releases. Introduced zero-copy serialization as an ExperimentalApi Introduction of the ByteOutput interface. This is similar to OutputStream but provides semantics for lazy writing (i.e. no immediate copy required) of fields that are considered to be immutable. ByteString now supports writing to a ByteOutput, which will directly expose the internals of the ByteString (i.e. byte[] or ByteBuffer) to the ByteOutput without copying. CodedOutputStream now supports writing to a ByteOutput. ByteString instances that are too large to fit in the internal buffer will be (lazily) written to the ByteOutput directly. This allows applications using large ByteString fields to avoid duplication of these fields entirely. Such an application can supply a ByteOutput that chains together the chunks received from CodedOutputStream before forwarding them onto the IO system. Other related changes to CodedOutputStream Additional use of sun.misc.Unsafe where possible to perform fast access to byte[] and ByteBuffer values and avoiding unnecessary range checking. ByteBuffer-backed CodedOutputStream now writes directly to the ByteBuffer rather than to an intermediate array. Performance optimizations for String fields serialization. The static PARSER in each generated message is deprecated, and it will be removed in a future release. A static parser() getter is generated for each message type instead. File option "java_generate_equals_and_hash" is now deprecated. equals() and hashCode() methods are generated by default. Python Python has received several updates, most notably support for proto3 semantics in any .proto file that declares syntax="proto3". Messages declared in proto3 files no longer represent field presence for scalar fields (number, enums, booleans, or strings). You can no longer call HasField() for such fields, and they are serialized based on whether they have a non-zero/empty/false value. One other notable change is in the C++-accelerated implementation. Descriptor objects (which describe the protobuf schema and allow reflection over it) are no longer duplicated between the Python and C++ layers. The Python descriptors are now simple wrappers around the C++ descriptors. This change should significantly reduce the memory usage of programs that use a lot of message types. Added map support. maps now have a dict-like interface (msg.map_field[key] = value) existing code that modifies maps via the repeated field interface will need to be updated. Added proto3 JSON format utility. It includes support for all field types and a few well-known types. Added runtime support for Any, Timestamp, Duration and FieldMask. "[ ]" is now accepted for repeated scalar fields in text format parser. Removed legacy Python 2.5 support. Moved to a single Python 2.x/3.x-compatible codebase Ruby We have added proto3 support for Ruby via a native C/JRuby extension. For the moment we only support proto3. Proto2 support is planned, but not yet implemented. Proto3 JSON is supported, but the special JSON mappings for the well-known types are not yet implemented. The Ruby extension itself is included in the ruby/ directory, and details on building and installing the extension are in ruby/README.md. The extension is also be published as a Ruby gem. Code generator support is included as part of protoc with the --ruby_out flag. The Ruby extension implements a user-friendly DSL to define message types (also generated by the code generator from .proto files). Once a message type is defined, the user may create instances of the message that behave in ways idiomatic to Ruby. For example: Message fields are present as ordinary Ruby properties (getter method foo and setter method foo=). Repeated field elements are stored in a container that acts like a native Ruby array, and map elements are stored in a container that acts like a native Ruby hashmap. The usual well-known methods, such as #to_s, #dup, and the like, are present. Unlike several existing third-party Ruby extensions for protobuf, this extension is built on a "strongly-typed" philosophy: message fields and array/map containers will throw exceptions eagerly when values of the incorrect type are inserted. See ruby/README.md for details. Objective-C Objective-C includes a code generator and a native objective-c runtime library. By --objc_ to protoc, the code generator will generate a header(.pbobjc.h) and an implementation file(.pbobjc.m) for each proto file. In this first release, the generated interface provides: enums, messages, field support(single, repeated, map, oneof), proto2 and proto3 syntax support, parsing and serialization. s compatible with ARC and non-ARC usage. In addition, users can access it via the swift bridging header. C# C# support is derived from the project at https://github.com/jskeet/protobuf-csharp-port, which is now in maintenance mode. The primary differences between the previous project and the proto3 version are that message types are now mutable, and the codegen is integrated in protoc There are two NuGet packages: Google.Protobuf (the support library) and Google.Protobuf.Tools (containing protoc) Target platforms now .NET 4.5, selected portable subsets and .NET Core. Null values are used to represent "no value" for message type fields, and for wrapper types such as Int32Value which map to C# nullable value types. Proto3 semantics supported; proto2 files are prohibited for C# codegen. Enum values are PascalCased, and if there's a prefix which matches the name of the enum, that is removed (so an enum COLOR with a value COLOR_LIGHT_GRAY would generate a value of just LightGray). JavaScript Added proto2/proto3 support for JavaScript. The runtime is written in pure JavaScript and works in browsers and in Node.js. To generate JavaScript code for your proto, invoke protoc with "--js_out". See js/README.md for more build instructions. JavaScript has support for binary protobuf format, but not proto3 JSON. There is also no support for reflection, since the code size impacts from this are often not the right choice for the browser. There is support for both CommonJS imports and Closure goog.require(). Lite Supported Proto3 lite-runtime in Java for mobile platforms. A new "lite" generator parameter was introduced in the protoc for C++ for Proto3 syntax messages. Example usage: ./protoc --cpp_out=lite:$OUTPUT_PATH foo.proto The protoc will treat the current input and all the transitive dependencies as LITE. The same generator parameter must be used to generate the dependencies. In Proto3 syntax files, "optimized_for=LITE_RUNTIME" is no longer supported. For Java, --javalite_out code generator is supported as a separate compiler plugin in a separate branch. Performance optimizations for Java Lite runtime on Android: - Reduced allocations - Reduced method overhead after ProGuarding - Reduced code size after ProGuarding Java Lite protos now implement deep equals/hashCode/toString Compatibility Notice v3.0.0 is the first API stable release of the v3.x series. We do not expect any future API breaking changes. For C++, Java Lite and Objective-C, source level compatibility is guaranteed. Upgrading from v3.0.0 to newer minor version releases will be source compatible. For example, if your code compiles against protobuf v3.0.0, it will continue to compile after you upgrade protobuf library to v3.1.0. For other languages, both source level compatibility and binary level compatibility are guaranteed. For example, if you have a Java binary built against protobuf v3.0.0. After switching the protobuf runtime binary to v3.1.0, your built binary should continue to work. Compatibility is only guaranteed for documented API and documented behaviors. If you are using undocumented API (e.g., use anything in the C++ internal namespace), it can be broken by minor version releases in an undetermined manner. Changes since v3.0.0-beta-4 Ruby When you assign a string field a.string_, we now call #encode(UTF-8) on the string and freeze the copy. This saves you from needing to ensure the string is already encoded as UTF-8. It also prevents you from mutating the string after it has been assigned (this is how we ensure it stays valid UTF-8). The generated file for foo.proto is now foo_pb.rb instead of just foo.rb. This makes it easier to see which imports/requires are from protobuf generated code, and also prevents conflicts with any foo.rb file you might have written directly in Ruby. It is a backward-incompatible change: you will need to update all of your require statements. For package names like foo_bar, we now translate this to the Ruby module FooBar. This is more idiomatic Ruby than what we used to do (Foo_bar). JavaScript Scalar fields like numbers and boolean now return defaults instead of undefined or null when they are unset. You can test for presence explicitly by calling hasFoo(), which we now generate for scalar fields in proto2. Java Lite Java Lite is now implemented as a separate plugin, maintained in the javalite branch. Both lite runtime and protoc artifacts will be available in Maven. C# Target platforms now .NET 4.5, selected portable subsets and .NET Core. legacy_enum_values option is no longer supported. Version 3.0.0-beta-4 General Added a deterministic serialization API for C++. The deterministic serialization guarantees that given a binary, equal messages will be serialized to the same bytes. This allows applications like MapReduce to group equal messages based on the serialized bytes. The deterministic serialization is, however, NOT canonical across languages; it is also unstable across different builds with schema changes due to unknown fields. Users who need canonical serialization, e.g. persistent storage in a canonical form, fingerprinting, etc, should define their own canonicalization specification and implement the serializer using reflection APIs rather than relying on this API. Added OneofOptions. You can now define custom options for oneof groups. import "google/protobuf/descriptor.proto"; extend google.protobuf.OneofOptions { optional int32 my_oneof_extension = 12345; } message Foo { oneof oneof_group { (my_oneof_extension) = 54321; ... } } C++ (beta) Introduced a deterministic serialization API in CodedOutputStream::SetSerializationDeterministic(bool). See the notes about deterministic serialization in the General section. Added google::protobuf::Map::swap() to swap two map fields. Fixed a memory leak when calling Reflection::ReleaseMessage() on a message allocated on arena. Improved error reporting when parsing text format protos. JSON Added a new parser option to ignore unknown fields when parsing JSON. Added convenient methods for message to/from JSON conversion. Various performance optimizations. Java (beta) File option "java_generate_equals_and_hash" is now deprecated. equals() and hashCode() methods are generated by default. Added a new JSON printer option "omittingInsignificantWhitespace" to produce a more compact JSON output. The printer will pretty-print by default. Updated Java runtime to be compatible with 2.5.0/2.6.1 generated protos. Python (beta) Added support to pretty print Any messages in text format. Added a flag to ignore unknown fields when parsing JSON. Bugfix: "@type" field of a JSON Any message is now correctly put before other fields. Objective-C (beta) Updated the code to support compiling with more compiler warnings enabled. (Issue 1616) Exposing more detailed errors for parsing failures. (PR 1623) Small (breaking) change to the naming of some methods on the support classes for map<>. There were collisions with the system provided KVO support, so the names were changed to avoid those issues. (PR 1699) Fixed for proper Swift bridging of error handling during parsing. (PR 1712) Complete support for generating sources that will go into a Framework and depend on generated sources from other Frameworks. (Issue 1457) C# (beta) RepeatedField optimizations. Support for .NET Core. Minor bug fixes. Ability to format a single value in JsonFormatter (advanced usage only). Modifications to attributes applied to generated code. Javascript (alpha) Maps now have a real map API instead of being treated as repeated fields. Well-known types are now provided in the google-protobuf package, and the code generator knows to require() them from that package. Bugfix: non-canonical varints are correctly decoded. Ruby (alpha) Accessors for oneof fields now return default values instead of nil. Java Lite Java lite support is removed from protocol compiler. It will be supported as a protocol compiler plugin in a separate code branch. Protocol Buffers v3.0.0-beta-3.1 @TeBoring TeBoring released this on 14 Jun Fix iOS framework. Version 3.0.0-beta-3 General Supported Proto3 lite-runtime in C++/Java for mobile platforms. Any type now supports APIs to specify prefixes other than type.googleapis.com Removed javanano_use_deprecated_package option; Nano will always has its own ".nano" package. C++ (Beta) Improved hash maps. Improved hash maps comments. In particular, please note that equal hash maps will not necessarily have the same iteration order and serialization. Added a new hash maps implementation that will become the default in a later release. Arenas Several inlined methods in Arena were moved to out-of-line to improve build performance and code size. Added SpaceAllocatedAndUsed() to report both space used and allocated Added convenient class UnsafeArenaAllocatedRepeatedPtrFieldBackInserter Any Allow custom type URL prefixes in Any packing. TextFormat now expand the Any type rather than printing bytes. Performance optimizations and various bug fixes. Java (Beta) Introduced an ExperimentalApi annotation. Annotated APIs are experimental and are subject to change in a backward incompatible way in future releases. Introduced zero-copy serialization as an ExperimentalApi Introduction of the ByteOutput interface. This is similar to OutputStream but provides semantics for lazy writing (i.e. no immediate copy required) of fields that are considered to be immutable. ByteString now supports writing to a ByteOutput, which will directly expose the internals of the ByteString (i.e. byte[] or ByteBuffer) to the ByteOutput without copying. CodedOutputStream now supports writing to a ByteOutput. ByteString instances that are too large to fit in the internal buffer will be (lazily) written to the ByteOutput directly. This allows applications using large ByteString fields to avoid duplication of these fields entirely. Such an application can supply a ByteOutput that chains together the chunks received from CodedOutputStream before forwarding them onto the IO system. Other related changes to CodedOutputStream Additional use of sun.misc.Unsafe where possible to perform fast access to byte[] and ByteBuffer values and avoiding unnecessary range checking. ByteBuffer-backed CodedOutputStream now writes directly to the ByteBuffer rather than to an intermediate array. Improved lite-runtime. Lite protos now implement deep equals/hashCode/toString Significantly improved the performance of Builder#mergeFrom() and Builder#mergeDelimitedFrom() Various bug fixes and small feature enhancement. Fixed stack overflow when in hashCode() for infinite recursive oneofs. Fixed the lazy field parsing in lite to merge rather than overwrite. TextFormat now supports reporting line/column numbers on errors. Updated to add appropriate @Override for better compiler errors. Python (Beta) Added JSON format for Any, Struct, Value and ListValue "[ ]" is now accepted for both repeated scalar fields and repeated message fields in text format parser. Numerical field name is now supported in text format. Added DiscardUnknownFields API for python protobuf message. Objective-C (Beta) Proto comments now come over as HeaderDoc comments in the generated sources so Xcode can pick them up and display them. The library headers have been updated to use HeaderDoc comments so Xcode can pick them up and display them. The per message and per field overhead in both generated code and runtime object sizes was reduced. Generated code now include deprecated annotations when the proto file included them. C# (Beta) In general: some changes are breaking, which require regenerating messages. Most user-written code will not be impacted except for the renaming of enum values. Allow custom type URL prefixes in Any packing, and ignore them when unpacking protoc is now in a separate NuGet package (Google.Protobuf.Tools) New option: internal_access to generate internal classes Enum values are now PascalCased, and if there's a prefix which matches the name of the enum, that is removed (so an enum COLOR with a value COLOR_BLUE would generate a value of just Blue). An option (legacy_enum_values) is temporarily available to disable this, but the option will be removed for GA. json_name option is now honored If group tags are encountered when parsing, they are validated more thoroughly (although we don't support actual groups) NuGet dependencies are better specified Breaking: Preconditions is renamed to ProtoPreconditions Breaking: GeneratedCodeInfo is renamed to GeneratedClrTypeInfo JsonFormatter now allows writing to a TextWriter New interface, ICustomDiagnosticMessage to allow more compact representations from ToString CodedInputStream and CodedOutputStream now implement IDisposable, which simply disposes of the streams they were constructed with Map fields no longer support null values (in line with other languages) Improvements in JSON formatting and parsing Javascript (Alpha) Better support for "bytes" fields: bytes fields can be read as either a base64 string or UInt8Array (in environments where TypedArray is supported). New support for CommonJS imports. This should make it easier to use the JavaScript support in Node.js and tools like WebPack. See js/README.md for more information. Some significant internal refactoring to simplify and modularize the code. Ruby (Alpha) JSON serialization now properly uses camelCased names, with a runtime option that will preserve original names from .proto files instead. Well-known types are now included in the distribution. Release now includes binary gems for Windows, Mac, and Linux instead of just source gems. Bugfix for serializing oneofs. C++/Java Lite (Alpha) A new "lite" generator parameter was introduced in the protoc for C++ and Java for Proto3 syntax messages. Example usage: ./protoc --cpp_out=lite:$OUTPUT_PATH foo.proto The protoc will treat the current input and all the transitive dependencies as LITE. The same generator parameter must be used to generate the dependencies. In Proto3 syntax files, "optimized_for=LITE_RUNTIME" is no longer supported. Version 3.0.0-beta-2 General Introduced a new language implementation: JavaScript. Added a new field option "json_name". By default proto field names are converted to "lowerCamelCase" in proto3 JSON format. This option can be used to override this behavior and specify a different JSON name for the field. Added conformance tests to ensure implementations are following proto3 JSON specification. C++ (Beta) Various bug fixes and improvements to the JSON support utility: Duplicate map keys in JSON are now rejected (i.e., translation will fail). Fixed wire-format for google.protobuf.Value/ListValue. Fixed precision loss when converting google.protobuf.Timestamp. Fixed a bug when parsing invalid UTF-8 code points. Fixed a memory leak. Reduced call stack usage. Java (Beta) Cleaned up some unused methods on CodedOutputStream. Presized lists for packed fields during parsing in the lite runtime to reduce allocations and improve performance. Improved the performance of unknown fields in the lite runtime. Introduced UnsafeByteStrings to support zero-copy ByteString creation. Various bug fixes and improvements to the JSON support utility: Fixed a thread-safety bug. Added a new to JsonFormat. Added a new to JsonFormat. Updated the JSON utility to comply with proto3 JSON specification. Python (Beta) Added proto3 JSON format utility. It includes support for all field types and a few well-known types except for Any and Struct. Added runtime support for Any, Timestamp, Duration and FieldMask. "[ ]" is now accepted for repeated scalar fields in text format parser. Objective-C (Beta) Various bug-fixes and code tweaks to pass more strict compiler warnings. Now has conformance test coverage and is passing all tests. C# (Beta) Various bug-fixes. Code generation: Files generated in directories based on namespace. Code generation: Include comments from .proto files in XML doc comments (naively) Code generation: Change organization/naming of "reflection class" (access to file descriptor) Code generation and library: Add Parser property to MessageDescriptor, and introduce a non-generic parser type. Library: Added TypeRegistry to support JSON parsing/formatting of Any. Library: Added Any.Pack/Unpack support. Library: Implemented JSON parsing. Javascript (Alpha) Added proto3 support for JavaScript. The runtime is written in pure JavaScript and works in browsers and in Node.js. To generate JavaScript code for your proto, invoke protoc with "--js_out". See js/README.md for more build instructions. Version 3.0.0-beta-1 Supported languages C++/Java/Python/Ruby/Nano/Objective-C/C# About Beta This is the first beta release of protobuf v3.0.0. Not all languages have reached beta stage. Languages not marked as beta are still in alpha (i.e., be prepared for API breaking changes). General Proto3 JSON is supported in several languages (fully supported in C++ and Java, partially supported in Ruby/C#). The JSON spec is defined in the proto3 language guide: https://developers.google.com/protocol-buffers/docs/proto3#json We will publish a more detailed spec to define the exact behavior of proto3-conformant JSON serializers and parsers. Until then, do not rely on specific behaviors of the implementation if s not documented in the above spec. More specifically, the behavior is not yet finalized for the following: Parsing invalid JSON input (e.g., input with trailing commas). Non-camelCase names in JSON input. The same field appears multiple times in JSON input. JSON arrays values. The message has unknown fields. Proto3 now enforces strict UTF-8 checking. Parsing will fail if a string field contains non UTF-8 data. C++ (Beta) Introduced new utility functions/classes in the google/protobuf/util directory: MessageDifferencer: compare two proto messages and report their differences. JsonUtil: support converting protobuf binary format to/from JSON. TimeUtil: utility functions to work with well-known types Timestamp and Duration. FieldMaskUtil: utility functions to work with FieldMask. Performance optimization of arena construction and destruction. Bug fixes for arena and maps support. Changed to use cmake for Windows Visual Studio builds. Added Bazel support. Java (Beta) Introduced a new util package that will be distributed as a separate artifact in maven. It contains: JsonFormat: convert proto messages to/from JSON. TimeUtil: utility functions to work with Timestamp and Duration. FieldMaskUtil: utility functions to work with FieldMask. The static PARSER in each generated message is deprecated, and it will be removed in a future release. A static parser() getter is generated for each message type instead. Performance optimizations for String fields serialization. Performance optimizations for Lite runtime on Android: Reduced allocations Reduced method overhead after ProGuarding Reduced code size after ProGuarding Python (Alpha) Removed legacy Python 2.5 support. Moved to a single Python 2.x/3.x-compatible codebase, instead of using 2to3. Fixed build/tests on Python 2.6, 2.7, 3.3, and 3.4. Pure-Python works on all four. Python/C++ implementation works on all but 3.4, due to changes in the Python/C++ API in 3.4. Some preliminary work has been done to allow for multiple DescriptorPools with Python/C++. Ruby (Alpha) Many bugfixes: fixed parsing/serialization of bytes, sint, sfixed types other parser bugfixes fixed memory leak affecting Ruby 2.2 JavaNano (Alpha) JavaNano generated code now will be put in a nano package by default to avoid conflicts with Java generated code. Objective-C (Alpha) Added non-null markup to ObjC library. Requires SDK 8.4+ to build. Many bugfixes: Removed the class/enum filter. Renamed some internal types to avoid conflicts with the well-known types protos. Added missing support for parsing repeated primitive fields in packed or unpacked forms. Added *Count for repeated and map<> fields to avoid auto-create when checking for them being set. C# (Alpha) Namespace changed to Google.Protobuf (and NuGet package will be named correspondingly). Target platforms now .NET 4.5 and selected portable subsets only. Removed lite runtime. Reimplementation to use mutable message types. Null references used to represent "no value" for message type fields. Proto3 semantics supported; proto2 files are prohibited for C# codegen. Most proto3 features supported: JSON formatting (a.k.a. serialization to JSON), including well-known types (except for Any). Wrapper types mapped to nullable value types (or string/ByteString allowing nullability). JSON parsing is not supported yet. maps oneof enum unknown value preservation Version 3.0.0-alpha-3 (C++/Java/Python/Ruby/JavaNano/Objective-C/C#) General Introduced two new language implementations (Objective-C, C#) to proto3. Explicit "optional" keyword are disallowed in proto3 syntax, as fields are optional by default. Group fields are no longer supported in proto3 syntax. Changed repeated primitive fields to use packed serialization by default in proto3 (implemented for C++, Java, Python in this release). The user can still disable packed serialization by setting packed to false for now. Added well-known type protos (any.proto, empty.proto, timestamp.proto, duration.proto, etc.). Users can import and use these protos just like regular proto files. Addtional runtime support will be added for them in future releases (in the form of utility helper functions, or having them replaced by language specific types in generated code). Added a "reserved" keyword in both proto2 and proto3 syntax. User can use this keyword to declare reserved field numbers and names to prevent them from being reused by other fields in the same message. To reserve field numbers, add a reserved declaration in your message: message TestMessage { reserved 2, 15, 9 to 11, 3; } This reserves field numbers 2, 3, 9, 10, 11 and 15. If a user uses any of these as field numbers, the protocol buffer compiler will report an error. Field names can also be reserved: message TestMessage { reserved "foo", "bar"; } Various bug fixes since 3.0.0-alpha-2 Objective-C Objective-C includes a code generator and a native objective-c runtime library. By --objc_ to protoc, the code generator will generate a header(.pbobjc.h) and an implementation file(.pbobjc.m) for each proto file. In this first release, the generated interface provides: enums, messages, field support(single, repeated, map, oneof), proto2 and proto3 syntax support, parsing and serialization. s compatible with ARC and non-ARC usage. Besides, user can also access it via the swift bridging header. See objectivec/README.md for details. C# C# protobufs are based on project https://github.com/jskeet/protobuf-csharp-port. The original project was frozen and all the new development will happen here. Codegen plugin for C# was completely rewritten to C++ and is now an intergral part of protoc. Some refactorings and cleanup has been applied to the C# runtime library. Only proto2 is supported in C# at the moment, proto3 support is in progress and will likely bring significant breaking changes to the API. See csharp/README.md for details. C++ Added runtime support for Any type. To use Any in your proto file, first import the definition of Any: // foo.proto import "google/protobuf/any.proto"; message Foo { google.protobuf.Any any_field = 1; } message Bar { int32 value = 1; } Then in C++ you can access the Any field using PackFrom()/UnpackTo() methods: Foo foo; Bar bar = ...; foo.mutable_any_field()->PackFrom(bar); ... if (foo.any_field().IsType<Bar>()) { foo.any_field().UnpackTo(&bar); ... } In text format, entries of a map field will be sorted by key. Java Continued optimizations on the lite runtime to improve performance for Android. Python Added map support. maps now have a dict-like interface (msg.map_field[key] = value) existing code that modifies maps via the repeated field interface will need to be updated. Ruby Improvements to RepeatedField's emulation of the Ruby Array API. Various speedups and internal cleanups. Version 3.0.0-alpha-2 (C++/Java/Python/Ruby/JavaNano) General Introduced Protocol Buffers language version 3 (aka proto3). When protobuf was initially opensourced it implemented Protocol Buffers language version 2 (aka proto2), which is why the version number started from v2.0.0. From v3.0.0, a new language version (proto3) is introduced while the old version (proto2) will continue to be supported. The main intent of introducing proto3 is to clean up protobuf before pushing the language as the foundation of Google's new API platform. In proto3, the language is simplified, both for ease of use and to make it available in a wider range of programming languages. At the same time a few features are added to better support common idioms found in APIs. The following are the main new features in language version 3: Removal of field presence logic for primitive value fields, removal of required fields, and removal of default values. This makes proto3 significantly easier to implement with open struct representations, as in languages like Android Java, Objective C, or Go. Removal of unknown fields. Removal of extensions, which are instead replaced by a new standard type called Any. Fix semantics for unknown enum values. Addition of maps. Addition of a small set of standard types for representation of time, dynamic data, etc. A well-defined encoding in JSON as an alternative to binary proto encoding. This release (v3.0.0-alpha-2) includes partial proto3 support for C++, Java, Python, Ruby and JavaNano. Items 6 (well-known types) and 7 (JSON format) in the above feature list are not implemented. A new notion "syntax" is introduced to specify whether a .proto file uses proto2 or proto3: // foo.proto syntax = "proto3"; message Bar {...} If omitted, the protocol compiler will generate a warning and "proto2" will be used as the default. This warning will be turned into an error in a future release. We recommend that new Protocol Buffers users use proto3. However, we do not generally recommend that existing users migrate from proto2 from proto3 due to API incompatibility, and we will continue to support proto2 for a long time. Added support for map fields (implemented in proto2 and proto3 C++/Java/JavaNano and proto3 Ruby). Map fields can be declared using the following syntax: message Foo { map<string, string> values = 1; } Data of a map field will be stored in memory as an unordered map and it can be accessed through generated accessors. C++ Added arena allocation support (for both proto2 and proto3). Profiling shows memory allocation and deallocation constitutes a significant fraction of CPU-time spent in protobuf code and arena allocation is a technique introduced to reduce this cost. With arena allocation, new objects will be allocated from a large piece of preallocated memory and deallocation of these objects is almost free. Early adoption shows 20% to 50% improvement in some Google binaries. To enable arena support, add the following option to your .proto file: option cc_enable_arenas = true; Protocol compiler will generate additional code to make the generated message classes work with arenas. This does not change the existing API of protobuf messages and does not affect wire format. Your existing code should continue to work after adding this option. In the future we will make this option enabled by default. To actually take advantage of arena allocation, you need to use the arena APIs when creating messages. A quick example of using the arena API: { google::protobuf::Arena arena; // Allocate a protobuf message in the arena. MyMessage* message = Arena::CreateMessage<MyMessage>(&arena); // All submessages will be allocated in the same arena. if (!message->ParseFromString(data)) { // Deal with malformed input data. } // Must not delete the message here. It will be deleted automatically // when the arena is destroyed. } Currently arena does not work with map fields. Enabling arena in a .proto file containing map fields will result in compile errors in the generated code. This will be addressed in a future release. Python Python has received several updates, most notably support for proto3 semantics in any .proto file that declares syntax="proto3". Messages declared in proto3 files no longer represent field presence for scalar fields (number, enums, booleans, or strings). You can no longer call HasField() for such fields, and they are serialized based on whether they have a non-zero/empty/false value. One other notable change is in the C++-accelerated implementation. Descriptor objects (which describe the protobuf schema and allow reflection over it) are no longer duplicated between the Python and C++ layers. The Python descriptors are now simple wrappers around the C++ descriptors. This change should significantly reduce the memory usage of programs that use a lot of message types. Ruby We have added proto3 support for Ruby via a native C extension. The Ruby extension itself is included in the ruby/ directory, and details on building and installing the extension are in ruby/README.md. The extension will also be published as a Ruby gem. Code generator support is included as part of protoc with the --ruby_out flag. The Ruby extension implements a user-friendly DSL to define message types (also generated by the code generator from .proto files). Once a message type is defined, the user may create instances of the message that behave in ways idiomatic to Ruby. For example: Message fields are present as ordinary Ruby properties (getter method foo and setter method foo=). Repeated field elements are stored in a container that acts like a native Ruby array, and map elements are stored in a container that acts like a native Ruby hashmap. The usual well-known methods, such as #to_s, #dup, and the like, are present. Unlike several existing third-party Ruby extensions for protobuf, this extension is built on a "strongly-typed" philosophy: message fields and array/map containers will throw exceptions eagerly when values of the incorrect type are inserted. See ruby/README.md for details. JavaNano JavaNano is a special code generator and runtime library designed especially for resource-restricted systems, like Android. It is very resource-friendly in both the amount of code and the runtime overhead. Here is an an overview of JavaNano features compared with the official Java protobuf: No descriptors or message builders. All messages are mutable; fields are public Java fields. For optional fields only, encapsulation behind setter/getter/hazzer/ clearer functions is opt-in, which provide proper 'has' state support. For proto2, if not opted in, has state (field presence) is not available. Serialization outputs all fields not equal to their defaults. The behavior is consistent with proto3 semantics. Required fields (proto2 only) are always serialized. Enum constants are integers; protection against invalid values only when parsing from the wire. Enum constants can be generated into container interfaces bearing the enum's name (so the referencing code is in Java style). CodedInputByteBufferNano can only take byte. Similarly CodedOutputByteBufferNano can only write to byte[]. Repeated fields are in arrays, not ArrayList or Vector. Null array elements are allowed and silently ignored. Full support for serializing/deserializing repeated packed fields. Support extensions (in proto2). Unset messages/groups are null, not an immutable empty default instance. toByteArray(...) and mergeFrom(...) are now static functions of MessageNano. The 'bytes' type translates to the Java type byte[]. See javanano/README.txt for details. Version 3.0.0-alpha-1 (C++/Java) General Introduced Protocol Buffers language version 3 (aka proto3). When protobuf was initially opensourced it implemented Protocol Buffers language version 2 (aka proto2), which is why the version number started from v2.0.0. From v3.0.0, a new language version (proto3) is introduced while the old version (proto2) will continue to be supported. The main intent of introducing proto3 is to clean up protobuf before pushing the language as the foundation of Google's new API platform. In proto3, the language is simplified, both for ease of use and to make it available in a wider range of programming languages. At the same time a few features are added to better support common idioms found in APIs. The following are the main new features in language version 3: Removal of field presence logic for primitive value fields, removal of required fields, and removal of default values. This makes proto3 significantly easier to implement with open struct representations, as in languages like Android Java, Objective C, or Go. Removal of unknown fields. Removal of extensions, which are instead replaced by a new standard type called Any. Fix semantics for unknown enum values. Addition of maps. Addition of a small set of standard types for representation of time, dynamic data, etc. A well-defined encoding in JSON as an alternative to binary proto encoding. This release (v3.0.0-alpha-1) includes partial proto3 support for C++ and Java. Items 6 (well-known types) and 7 (JSON format) in the above feature list are not impelmented. A new notion "syntax" is introduced to specify whether a .proto file uses proto2 or proto3: // foo.proto syntax = "proto3"; message Bar {...} If omitted, the protocol compiler will generate a warning and "proto2" will be used as the default. This warning will be turned into an error in a future release. We recommend that new Protocol Buffers users use proto3. However, we do not generally recommend that existing users migrate from proto2 from proto3 due to API incompatibility, and we will continue to support proto2 for a long time. Added support for map fields (implemented in C++/Java for both proto2 and proto3). Map fields can be declared using the following syntax: message Foo { map<string, string> values = 1; } Data of a map field will be stored in memory as an unordered map and it can be accessed through generated accessors. C++ Added arena allocation support (for both proto2 and proto3). Profiling shows memory allocation and deallocation constitutes a significant fraction of CPU-time spent in protobuf code and arena allocation is a technique introduced to reduce this cost. With arena allocation, new objects will be allocated from a large piece of preallocated memory and deallocation of these objects is almost free. Early adoption shows 20% to 50% improvement in some Google binaries. To enable arena support, add the following option to your .proto file: option cc_enable_arenas = true; Protocol compiler will generate additional code to make the generated message classes work with arenas. This does not change the existing API of protobuf messages and does not affect wire format. Your existing code should continue to work after adding this option. In the future we will make this option enabled by default. To actually take advantage of arena allocation, you need to use the arena APIs when creating messages. A quick example of using the arena API: { google::protobuf::Arena arena; // Allocate a protobuf message in the arena. MyMessage* message = Arena::CreateMessage<MyMessage>(&arena); // All submessages will be allocated in the same arena. if (!message->ParseFromString(data)) { // Deal with malformed input data. } // Must not delete the message here. It will be deleted automatically // when the arena is destroyed. } Currently arena does not work with map fields. Enabling arena in a .proto file containing map fields will result in compile errors in the generated code. This will be addressed in a future release. |
||
mef
|
918ebb6730 |
Updated devel/p5-Proc-PID-File to 1.28
-------------------------------------- 1.28 2016/07/28 Dmitri Tikhonov <dmitri@cpan.org> - Fix long-standing sysopen argument precedence bug, closing RT#62380 and RT#102536. - Fixes to POD and Makefile.PL from David Steinbrunner -- thanks! |
||
mef
|
54889426e9 |
Updated to devel/p5-Config-General to 2.63
------------------------------------------ 2.63 - fix for rt.cpan.org#116340: do only consider a backslash as meta escape char, but not if it appears on it's own, as it happens on windows platforms. Thanks to for finding and tracking it down. |
||
mef
|
da5035f8be |
Updated to devel/p5-Sub-Uplevel to 0.2600
----------------------------------------- 0.2600 2016-08-05 10:46:37-04:00 America/New_York - No changes from 0.2501-TRIAL 0.2501 2016-07-29 16:18:45-04:00 America/New_York (TRIAL RELEASE) [~Internal~] - Optimized calls to caller() |
||
mef
|
aa86bad958 |
Updated devel/p5-NEXT to 0.67
----------------------------- 0.67 2016-07-30 NEILB - Changed class names in SYNOPSIS from A, B, C, D to P, Q, R, S. This is avoid potential clash with core B:: namespace. RT#9734 I didn't change the later examples in the doc, as I think they're ok. - Added mentions of next::method in the core "mro" module. - Changed all mentions of "NEXT.pm" in the doc to C<NEXT>. 0.66 2016-07-28 NEILB - split the "package EVERY" statement across two lines to hide it from PAUSE and help with resolving a permissions conflict with "Every". - Added prereqs, license type, and min perl version to dist metadata - Added github repo to dist metadata - Fixed pod error reported in RT#49984 and RT#100587, and rogue trailing spaces in pod, RT#64923 0.65_01 2016-07-20 NEILB - split the "package EVERY" statement across two lines to hide it from PAUSE and help with resolving a permissions conflict with "Every". - Added prereqs, license type, and min perl version to dist metadata - Added github repo to dist metadata - Fixed pod error reported in RT#49984 and RT#100587, and rogue trailing spaces in pod, RT#64923 |
||
mef
|
aa13c0bd82 |
Updated devel/p5-ExtUtils-MakeMaker to 7.20
------------------------------------------- 7.20 Fri Aug 5 09:39:56 BST 2016 Bug fixes: - CVE-2016-1238: avoid loading VMS::Feature from the default . - Restore ordering issue involving OTHERLDFLAGS - prevent EUMM::Locale from warning with old Win32.pm - Fix test warnings in MM_Unix.pm when in core - Check for ascii locale using normalized name - Cygwin: avoid libperl.dll.dll.a - Fix basic.t tests on Win32 in core Test fixes: - Skip subdirscomplex test on VMS Doc fixes: - fix typos and add subdirs text to MakeMaker.pm - added examples for running tests in subdirs |
||
tsutsui
|
a468232ba2 |
Update ruby-delayer-deferred to 1.0.4.
- Handle exception in thread properly. |
||
ryoon
|
e37b97fe3c | Recursive revbump from audio/pulseaudio | ||
nonaka
|
d2c76300a9 |
PR/51360: handle ${X11BASE}/lib/pkgconfig.
bump PKGREVISION. |
||
prlw1
|
825c535bd6 |
According to Brad King, cmake developer, who kindly reviewed our patches:
The SIZEOF_VOID_P macro is defined by code in CMakeLists.txt using the value of CMAKE_SIZEOF_VOID_P. The former is a C++ preprocessor macro. The latter is only visible in CMake code. |
||
adam
|
77b8ed74db | Revbump after graphics/gd update | ||
wiz
|
56128362c9 |
Updated py-tortoisehg to 3.9.
TortoiseHg 3.9 TortoiseHg 3.9 is a quarterly feature release, with many improvements to performance on large repositories, and security improvements in Mercurial 3.9. See https://www.mercurial-scm.org/wiki/SecureConnections Bugs Fixes merge: fix missing separator in merge preview output (fixes #4526) repofilter: do not emit branchChanged if original branch is restored repowatcher: compare st_size and st_ctime to detect changes repowidget: add status bar to LightRepoWindow (fixes #4553) run: load template functions from extensions (fixes #4515) wconfig: patch iniparse to allow :suboption in name Improvements commit: focus on commit message after branch operation (fixes #4442) filedata: pass in existing copy information to diff fileview: change shortcut keys of parent toggle actions to free Ctrl+n icons: doubles the icon sizes on Linux on retina displays (fixes #4493) init: relabel "Add special files" to avoid confusion with "hg add" (fixes #4513) repofilter: improve branch drop-down performance repomodel: new graph layout algorithm for large repositories status: reuse working context in WctxModel sync: add widget to select minimum TLS protocol workbench: add actions to switch tabs by Ctrl+n key (closes #3543) workbench: add shortcut to toggle visibility of task tab Installer updates to mercurial_keyring, evolve, hgsubversion, and hg-git |
||
wiz
|
dd4e220033 |
Updated py-mercurial to 3.9.
Features ui.textwidth can now be set to define width of help text separate() template function added ui.rollback can be set to false to disable the hg rollback command fail-<command> hooks now run when a command fails experimental.graphstyle.* config options to control styling of graphs in console experimental.histedit.autoverb allows histedit lines beginning with "verb!" to be interpreted as histedit actions [hostsecurity] config section for defining advanced per-host security settings ability to define the SHA-256 and SHA-512 hashes of pinned server certificates ability to define CA certificates on a per-host basis ability to define the minimum TLS protocol version on a global or per-host basis sort() revset can now perform topological sorts using the topo option hgweb can now render JSON for filelog, filerevision, summary, and search web commands [paths] entries can now define a pushrev sub-option to control which revisions to push by default The experimental 'journal' extension was added, allowing users to view the previous positions of bookmarks and the working copy Improvements This release includes many improvements, including (but not limited to): performance of hg diff has been improved chg now detects more changes to the configuration and execution environment SSL/TLS code has been significantly refactored and now is consistent across all consumers (HTTPS, SMTPS) performance improvements to server communication (particularly for the largefiles and remotefilelog extensions) connections to servers whose certificate authority (CA) is unknown are now refused even if no CA certificates are available (see SecureConnections for details) fingerprints of server certificates are now printed using SHA-256 instead of SHA-1 reads and writes to certain files is now robust and avoids more race conditions and edge cases (see ExactCacheValidationPlan) performance improvements to certain revsets cloning will no longer prompt for a password multiple times when cloning from a server that requires a password annotate view in hgweb now groups lines into blocks depending on their revision and highlights lines for the current revision hgweb now displays extra information and also navigation links in popups for each line in annotate view |
||
wiz
|
2ec4922013 | + py-freezegun | ||
wiz
|
69cb90d80b |
Import py-freezegun-0.3.7 as devel/py-freezegun.
FreezeGun is a library that allows your python tests to travel through time by mocking the datetime module. |
||
wiz
|
c33daa9174 |
Fix boost/optional/optional_fwd.hpp header file using upstream patch.
|
||
minskim
|
fdaed9d023 | Enable ruby-contracts | ||
minskim
|
ce28365b26 |
Import ruby-contracts-0.14.0 as devel/ruby-contracts
This library provides contracts for Ruby. Contracts let you clearly express how your code behaves, and free you from writing tons of boilerplate, defensive code. |
||
wiz
|
d8db4ca509 |
Updated pkgconf to 1.
Bugfix release. |
||
wiz
|
355ff2c0f1 |
Updated talloc to 2.1.8.
Changes not found. |
||
wiz
|
ffabdbba0c |
Updated py-click-threading to 0.4.0.
Rewrite using Future from the stdlib Directly execute if on main thread Put UI worker onto click context |
||
wiz
|
2152a10c86 |
Updated py-atomicwrites to 1.1.0.
Style fixes. OS X fixes. fsync fixes. |
||
wiz
|
69e3c4c153 |
Updated afl to 2.23b.
-------------- Version 2.23b: -------------- - Improved the stability metric for persistent mode binaries. Problem spotted by Kurt Roeckx. - Made a related improvement that may bring the metric to 100% for those targets. -------------- Version 2.22b: -------------- - Mentioned the potential conflicts between MSAN / ASAN and FORTIFY_SOURCE. There is no automated check for this, since some distros may implicitly set FORTIFY_SOURCE outside of the compiler's argv[]. - Populated the support for AFL_LD_PRELOAD to all companion tools. - Made a change to the handling of ./afl-clang-fast -v. Spotted by Jan Kneschke. |
||
wiz
|
250012471e |
Updated meld to 3.16.2.
2016-07-30 meld 3.16.2 ====================== Fixes: * Fix performance regression in text filtering (Kai Willadsen) * Fix regression in respecting custom text encoding (Kai Willadsen) Translations: * Andika Triwidada (id) |
||
wiz
|
f3aedd9388 |
Updated py-setuptools to 25.1.1.
v25.1.1 ------- * #686: Fix issue in sys.path ordering by pkg_resources when rewrite technique is "raw". * #699: Fix typo in msvc support. v25.1.0 ------- * #609: Setuptools will now try to download a distribution from the next possible download location if the first download fails. This means you can now specify multiple links as ``dependency_links`` and all links will be tried until a working download link is encountered. v25.0.2 ------- * #688: Fix AttributeError in setup.py when invoked not from the current directory. v25.0.1 ------- * Cleanup of setup.py script. * Fixed documentation builders by allowing setup.py to be imported without having bootstrapped the metadata. * More style cleanup. See #677, #678, #679, #681, #685. |
||
schmonz
|
2eeb38b8e0 |
Update to 1.28. From the changelog:
General * Improve support for GTK 3.20. * System filetype files and system tags files are now in sub-directories *filedefs/* and *tags/* respectively (Jiří Techet, PR#485). * Remove Waf build system (PR#769). Interface * Allow to set a keybinding for File->Properties (Issue#622, PR#952). * Make it possible to define default symbol_list_sort_mode (Jiří Techet, Issue#313, PR#581). * Add keybindings for custom commands 4 through 9 (Thomas Sahlin, PR#858). * Use "Symbol" in place of "Tag" everywhere it does not refer to markup tags (Jiří Techet, Issue#579, PR#582). Bug fixes * Fix canceling keybinding overriding by discarding the dialog (Issue#714). * Fix type name coloring when types change (Jiří Techet, PR#1039, Issue#1020, Issue#1022). * Fix undo of line end type change (Jiří Techet, PR#527, Issue#409). * Fix build with GLib < 2.32 (Issue#764). * Fix missing progress bar during build runs (Issue#765). * Fix infinite loop when performing reflow on some input with many consecutive spaces (Issue#848, PR#852). * Fix some locale encoding conversion issues (Jiří Techet, PR#547). Editor * Update Scintilla to version 3.6.6. * Improve Goto Symbol popup contents (Jiří Techet, PR#958). * Update Scintilla to version 3.6.3 (including improved support for Lua 5.3 and Perl 5.22). * Greatly improve scope completion (Jiří Techet, PR#488, PR#505, PR#862, PR#906). * Performance improvement highlighting types (Jiří Techet, PR#575). * Show calltips after a C++ explicit specialization (PR#496). * Show a popup to select the symbol when going to a symbol has several options (Jiří Techet, PR#406, PR#923). Filetypes * Treat `.h` headers as C++ by default (Jiří Techet, PR#857). * Various improvements to the Ruby parser (Issue#587). * Fix Haskell single line comments (Alexander, PR#1029). * Update Java keywords (Yan Pashkovsky, PR#1024). * Fix handling of curly brackets in Make (Masatake Yamato). * Add ECMAScript 6 keywords (Chris Mayo, PR#980). * Slight improvement to the Java file template (Philipp Wiesemann, PR#1073). * Add missing `last-child` CSS pseudo-class (Issue#1102). * Added some extra Markdown extensions (Andrea Stacchiotti, PR#820). * Add `.asm51` and `.a51` extensions for 8051 assembly (Devyn Collier Johnson, PR#739). * Fix C++ namespaces scope (Issue#871). * Fix parsing of C++ global scope qualifiers in base class lists. * Use the C++ parser for CUDA filetype (Issue#830, PR#831). * Add Clojure file extensions (Daniel Șuteu, PR#842). * Improve return type and var type recognition in C, C++, C# and D (Issue#845, PR#889). * Fix parsing of C++11 raw string literals (PR#879). * Update built-in PHP symbols (Issue#584, PR#603). * Fix parsing some Objective-C properties (PR#940, PR#941). Internationalization * Updated translations: ca, de, el, es, fr, it, ja, lt, pt, ru, sk, tr, zh_CN * Updated translations: de, es, fr, it, ja, kk, lt, nl, pt, ru, sk, zh_CN API * Don't require static strings for key group name and label (PR#1126). * Formally add TMTag to the API (Thomas Martitz, PR#1093). * Add `editor_set_indent_width()` (Thomas Martitz, PR#903). * Add `GeanyFiletypeID` and deprecate `filetype_id` (PR#932). * Remove non-API type `langType` (Jiří Techet, part of PR#906). * Mark deprecated API so GCC-like compilers can warn about it, and add `GEANY_DISABLE_DEPRECATION_WARNINGS` to silence those (PR#911). * Add `scintilla_object_send_message()`, `scintilla_object_get_type()` and `scintilla_object_new()` alias to the API as synonyms for their legacy counterparts `scintilla_send_message()`, `scintilla_get_type()` and `scintilla_new()` (Thomas Martitz, PR#874). Plugins * Class builder: use `.hpp` extension for C++ headers by default (Yan Pashkovsky, PR#999). Windows * Show an error if an URI cannot be opened (PR#1079). * Project->Open now respects the native dialog setting (PR#961). OSX * Fix refreshing the keybindings displayed in the menus (Jiří Techet, PR#973). |
||
wen
|
d5e6bc6626 |
Update to 0.009
Add LICENSE Upstream changes: 0.008 Sat Oct 3 20:26:28 2015 - Fixed problems when exporting under 'use strict' - Added support for Perl 6 IMPORT blocks - unknitted POD nit (thanks Steve) - Added META files (thanks Jarkko) 0.009 Tue Nov 24 09:12:06 2015 |
||
kamil
|
4462e7ce50 | Add devel/flatzebra | ||
kamil
|
b2c3630ca5 |
Import flatzebra-0.1.6 as devel/flatzebra
A generic game engine for 2D double-buffering animation. |
||
prlw1
|
58d6a6d37c |
Update cmake-fedora to 2.6.0
All I found was: - Enhancement: * ManageTranslation: MANAGE_POT_FILE: new options DOMAIN_NAME, MO_LOCALE_DIR - Bug fix: * cmake-fedora-zanata: remove debug message * ManageTranslate: failed to generate pot targets when MANAGE_TRANSLATION_GETTEXT_POT_FILES is not empty. but it is in the TODO list... |
||
prlw1
|
d95561844a |
Update cmake to 3.6.1
CMake 3.6 Release Notes *********************** Changes made since CMake 3.5 include the following. New Features ============ Generators ---------- * The :generator:`Ninja` generator learned to produce phony targets of the form ``sub/dir/all`` to drive the build of a subdirectory. This is equivalent to ``cd sub/dir; make all`` with :ref:`Makefile Generators`. * The :generator:`Ninja` generator now includes system header files in build dependencies to ensure correct re-builds when system packages are updated. * The :generator:`Visual Studio 14 2015` generator learned to support the Clang/C2 toolsets, e.g. with the ``-T v140_clang_3_7`` option. This feature is experimental. Commands -------- * The :command:`add_custom_command` and :command:`add_custom_target` commands learned how to use the :prop_tgt:`CROSSCOMPILING_EMULATOR` executable target property. * The :command:`install` command learned a new ``EXCLUDE_FROM_ALL`` option to leave installation rules out of the default installation. * The :command:`list` command gained a ``FILTER`` sub-command to filter list elements by regular expression. * The :command:`string(TIMESTAMP)` and :command:`file(TIMESTAMP)` commands gained support for the ``%s`` placeholder. This is the number of seconds since the UNIX Epoch. Variables --------- * A :variable:`CMAKE_DEPENDS_IN_PROJECT_ONLY` variable was introduced to tell :ref:`Makefile Generators` to limit dependency scanning only to files in the project source and build trees. * A new :variable:`CMAKE_HOST_SOLARIS` variable was introduced to indicate when CMake is running on an Oracle Solaris host. * A :variable:`CMAKE_<LANG>_STANDARD_INCLUDE_DIRECTORIES` variable was added for use by toolchain files to specify system include directories to be appended to all compiler command lines. * The :variable:`CMAKE_<LANG>_STANDARD_LIBRARIES` variable is now documented. It is intended for use by toolchain files to specify system libraries to be added to all linker command lines. * A :variable:`CMAKE_NINJA_OUTPUT_PATH_PREFIX` variable was introduced to tell the :generator:`Ninja` generator to configure the generated ``build.ninja`` file for use as a ``subninja``. * A :variable:`CMAKE_TRY_COMPILE_PLATFORM_VARIABLES` variable was added for use by toolchain files to specify platform-specific variables that must be propagated by the :command:`try_compile` command into test projects. * A :variable:`CMAKE_TRY_COMPILE_TARGET_TYPE` variable was added to optionally tell the :command:`try_compile` command to build a static library instead of an executable. This is useful for cross-compiling toolchains that cannot link binaries without custom flags or scripts. Properties ---------- * A :prop_tgt:`DEPLOYMENT_REMOTE_DIRECTORY` target property was introduced to tell the :generator:`Visual Studio 9 2008` and :generator:`Visual Studio 8 2005` generators to generate the "remote directory" for WinCE project deployment and debugger settings. * A :prop_tgt:`<LANG>_CLANG_TIDY` target property and supporting :variable:`CMAKE_<LANG>_CLANG_TIDY` variable were introduced to tell the :ref:`Makefile Generators` and the :generator:`Ninja` generator to run ``clang-tidy`` along with the compiler for ``C`` and ``CXX`` languages. * A :prop_test:`TIMEOUT_AFTER_MATCH` test property was introduced to optionally tell CTest to enforce a secondary timeout after matching certain output from a test. * A :prop_tgt:`VS_CONFIGURATION_TYPE` target property was introduced to specify a custom project file type for :ref:`Visual Studio Generators` supporting VS 2010 and above. * A :prop_dir:`VS_STARTUP_PROJECT` directory property was introduced to specify for :ref:`Visual Studio Generators` the default startup project for generated solutions (``.sln`` files). Modules ------- * The :module:`CMakePushCheckState` module now pushes/pops/resets the variable ``CMAKE_EXTRA_INCLUDE_FILE`` used in :module:`CheckTypeSize`. * The :module:`ExternalProject` module leared the ``GIT_SHALLOW 1`` option to perform a shallow clone of a Git repository. * The :module:`ExternalProject` module learned to initialize Git submodules recursively and also to initialize new submodules on updates. Use the ``GIT_SUBMODULES`` option to restrict which submodules are initalized and updated. * The :module:`ExternalProject` module leared the ``DOWNLOAD_NO_EXTRACT 1`` argument to skip extracting the file that is downloaded (e.g., for self-extracting shell installers or ``.msi`` files). * The :module:`ExternalProject` module now uses ``TLS_VERIFY`` when fetching from git repositories. * The :module:`FindBLAS` and :module:`FindLAPACK` modules learned to support `OpenBLAS <http://www.openblas.net>`__. * The :module:`FindCUDA` module learned to find the ``cublas_device`` library. * The :module:`FindGTest` module ``gtest_add_tests`` function now causes CMake to automatically re-run when test sources change so that they can be re-scanned. * The :module:`FindLTTngUST` module was introduced to find the LTTng-UST library. * The :module:`FindPkgConfig` module learned to optionally create imported targets for the libraries it has found. * The :module:`FindProtobuf` module learned to provide a ``Protobuf_VERSION`` variable and check the version number requested in a :command:`find_package` call. * The :module:`InstallRequiredSystemLibraries` module learned a new ``CMAKE_INSTALL_UCRT_LIBRARIES`` option to enable app-local deployment of the Windows Universal CRT libraries with Visual Studio 2015. Platforms --------- * The Clang compiler is now supported on CYGWIN. * Support was added for the Bruce C Compiler with compiler id ``Bruce``. CTest ----- * The :command:`ctest_update` command now looks at the :variable:`CTEST_GIT_INIT_SUBMODULES` variable to determine whether submodules should be updated or not before updating. * The :command:`ctest_update` command will now synchronize submodules on an update. Updates which add submodules or change a submodule's URL will now be pulled properly. CPack ----- * The :module:`CPackDeb` module learned how to handle ``$ORIGIN`` in ``CMAKE_INSTALL_RPATH`` when :variable:`CPACK_DEBIAN_PACKAGE_SHLIBDEPS` is used for dependency auto detection. * The :module:`CPackDeb` module learned how to generate ``DEBIAN/shlibs`` contorl file when package contains shared libraries. * The :module:`CPackDeb` module learned how to generate ``DEBIAN/postinst`` and ``DEBIAN/postrm`` files if the package installs libraries in ldconfig-controlled locations (e.g. ``/lib/``, ``/usr/lib/``). * The :module:`CPackDeb` module learned how to generate dependencies between Debian packages if multi-component setup is used and :variable:`CPACK_COMPONENT_<compName>_DEPENDS` variables are set. For backward compatibility this feature is disabled by default. See :variable:`CPACK_DEBIAN_ENABLE_COMPONENT_DEPENDS`. * The :module:`CPackDeb` module learned how to set custom package file names including how to generate properly-named Debian packages:: <PackageName>_<VersionNumber>-<DebianRevisionNumber>_<DebianArchitecture>.deb For backward compatibility this feature is disabled by default. See :variable:`CPACK_DEBIAN_FILE_NAME` and :variable:`CPACK_DEBIAN_<COMPONENT>_FILE_NAME`. * The :module:`CPackDeb` module learned how to set the package release number (``DebianRevisionNumber`` in package file name when used in combination with ``DEB-DEFAULT`` value set by :variable:`CPACK_DEBIAN_FILE_NAME`). See :variable:`CPACK_DEBIAN_PACKAGE_RELEASE`. * The :module:`CPackDeb` module learned how to set the package architecture per-component. See :variable:`CPACK_DEBIAN_<COMPONENT>_PACKAGE_ARCHITECTURE`. * The :module:`CPackDMG` module learned a new option to tell the CPack ``DragNDrop`` generaor to skip the ``/Applications`` symlink. See the :variable:`CPACK_DMG_DISABLE_APPLICATIONS_SYMLINK` variable. * The :module:`CPackIFW` module gained a new :command:`cpack_ifw_update_repository` command to update a QtIFW-specific repository from a remote repository. * The :module:`CPackRPM` module learned how to set RPM ``dist`` tag as part of RPM ``Release:`` tag when enabled (mandatory on some Linux distributions for e.g. on Fedora). See :variable:`CPACK_RPM_PACKAGE_RELEASE_DIST`. * The :module:`CPackRPM` module learned how to set default values for owning user/group and file/directory permissions of package content. See :variable:`CPACK_RPM_DEFAULT_USER`, :variable:`CPACK_RPM_DEFAULT_GROUP`, :variable:`CPACK_RPM_DEFAULT_FILE_PERMISSIONS`, :variable:`CPACK_RPM_DEFAULT_DIR_PERMISSIONS` and their per component counterparts. * The :module:`CPackRPM` module learned how to set user defined package file names, how to specify that rpmbuild should decide on file name format as well as handling of multiple rpm packages generated by a single user defined spec file. See :variable:`CPACK_RPM_PACKAGE_NAME` and :variable:`CPACK_RPM_<component>_PACKAGE_NAME`. * The :module:`CPackRPM` module learned how to correctly handle symlinks that are pointing outside generated packages. Other ----- * The :manual:`Compile Features <cmake-compile-features(7)>` functionality is now aware of features supported by Intel C++ compilers versions 12.1 through 16.0 on UNIX platforms. Deprecated and Removed Features =============================== * The :module:`CMakeForceCompiler` module and its macros are now deprecated. See module documentation for an explanation. * The :command:`find_library`, :command:`find_path`, and :command:`find_file` commands no longer search in installation prefixes derived from the ``PATH`` environment variable on non-Windows platforms. This behavior was added in CMake 3.3 to support Windows hosts but has proven problematic on UNIX hosts. Users that keep some ``<prefix>/bin`` directories in the ``PATH`` just for their tools do not necessarily want any supporting ``<prefix>/lib`` directories searched. One may set the ``CMAKE_PREFIX_PATH`` environment variable with a :ref:`;-list <CMake Language Lists>` of prefixes that are to be searched. * The :generator:`Visual Studio 7 .NET 2003` generator is now deprecated and will be removed in a future version of CMake. * The :generator:`Visual Studio 7` generator (for VS .NET 2002) has been removed. It had been deprecated since CMake 3.3. * The :generator:`Visual Studio 6` generator has been removed. It had been deprecated since CMake 3.3. Other Changes ============= * The precompiled OS X binary provided on ``cmake.org`` now requires OS X 10.7 or newer. * On Linux and FreeBSD platforms, when building CMake itself from source and not using a system-provided libcurl, OpenSSL is now used by default if it is found on the system. This enables SSL/TLS support for commands supporting network communication via ``https``, such as :command:`file(DOWNLOAD)`, :command:`file(UPLOAD)`, and :command:`ctest_submit`. * The :manual:`cmake(1)` ``--build`` command-line tool now rejects multiple ``--target`` options with an error instead of silently ignoring all but the last one. * :prop_tgt:`AUTOMOC` now diagnoses name collisions when multiple source files in different directories use ``#include <moc_foo.cpp>`` with the same name (because the generated ``moc_foo.cpp`` files would collide). * The :module:`FindBISON` module ``BISON_TARGET`` macro now supports special characters by passing the ``VERBATIM`` option to internal :command:`add_custom_command` calls. This may break clients that added escaping manually to work around the bug. * The :module:`FindFLEX` module ``FLEX_TARGET`` macro now supports special characters by passing the ``VERBATIM`` option to internal :command:`add_custom_command` calls. This may break clients that added escaping manually to work around the bug. * The :module:`FindProtobuf` module input and output variables were all renamed from ``PROTOBUF_`` to ``Protobuf_`` for consistency with other find modules. Input variables of the old case will be honored if provided, and output variables of the old case are always provided. * The :module:`CPackRPM` module now supports upper cased component names in per component CPackRPM specific variables. E.g. component named ``foo`` now expects component specific variable to be ``CPACK_RPM_FOO_PACKAGE_NAME`` while before it expected ``CPACK_RPM_foo_PACKAGE_NAME``. Upper cased component name part in variables is compatible with convention used for other CPack variables. For back compatibility old format of variables is still valid and preferred if both versions of variable are set, but the preferred future use is upper cased component names in variables. New variables that will be added to CPackRPM in later versions will only support upper cased component variable format. * The CPack NSIS generator's configuration file template was fixed to quote the path to the uninstaller tool used by the :variable:`CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL` option. This avoids depending on an insecure Windows feature to run an uninstaller tool with a space in the path. |
||
wen
|
bcaab3b129 |
Update to 0.9
Upstream changes: Version 0.9 ------------------------------------------------------------------------------ * Added an argument `allow_error` to `parse_all()` to allow syntactical errors in R source code when `allow_error = TRUE`; this means `evaluate(stop_on_error = 0 or 1)` will no longer stop on syntactical errors but returns a list of source code and the error object instead. This can be useful to show syntactical errors for pedagogical purposes. |
||
wen
|
b7f0be55cc |
Update to 0.016
Upstream changes: 0.016 2015-10-10 12:46:48+02:00 Europe/Amsterdam Fix deprecation check 0.015 2015-10-03 14:21:18+02:00 Europe/Amsterdam Make lexical_topic a deprecated feature 0.014 2015-09-12 00:29:37+02:00 Europe/Amsterdam Add bitwise to list of known features |
||
wen
|
a5df6ff043 |
Update to 2.88
Upstream changes: version 2.88 at 2016-07-25 15:49:54 +0000 ----------------------------------------- Change: bef7dc2fbca1aa1b41d3223806c638a00d70a390 Author: Chris 'BinGOs' Williams <chris@bingosnet.co.uk> Date : 2016-07-25 16:49:54 +0000 Remove 5.003_07 ----------------------------------------- version 2.86 at 2016-07-25 15:38:52 +0000 ----------------------------------------- Change: 0c31a5067e27e17c1be5ac3ec6054968f17f51e3 Author: Chris 'BinGOs' Williams <chris@bingosnet.co.uk> Date : 2016-07-25 16:38:52 +0000 Updated for v5.22.3 and v5.24.1 RC2 ----------------------------------------- version 2.84 at 2016-07-20 18:31:32 +0000 ----------------------------------------- Change: 0d4340f965fe90d93d371b8512acb6cb13fb08a2 Author: Chris 'BinGOs' Williams <chris@bingosnet.co.uk> Date : 2016-07-20 19:31:32 +0000 Updated for v5.25.3 ----------------------------------------- version 2.82 at 2016-07-17 22:44:09 +0000 ----------------------------------------- Change: fd4514153cf3a46fa3c4bb7308e1718f10ecb36d Author: Chris 'BinGOs' Williams <chris@bingosnet.co.uk> Date : 2016-07-17 23:44:09 +0000 Updated for v5.22.3-RC1 and v5.24.1-RC1 |
||
wen
|
1ea6a5c4af |
Update to 0.37
Upstream changes: 0.37 2016-07-12 16:40 UTC + Chg : A large chunk of boilerplate XS code, which is also used in other XS modules, has been factored out of the main .xs file to a collection of .h files in the xsh subdirectory. + Fix : [RT #115392] : Intermittent segfaults with heredocs Heredocs should now be handled correctly. Thanks Graham Knop for reporting. |
||
wen
|
e0e85ff95a |
Update to 0.25
Upstream changes: - 0.25 ... Escape braces {} in t/t_makefile_pl.t and t/t_makefile_pl_pre.t |
||
wen
|
c85ba9df3b |
Update to 0.38
Upstream changes: 0.38 2016-07-14 - Support `INSTALLDIRS=vendor` - Properly honor `$DESTDIR` at `make install` time |
||
wen
|
4acc92c2e4 |
Update to 5.20160720
Upstream changes: 5.20160720 - Updated for v5.25.3 |
||
wen
|
a99d410c1d |
Update to 0.18
Upstream changes: 0.18 27 Nov, 2015 + fix getting error message from Archive::Tar (rt#109774) |
||
wen
|
fe063143e0 |
Update to 2.86
Upstream changes: 2.86 - Add version to SVN::Notify::SMTP to make PAUSE happy. 2.85 2016-03-29T23:29:11Z - Fixed a typo, thanks to gregor herrmann of the Debian project. - Eliminated "Unescaped left brace in regex is deprecated" warnings on Perl 5.21. - Fixed test failures triggered by an improvement to the encoding of headers by the Encode module. Thanks to Pali for the fix! - Improved the encoding of the "From", "To", and "Reply-To" headers so that only the phrase part is encoded, not the address itself. Thanks to Pali for the corrections. - Now require Email::Address to handle the proper parsing of addresses for encoding into headers. |
||
wen
|
89d67ccfbc |
Update to 0.005
Upstream changes: 0.005 2015-11-04 23:27:05-05:00 America/New_York the "-as" argument can now be a scalar ref, to which the glob will be assigned |
||
wen
|
ee3d520961 |
Update to 0.09
Upstream changes: 0.09 2016/03/09 17:49:17 [CHANGES] * Allow callers to allow ARRAY dereference for special circumstances 0.08 2015/12/15 17:45:46 [CHANGES] * Support perl 5.8.x (which lacks overloading.pm) 0.07 2015/10/11 12:37:51 [BUGFIXES] * Provide the other conversion overload operations and allow fallback 0.06 2015/10/07 00:24:52 [BUGFIXES] * Ensure that structs are still boolean true 0.05 2015/10/06 23:12:58 [BUGFIXES] * Throw an exception on attempts to dereference a struct as an array (RT107583) * Throw an exception if accessor-mutators are invoked with extra arguments * Give AUTOLOAD :lvalue context so it reports the right message for attempts to assign to missing fields (RT107577) 0.04 2015/09/30 18:29:01 [CHANGES] * Support creating a predicate test function |
||
wen
|
8bbdaaf20f |
Update to 0.09
Upstream changes: 0.09 2016-04-13 - Fix the copyright holder, license and year in dist.ini/meta-data. - It should be Neil Watkiss / Perl 5 / 2001 - https://rt.cpan.org/Ticket/Display.html?id=113735 - Thanks to KENTNL for the report. 0.08 2016-04-13 - Remove stray Build/_build artifacts from the distribution: - https://rt.cpan.org/Ticket/Display.html?id=113730 - Thanks to KENTNL - Fix the link to the bugtracker, add META.json, and supply a meta-data "Provides" section. - https://rt.cpan.org/Ticket/Display.html?id=113731 - Thanks to KENTNL |
||
wen
|
64d902d48f |
Update to 1.34
Upstream changes: 1.34 2016-06-12 - ppport.h: update from version 1.0007 to version 3.31. - t/utf8_text.t: fix for the fail when PERL_UNICODE environment variable is set. 1.33 2016-06-10 - Gnu.pm, t/utf8_text.t: fix version checks for perl 5.10.0. - t/utf8_text.t: fix the number of skip for systems which do not support en_US.UTF-8 locale. - Gnu.pm: delete old formated 'use VERSION' 1.32 2016-06-06 - improve UTF-8 handling - UTF-8 decoding is done at the interface between Perl and XS. This makes it possible for UTF-8 strings to be get from the GNU Readline Library functions and variables. - add enableUTF8() method - UTF-8 support is enabled when STDIN is in UTF-8 by the -C command-line switch, or PERL_UNICODE environment variable, or IN file handle has utf8 IO layer, or -enableUTF8 method is called. - pop IO layer only when stdio layer is pushed on utf8 layer to support Perl 5.8.x - rl_save_state(), rl_restore_state(), history_get_history_state(), and history_set_history_state() are finally implemented. - update RL_STATE_* definitions - fix rl_readline_state and history_legnth variable to be writable - fix rl_completion_quote_character and rl_completion_found_quate variable to be read only - update POD document - t/*.t: use Test::More and improved - t/utf8_binary.t, t/utf8_text.t: - use en_US.UTF-8 instead of en_US.utf8 for locale - force the GNU Readline Library 8bit through - add variable access test, IO layer check, verbose mode, etc. - use camel characters instead of Japanese kanji characters - t/utf8_binary.t: skip when PERL_UNICODE is set. [rt.cpan.org #114185] - t/utf8.txt: use camel characters instead of Japanese kanji characters - t/callback.t: update comments and code clean-up - use some modern Perl features (but still in 5.8 era) - use file handle references - define export tags - comment out 'use vars' for subroutine name aliase 1.31 2016-03-06 - t/utf8_binary.t, t/utf_text.t: skip on non UTF-8 environment. - t/readline.t: skip the cursor move test for an active CPAN tester's environment 1.30 2016-03-02 - t/utf8_binary.t: add a fix to handle escape sequences which rl_initialize may output. 1.29 2016-02-28 - pop the stdio PerlIO layer only when utf8 layer is included for remote debugging. [rt.cpan.org #110121] - call utf8::decode() for a UTF8-enabled input filehandle. [rt.cpan.org #104239] - call newTTY() any time to set filehandles. - make use of 'our' instead of 'use vars'. - add tests for UTF-8 handling. - pass _rl_store_iostream 'FILE *' in stead of 'PerlIO *'. - remove T_STDIO definition from typemap. - requires Perl 5.8.1 1.28 2015-09-21 - Makefile.PL: revert a change on 1.27 which causes fail on the rlmalloc test. [rt.cpan.org #107201] - t/readline.t, t/history.t: use LC_ALL instead of LANG. |
||
wen
|
b1bea9df69 |
Update to 4.05
Upstream changes: Term::ANSIColor 4.05 (2016-03-20) Color aliases are now restricted to ASCII alphanumerics, due to the below change. Delay loading of the Carp module and avoid using [:upper:], \w, and \d in regular expressions to reduce the amount of memory this module consumes. (Normally, I wouldn't worry about this, but this module is very light-weight and can be useful even in highly space-constrained environments, and the impact is slight.) Thanks, Nicolas R. (#111552) Provide a mailto address in bug tracking metadata, use the shorter form of the RT bug tracker URL, and fix the license value to match the new metadata specification. Rework Makefile.PL so that the munging for older versions of ExtUtils::MakeMaker is less intrusive. Term::ANSIColor 4.04 (2015-12-06) Revert the build system back to ExtUtils::MakeMaker. This is the build system actually used in Perl core, so this removes a level of indirectly generated files and means that normal module development tests the same build system used by Perl. Update Makefile.PL with the additional metadata from the Module::Build build system. For versions of Perl prior to 5.11, install the module into the Perl core module directories, since in those versions site modules did not take precedence over Perl core modules. Rename NEWS to Changes to match the normal Perl convention. |
||
leot
|
3e3e75ac6b | Avoid to include "../../mk/fetch/github.mk" in package Makefile | ||
wiz
|
f4eda8eb66 |
Updated lldb to 3.8.1.
Mark as not ready for python-3.x. No special changelog found, but this matches llvm/clang 3.8.1. |
||
wen
|
ff02e6e3ab |
Update to 1.06
Upstream changes: 1.06 2015-10-24 NEILB - Added min perl version to code, so it will now appear in metadata - Added L<> links around the dependencies listed in the doc. RT#16456 - Fixed some failing tests reported from CPAN Testers 1.05_01 2015-10-22 NEILB - The test t/while_num.t was using subtests in a way that requires *I think* at least verson 0.99 of Test::More. This caused some CPAN Testers failures. Set min version on Test::More in just that test. - The github repo changed to reflect my changed github username 1.05_01 2015-10-20 NEILB - Reformatted as per CPAN::Changes::Spec, most recent release first. - Switched to Dist::Zilla - Added min perl version to code, so it will now appear in metadata - Added L<> links around the dependencies listed in the doc. RT#16456 |