|
Boost Users : |
Subject: Re: [Boost-users] [serialization] class versioning changes in boost 1.42
From: Peter Dimov (pdimov_at_[hidden])
Date: 2010-02-28 08:51:21
Jarl Lindrud wrote:
>> LOL - Microsoft 2003 cannot load files created by Microsoft
>> word 2007 unless they are specifically saved with that compatibility
>> in mind.
>
> Exactly, glad we've got that sorted. This kind of compatibility is of
> great utility, and there's nothing "logically impossible" about it.
It's not impossible, but it's pretty hard in general, and not easy to
automate. If you're using class-level (or instance-level) versioning, your
old archive has classes X1..Xn with versions v1..vn, and your new archive
has classes X1..Xm with versions v1'..vm'. First you need to keep track of
all these classes in your source code, and there well may be hundreds or
thousands, not all of them present in any one document. Then you need to
remember the version number for each that went into the old documents. Then,
on save time, you need to pass the library the whole (v1..vn) list, so that
it would be able to pass you vi when it calls your saver for Xi. Finally,
you have to deal with new classes that were added after the old app shipped.
Laborious.
If, on the other hand, you use a single archive-level version number, this
creates a central point that every class change needs to touch, and
distributed development becomes a nightmare.
Better versioning schemes may be possible, but nothing comes to mind.
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