refactor: Get rid of `boost/algorithm/string.hpp` #24787

pull hebasto wants to merge 1 commits into bitcoin:master from hebasto:220204-boost changing 8 files +14 −8
  1. hebasto commented at 3:28 PM on April 6, 2022: member

    This PR replaces the boost/algorithm/string.hpp header with more granular ones which are already used in the codebase.

    Such granulation, for example, guarantees that the boost/algorithm/string/trim.hpp header is not included indirectly, which in turn allows to remove boost::algorithm::trim* calls from the test/lint/lint-locale-dependence.sh linter.

  2. refactor: Get rid of `boost/algorithm/string.hpp`
    This change replaces the `boost/algorithm/string.hpp` header with more
    granular ones which are already used in the codebase.
    af0f9011c3
  3. fanquake commented at 3:30 PM on April 6, 2022: member

    Probably better to review #22953 instead of massaging these headers further?

  4. hebasto commented at 3:36 PM on April 6, 2022: member

    Probably better to review #22953 instead of massaging these headers further?

    Actually, it was one I started from. But, unfortunately, #22953 keeps test/lint/lint-includes.sh unpruned.

  5. fanquake commented at 4:15 PM on April 6, 2022: member

    But, unfortunately, #22953 keeps test/lint/lint-includes.sh unpruned.

    I don't think that matters. I'm saying there's not much advantage in having this PR turn (for example):

    // src/wallet/rpc/backup.cpp
    #include <boost/algorithm/string.hpp>
    

    into

    // src/wallet/rpc/backup.cpp
    #include <boost/algorithm/string/classification.hpp>
    #include <boost/algorithm/string/split.hpp>
    

    just for the sake of pruning lint-includes.sh, if #22953 will just remove

    // src/wallet/rpc/backup.cpp
    #include <boost/algorithm/string.hpp>
    

    entirely.

  6. DrahtBot added the label Refactoring on Apr 6, 2022
  7. DrahtBot added the label RPC/REST/ZMQ on Apr 6, 2022
  8. DrahtBot added the label Utils/log/libs on Apr 6, 2022
  9. DrahtBot added the label Wallet on Apr 6, 2022
  10. PastaPastaPasta approved
  11. PastaPastaPasta commented at 10:13 PM on April 6, 2022: contributor

    utACK. This PR makes sense to me. I understand the requests to replace boost string altogether with custom code, and I'd like that to happen at some point. But this is a seemingly trivial merge, if it builds, it's good, and it removes some boost includes. Seems like a win to me.

  12. DrahtBot commented at 12:52 AM on April 10, 2022: member

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #24742 ([POC] build: prune Boost headers in depends by fanquake)
    • #22953 (refactor: introduce single-separator split helper (boost::split replacement) by theStack)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

  13. fanquake removed the label Wallet on Apr 10, 2022
  14. fanquake removed the label RPC/REST/ZMQ on Apr 10, 2022
  15. fanquake removed the label Utils/log/libs on Apr 10, 2022
  16. fanquake commented at 7:53 AM on April 14, 2022: member

    I'm going to close this in favour of #22953 and/or #24831.

  17. fanquake closed this on Apr 14, 2022

  18. DrahtBot locked this on Apr 14, 2023

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-22 06:14 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me