|
Boost : |
From: Boris Kolpackov (boris_at_[hidden])
Date: 2023-03-13 12:00:22
A quick note on our experience reducing dependency on Boost.Regex
(and thus ICU) in build2 packages for Boost 1.81.0. Now only the
following (leaf) libraries unconditionally depend on Boost.Regex:
* Boost.Convert
* Boost.DLL
* Boost.Log
While the following libraries now have an optional (direct or indirect)
dependency (follow the link for details on what functionality is now
optional and how to enable it):
* Boost.Algorithm[1]
* Boost.Asio[2]
* Boost.Graph[3]
* Boost.Iostreams[4]
* Boost.Range[5]
* Boost.Spirit[6]
To achieve this we had to make the following two changes:
1. Make functionality that requires regex optional. This change was made
in all the above-mentioned libraries. In all the cases except
Boost.Spirit and arguably Boost.Graph, the regex-based functionality
was fairly marginal and making it optional feels like a reasonable
trade off.
2. Split Boost.Spirit into three logical "components", all optional:
classic, v2, and x3. The rationale here is that only the classic
component can be reasonably easily made to work without regex. And
classic without regex is what's required by Boost.Serialization (we
had to deal with Boost.Serialization because it is a dependency of
the majority of Boost libraries).
We only had to patch Boost.Graph and are working[7] to upstream our
changes. Overall, while this required some effort, it's definitely
achievable given appropriate tools (mainly support for dependency
configuration in the package manager).
[1] https://github.com/build2-packaging/boost/blob/master/downstream/libs/algorithm/PACKAGE-README.md
[2] https://github.com/build2-packaging/boost/blob/master/downstream/libs/asio/PACKAGE-README.md
[3] https://github.com/build2-packaging/boost/blob/master/downstream/libs/graph/PACKAGE-README.md
[4] https://github.com/build2-packaging/boost/blob/master/downstream/libs/iostreams/PACKAGE-README.md
[5] https://github.com/build2-packaging/boost/blob/master/downstream/libs/range/PACKAGE-README.md
[6] https://github.com/build2-packaging/boost/blob/master/downstream/libs/spirit/PACKAGE-README.md
[7] https://github.com/boostorg/graph/issues/326
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk