Subject: [boost] [bcp] Enhancements to bcp extract and namespace rename
From: Cliff Green (cliffg_at_[hidden])
Date: 2010-08-04 15:12:34
John, as promised, here's a couple of enhancement requests to bcp, relative to namespace renaming. I know time can be (very) limited, so I'll help in any way I can, or maybe we can see if someone is looking for a relatively small contribution they can make to Boost, in a useful utility. I can file trac tickets, if you'd like (I haven't before, so will need to look at the process).
First, a statement of project needs (and I would expect others have similar needs):
--- My workgroup provides software libraries (using Boost) to another group (this is within a large aerospace company in the Seattle area) that also uses Boost. Unfortunately the Boost versions can be (and typically are) different. Both sets of software (libraries) are compiled into the same executable.
The namespace rename feature of bcp allows multiple versions of Boost to co-exist in the same executable. The one restriction is that for a given translation unit (.cpp file), the same version of Boost must be used. (I know Artyom, I believe, also has a tool that allows multiple versions of Boost even in the same translation unit, but this is not something we need, and I would guess is a corner case for most developers.)
-- I couldn't find a way to "wildcard" extract and rename all Boost libraries. I ended up performing the extract / rename one-by-one. I suppose I could generate a list of the libraries and compose an invocation of bcp with all libraries explicitly listed (assuming command line buffers won't be exhausted), or write a script to do this, but it seems that it wouldn't be hard for bcp to do it inside the code.
-- Related to above, when extracting (and renaming) one-by-one, the same dependent libraries are copied out (and overwritten) over and over. With a "wildcard" (or "full list of libraries") I assume that shared dependent libraries would only be copied once.
-- Related to above, if there's a "full copy, rename namespace for all libraries" facility, managing multiple shared dependent libraries becomes a moot point, since all libraries will be copied (dependent or not). And related to this is copying the few remaining non-source files that make up a release.
So it comes down to using bcp not to extract a subset of dependent libraries, but instead to perform a full copy of a release, renaming namespaces in source code as appropriate.
What do you think?
Again, thanks for the quick and excellent help,
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk