Boost logo

Boost Users :

Subject: [Boost-users] [serialization] class versioning changes in boost 1.42
From: David Raulo (david.raulo_at_[hidden])
Date: 2010-02-22 12:19:53


Hi,

It seems that the serialization library shipped with boost 1.42 changed
the way class versions are handled. The version_type which used to be
an unsigned int is now an uint_least16_t, although I found no mention
of that in the release notes.

The problem is that we are using a date-based versioning scheme for
our classes (for example a developer making a change in some class on
2010-02-22 would increment the class version to 20100222). This scheme
worked great for a couple of years, and helped us fix our backward
compatibility bugs after the fact.

Unfortunately, these big version numbers do not fit in 16-bit integers.
As a consequence, the version string output in xml archives with the
latest boost-serialization for this example would be 46206 instead of
20100222, breaking our reloading code.

May I ask why this change was made? Would it be possible to revert it
for the next boost release? If not, anyone has suggestions how we could
fix our code while maintaining backward compatibility ? (we have old
archives in the wild generated with various releases of our code, which
we need to be able to reload).

Thanks for any help,

David.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net