|
Boost : |
Subject: Re: [boost] [modularization] Modularizing Boost (modularization)
From: Edward Diener (eldiener_at_[hidden])
Date: 2013-10-18 11:42:50
On 10/17/2013 6:24 PM, Stephen Kelly wrote:
>
> Hi there,
>
> my plan for modularizing and modernizing Boost was roughly this:
>
> * Phase 0 - remove dead weight by bumping compiler feature requirements
> * Phase 1 - move some files around so that the modularized repos form a
> mostly directed graph
> * Phase 2 - Form some kind of 'boost core library' or 'boost feature
> normalization library' from the guts of existing libraries like
> type_traits, static_assert, config mpl and utilities.
> * Phase 3 - Try to port the mpl to variadic templates so that the
> dependency on Boost.PP is not needed when variadic templates are available.
>
> I recommend completing up to phase 2 before migrating to git, as
> otherwise files will have to be deleted from one repo, and added to
> another without history.
>
> Phase 0 is aborted, so let's look at phase 1.
>
> [Note: This should go without saying, but my experience on this list
> tells me it needs to be said:
>
> * I do not propose making many commits with the commit message 'migrate'
> * The below is scripted for your understanding only. Scripting gives an
> exactness which prose does not, and allows reproducibility. Don't take
> it too literally.
> * Of course, forwarding headers should be understood to be left behind
> when a file is moved, where possible.
> * Don't cry too loudly about where I'm moving files to. See Phase 2
> above, and understand that this is partly only an experiment to see how
> modularization can be done.
>
> EndNote]
>
snip...
>
> Move parts of {vector_,}property_map into graph_parallel:
>
> sed '1,/BOOST_GRAPH_USE_MPI/d;/BOOST_GRAPH_USE_MPI/,$d'
> libs/property_map/include/boost/property_map/property_map.hpp > tmp.hpp
> sed -i '/BOOST_GRAPH_USE_MPI/,/BOOST_GRAPH_USE_MPI/d'
> libs/property_map/include/boost/property_map/property_map.hpp
> sed '1,/BOOST_GRAPH_USE_MPI/d;/BOOST_GRAPH_USE_MPI/,$d'
> libs/property_map/include/boost/property_map/vector_property_map.hpp >>
> tmp.hpp
> sed -i '/BOOST_GRAPH_USE_MPI/,/BOOST_GRAPH_USE_MPI/d'
> libs/property_map/include/boost/property_map/vector_property_map.hpp
> sed -i '/#undef PBGL_DISTRIB_PMAP/r tmp.hpp'
> libs/property_map/include/boost/property_map/parallel/distributed_property_map.hpp
> rm tmp.hpp
>
> git submodule foreach 'git grep -l -P
> boost/property_map/parallel/distributed_property_map.hpp --
> include/boost | xargs sed -i
> "s|boost/property_map/parallel/distributed_property_map.hpp|boost/graph/parallel/distributed_property_map.hpp|"
> || echo'
> git submodule foreach 'git grep -l -P
> boost/property_map/parallel/impl/distributed_property_map.ipp --
> include/boost | xargs sed -i
> "s|boost/property_map/parallel/impl/distributed_property_map.hpp|boost/graph/parallel/detail/distributed_property_map.hpp|"
> || echo'
> mv
> libs/property_map/include/boost/property_map/parallel/distributed_property_map.hpp
> libs/graph_parallel/include/boost/graph/parallel
> mv
> libs/property_map/include/boost/property_map/parallel/impl/distributed_property_map.ipp
> libs/graph_parallel/include/boost/graph/parallel/detail
> git submodule foreach 'git add . || echo'
> git submodule foreach 'git commit -am migrate || echo'
The property_map library can be used completely outside of the graph
library. What does moving parts of property_map into graph accomplish ?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk