Search code examples
c++boostversionarchiveboost-serialization

boost::serialization archive versions between v1.59 and v1.60


Is there a way in boost::serialization, to tell the Serialization/Archives to use a specific archive-version (as in https://github.com/boostorg/serialization/blob/boost-1.60.0/src/basic_archive.cpp)?

We ran into the trouble that the client is now built and delivered with Boost 1.60 while the Server is still 1.59. The client now sends an archive-version of 14 while the server only knows about 13. Therefore throwing an "unsupported version". To avoid the hassle of updating boost on the server: Can we tell the client to use the older archive version 13?

Looks like this only started to bite us when we switched from XML archives to PortableTextArchives (which only seem to be portable across platforms for the same boost version...).

Thanks in advance!


Solution

  • The only way to use v13 is to compile against and link to the version of boost that used that.

    So, there's only forward compatibility, not backward compatibility. In effect you'd always want to ensure the server version is ahead of any clients deployed at any given time.

    Portability is a different "axis" so to speak. The goal is subtly different, and therefore there is no real conflict with the lack of backwards compatible versioning.