
The current situation with date-time is the following:
user creates application which doesn't use serialization. Hence he doesn't
include boost/data-time/serialization.hpp. His program compiles, links and
runs. Clearly his program depends on boost/date-tiem but doesn't depend on
boost serialization. I don't think this is a disputable fact. The module
dependency tool may say that anything which depends upon date-time library
is dependent upon serialization - but that is not true. I don't think this
is disputable.
So in my view the module decency tool should take one or more program
sources as arguments and generate a list of modules which need to be
included in order to compile/link and run the all the programs. This would
tell a user exactly what he needs to know.
When I test the date-time library I would include all the test programs as
arguments and get one list of modules. Someone else might be only
interested in one application and get a shorter list of modules. This would
be useful to everyone.
There will and can never exist at tool which gives you the exact list of
required modules with specifying the applications to be built.
So we're going to settle for some approximation. That's OK. it's better
than nothing - but don't think that it's anything other than this. The
current approximation is that of tracking the header inclusions. This
includes more than a given application is likely to use so it's sort of
overkill - this shows up as union of all possible modules which some
application might need to build. It's not incorrect, just recognize that
it's a blunt instrument.
I can hear the cry - so what can we do so one doesn't have to download the
whole of boost? Here's a suggestion which may satisfy those.
Modest Proposal - Bridge module
We create a new module - named "bridge". In this module there is a
directory: boost/bridge/archive.hpp. This contains only forward
declarations:
class basic_iarchive;
class basic_oarchive;
and maybe some other miscellaneous stuff. This includes no headers from
boost/archive.
in date-time/serialization.hpp files in other libraries replace
#include