On 09/04/2024 15:33, Boris Kolpackov via Boost wrote:
Andrey Semashev via Boost
writes: It doesn't make sense to have to build the whole Boost into a module only to pull a small part from it. I would much rather include the headers I want instead. I actually don't think having a single/only `boost` module would be the right way to modularize Boost. I would suggest having a module per library (at least; maybe even more granular, say for Spirit, which is actually three libraries in one). And a single `boost` module that re-exports them all. Users who want all of Boost, can import `boost`, those like you who want to carefully manage their dependencies can import more granular modules. And, at least in build2, we only build BMIs that are actually used (imported).
(This brings an interesting question: if I import `boost`, but only use a small subset of libraries, how do I know which ones I should be linking. Trial and error until there are no more unresolved symbols feels a bit stone age.)
Right, the currently experimental Boost.Regex module support has a hard dependency on ICU if the latter is installed on your system, irrespective of whether you're actually using that feature or not. Stone age indeed. I probably need to split it into 2 modules just because of that. But that leaves you scrabbling around trying to figure out which sources you need to link against and which not... and that's just for one Boost library! There's still a lot left to figure out here... John.