Boost logo

Boost :

Subject: Re: [boost] [type_traits] Rewrite and dependency free version
From: Peter Dimov (lists_at_[hidden])
Date: 2015-02-02 13:48:45


Robert Ramey wrote:

> I think that there's a lot more too it than "splitting serialization".
>
> a) It's not at all clear what "splitting serialization" means. Making a
> two new DLLS for xml_archives in the same module? That wouldn't change the
> dependency graph which is driving this request. Making a boost level
> module just for the XML archives (which use spirit which is what creates
> the tendencies which are of concern there? or what? Either of these is a
> serious undertaking - in large part to support auto-linking and who knows
> what other surprises. Probably the bjam test suite would also have to be
> re-organized. And I don't know what all else. A huge amount of work with
> no gain in functionality.

None of the above.

If you heed my suggestion

>>> And in fact if you look through
>>>
>>> http://www.pdimov.com/tmp/report-develop-c3bb6eb/serialization.html#reverse-dependencies
>>>
>>> you'll see that many, if not most, of the serialization dependencies are
>>> like that.

you'll see that the only library that uses the compiled part of
Serialization and its archives is MPI, because it's the only library that
actually serializes things.

All the other libraries that depend on Serialization do that only to make
their types serializable. As such, they use no archives and no DLLs. They
use

<boost/serialization/nvp.hpp>
<boost/serialization/split_free.hpp>
<boost/serialization/extended_type_info.hpp>
<boost/serialization/serialization.hpp>
<boost/serialization/split_member.hpp>
<boost/serialization/version.hpp>
<boost/serialization/collections_load_imp.hpp>
<boost/serialization/collections_save_imp.hpp>
<boost/serialization/base_object.hpp>
<boost/serialization/is_bitwise_serializable.hpp>
<boost/archive/archive_exception.hpp>
<boost/serialization/access.hpp>
<boost/serialization/collection_size_type.hpp>
<boost/serialization/array.hpp>
<boost/serialization/map.hpp>
<boost/serialization/utility.hpp>
<boost/serialization/vector.hpp>
<boost/serialization/level.hpp>
<boost/serialization/list.hpp>
<boost/serialization/shared_ptr.hpp>

These headers (along with their dependencies), or some subset of them, can
be separated into a "serialization core" module.

Doing this right might still be a significant undertaking, of course. A
cursory look shows that map.hpp includes
boost/archive/detail/basic_iarchive.hpp, for instance.

On the other hand, it's possible to start with only the part that's
straightforward and advance incrementally towards the goal.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk