[mosh-devel] does mosh have a version-specific dependency on Google Protobuf?
Luke Mewburn
lukem-mosh at mewburn.net
Sun May 17 20:43:15 EDT 2015
On Thu, May 14, 2015 at 07:50:25PM -0400, Alex Chernyakhovsky wrote:
| >From my reading of
| https://github.com/google/protobuf/blob/master/CHANGES.txt#L187, there
| are no wire-level differences. As long as mosh builds, it should
| stil=l be compatible across protobuf versions. I recently rebuilt
| Fedora's mosh to work against libprotobuf.so.9, which IIRC is 2.6.1,
| and I noticed no issues.
|
| The protobuf generated output source should be different, since protoc
| got new features.
This matches my experience with using protobuf in private projects.
We haven't noticed any on-wire interoperability changes.
As a developer (user of the protobuf compiler and library), we've
had to make some minor changes as protobuf has evolved:
1. Change our build to generate the .c & .h files each build,
using the protoc compiler for the protobuf library version we
were building against.
2. Adjust some checks in our test suite of our error handling because
the text of some exceptions changed slightly.
Here's an example from our test harness for encoding invalid UTF-8:
#if 2003000 >= GOOGLE_PROTOBUF_VERSION
assert(e.what() == string("Encountered string containing invalid UTF-8 data while serializing protocol buffer. Strings must contain only UTF-8; use the 'bytes' type for raw bytes."));
#elif 2005000 >= GOOGLE_PROTOBUF_VERSION
assert(e.what() == string("String field contains invalid UTF-8 data when serializing a protocol buffer. Use the 'bytes' type if you intend to send raw bytes."));
#elif 2006001 >= GOOGLE_PROTOBUF_VERSION
assert(e.what() == string("String field 'item2' contains invalid UTF-8 data when serializing a protocol buffer. Use the 'bytes' type if you intend to send raw bytes. "));
#else
#error "Unknown GOOGLE_PROTOBUF_VERSION"
#endif
I don't think that these apply to mosh - more an FYI.
cheers,
Luke.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
Url : http://mailman.mit.edu/pipermail/mosh-devel/attachments/20150517/193e2bf2/attachment.bin
More information about the mosh-devel
mailing list