boost serialization archive compatibility

Hello group! We are upgrading boost from version 1.34.1 to 1.43.0. A quick test revealed that after the upgrade our binary archives cannot be loaded anymore. It seems like the type of the class id was changed from int to short making the old archive from 1.34.1 incompatible to our current application using 1.43.0. Is this a bug or expected behavior? How does boost serialization treat backwards compatibility? Will archives created by earlier versions of the library be still loadable? Do different archives behave differently in this regard? We do not really require backwards compatibility. I would just like to know what to expect. Thanks you. Markus Henschel Lead Programmer YAGER Development GmbH Pfuelstraße 5 10997 Berlin Germany www.yager.dehttp://www.yager-development.com/ Sitz der Gesellschaft: Berlin | Geschäftsführer: Timo Ullmann, Uwe Beneke Amtsgericht Berlin-Charlottenburg | HRB 78261 | USt-ID-Nr. DE 212404124

Markus Henschel wrote:
Hello group!
We are upgrading boost from version 1.34.1 to 1.43.0. A quick test revealed that after the upgrade our binary archives cannot be loaded anymore. It seems like the type of the class id was changed from int to short making the old archive from 1.34.1 incompatible to our current application using 1.43.0. Is this a bug or expected behavior?
This would be contrary to the intention of maintaining backward compatibility.
How does boost serialization treat backwards compatibility? Will archives created by earlier versions of the library be still loadable?
They are meant to be.
Do different archives behave differently in this regard?
The archive classes included with the library are meant all work exactly the same way.
We do not really require backwards compatibility. I would just like to know what to expect.
That's a relief!!! But I'm interested in finding more about this. I believe that as an unintended consequence of "fixing" all level 4 warnings I made this change in 1.43 and didn't foresee this issue. I'll look into it. Robert Ramey

Robert Ramey wrote:
Markus Henschel wrote:
Hello group!
We are upgrading boost from version 1.34.1 to 1.43.0. A quick test revealed that after the upgrade our binary archives cannot be loaded anymore. It seems like the type of the class id was changed from int to short making the old archive from 1.34.1 incompatible to our current application using 1.43.0. Is this a bug or expected behavior?
Looking at the history of basic_binary_iarchive. it seems that class_id has always been serialized as int_least16_t. Has this changed for the compiler/platform in question between 1.34 and 1.43. ? Robert Ramey

-----Ursprüngliche Nachricht----- Von: boost-users-bounces@lists.boost.org [mailto:boost-users- bounces@lists.boost.org] Im Auftrag von Robert Ramey Gesendet: Donnerstag, 24. Juni 2010 19:04 An: boost-users@lists.boost.org Betreff: Re: [Boost-users] boost serialization archive compatibility
Robert Ramey wrote:
Markus Henschel wrote:
Hello group!
We are upgrading boost from version 1.34.1 to 1.43.0. A quick test revealed that after the upgrade our binary archives cannot be loaded anymore. It seems like the type of the class id was changed from int to short making the old archive from 1.34.1 incompatible to our current application using 1.43.0. Is this a bug or expected behavior?
Looking at the history of basic_binary_iarchive. it seems that class_id has always been serialized as int_least16_t. Has this changed for the compiler/platform in question between 1.34 and 1.43. ?
Robert Ramey
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
Thanks for the quick reply. I was wrong abount the class_id. After reading your statement about all archives being backward compatible I digged deeper into the problem and discovered I accidently used a broken build of our app. Sorry for upsetting the apple cart. Boost serialization works fine :) Thanks for the clarification. Markus Henschel Lead Programmer YAGER Development GmbH www.yager.de
participants (2)
-
Markus Henschel
-
Robert Ramey