llvm-format
was particular helpful to
make our coding style a little more consistent.
The complete NEWS file entry for this release follows:
CRANberries also provides a diff to the previous release 0.3.2. More information is at the RProtoBuf page which has a draft package vignette, a 'quick' overview vignette and a unit test summary vignette. Questions, comments etc should go to the rprotobuf mailing list off the RProtoBuf page at R-Forge.Changes in RProtoBuf version 0.4.0 (2014-01-14)
Changes to support CRAN builds for MS Windows.
Added functions
serialize_pb
,unserialize_pb
, andcan_serialize_pb
plus documentation from Jeroen Ooms RProtoBufUtils package.New dir
inst/python
with some Python examples.Added Jeroen Ooms as author.
Vignettes have been converted to the R 3.0.0 or later use of external vignette builders, no longer need a
Makefile
Added missing methods to dollar completion list for Message, Descriptor, EnumValueDescriptor, and FileDescriptor classes.
Add missing export for
.DollarNames
EnumValueDescriptor to allow completion on that class.Add more than 15 additional pages to the main Intro vignette documenting better all of the S4 classes implemented by RProtoBuf, updating the type mapping tables to take into account 64-bit support, and documenting advanced features such as Extensions.
Added better error checking in EnumDescriptors to catch the case when wrong types are provided.
Updated the FileDescriptor
name()
method to accept a boolean for full paths just like the genericname()
method.Correct a bug that incorrectly dispatched
as.character()
whenas.list()
was called on Descriptor objects.Update FileDescriptor
$
dispatch to work properly for the names of fields defined in the FileDescriptor, instead of just returningNULL
even for types returned by$
completion.Added a reservation for extension fields in the example tutorial.Person schema.
Support setting int32 fields with character representations and raise an R-level
stop()
error if the provided string can not be parsed as a 32-bit integer, rather than crashing the R instance.Update the project TODO file.
Add better documentation and tests for all of the above.
Corrected the handling of uint32 and fixed32 types in protocol buffers to ensure that they work with numbers as large as 2^32 - 1, which is larger than an integer can hold in R since R does not have an unsigned integer class. These values are stored as doubles internally now to avoid losing precision.
Added unit tests to verify behavior of RProtoBuf with extreme values for uint32 types.
Removed old exception handling code and instead rely on the more modern Rcpp::stop method maintained in Rcpp.
Add better error messages when setting a repeated field of messages to inform the user which element index was of the wrong type and what the expected type was.
Add an optional 'partial' argument to readASCII allowing uninitialized message fragments to be read in.
(internal) Added const qualifiers in more places throughout the C++ code for type safety.
(internal) Standardize coding conventions of the C++ files and run them through clang-format for consistency. A STYLE file has been submitted to R-Forge with details about the coding standards and how they are enforced with Emacs and clang-format.
Applied changes suggested by Kevin Ushey to the
S4
class handling to support both the currently released Rcpp as well as the currently pending next version.
This post by Dirk Eddelbuettel originated on his Thinking inside the box blog. Please report excessive re-aggregation in third-party for-profit settings.