Ann: Version 1.2.1 of Protocol-Buffers for Haskell
Chris Kuklewicz
haskell at list.mightyreason.com
Wed Nov 26 15:42:16 EST 2008
This is to announce version 1.2.1 of my protocol-buffers,
protocol-buffers-descriptor, and hprotoc packages.
Note: Code generated by the previous versions of hprotoc will not work with this
new version of the library, and vice-versa.
These improve on the previous version 1.0.1 in a few ways:
* The Enum modules have a new "toMaybe'Enum :: Int -> Maybe TYPE" function
which allows for better error handling.
* The generated Enum instances have better error messages.
* The wireGet deserialization operation on Messages and Groups has better
error handling:
** Unrecognized enum value call throwError instead of calling error.
** Incoming strings are checked for valid utf8 encoding, or will call
throwError.
** For messages generated with "unknown" support, all field error are
caught and then the data is loaded into the unknown map (which might also fail,
which won't be caught).
* wireGet now uses explicitly generated "Set WireTag" instead of using
reflection. This is saner, and might even have helped performance.
* A bug inside an error reporting function in hprotoc was fixed (it caused a
hang due to lazy self-dependence when showing error information).
The main upside to these changes is to remove a the "error" call from 1.0.1's
used of toEnum and make the deserialization more robust and predictable.
In the future there will be support for the changes in google's upcoming version
2.0.3 of protoc (mainly custom EnumValue options).
Cheers,
Chris
More information about the Libraries
mailing list