-
Notifications
You must be signed in to change notification settings - Fork 37.7k
Utils and libraries: Drops the boost/algorithm/string/split.hpp dependency #13751
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
9e10b8f
to
51c2993
Compare
Hmm, this is just replacing a boost header with a self-written header that offers the same functionality and comes with unit tests. Do we really want to re-implement all of boost we are currently using? I mean straightforward replacing |
That's a fair point @MarcoFalke 👍 The goal was not to re-implement boost. This is an attempt to drop the I have eliminated boost where it was trivial to do: There are many ways to simplify this function: e.g. no support for both I didn't want to go there initially, because I didn't want to break things and ease review by providing something that is straightforward to validate. Right now it is easy to swap the That said, I don't have strong opinion on this. I am happy to make changes where needed; or close the pull request if this is not what you're looking for. I just hope I haven't messed up 😅 |
cd176ce
to
8199976
Compare
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsReviewers, this pull request conflicts with the following ones:
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. |
Concept ACK The short self-contained non-Boost version is easier to reason about. Every small step counts in our journey to get rid of our Boost dependencies! :-) |
@practicalswift Sure, but it has to go through review to verify that it supports everything that was supported by boost the way we used it. We are stuck with boost until we adopt C++17, since implementing |
@MarcoFalke Agreed – no rush in removing non-trivial Boost features. Let’s do it incrementally starting with the low hanging fruit :-) |
@MarcoFalke, apologies about this. I have totally misinterpreted the objective of the Boost migration. |
Sorry for being so pessimistic about it. You can definitely leave this open and see what other reviewers think. I was just saying that we have about 3 years time to finish up everything. |
Thanks @MarcoFalke! |
@251labs Text splitting should be in the low hanging fruit category I mentioned :-) |
Note there is a function with similar functionality in #13697, but operating on |
8199976
to
7d00b41
Compare
rebased 402da1c Travis build error is unrelated:
|
@251labs restarted. |
Thanks @promag! |
402da1c
to
6186091
Compare
Rebased 6186091 |
6186091
to
47a758b
Compare
rebased 47a758b |
47a758b
to
686b32c
Compare
686b32c
to
5730465
Compare
Rebased 5730465 |
5730465
to
af652d9
Compare
This commit drops the `boost/algorithm/string/split.hpp` dependency from the project. It replaces `boost::split` with a custom function `Split` that has an identical API and returns exactly the same results as `boost::split` to ease refactoring. In addition this commit refactors an instance of `boost::algorithm::trim_right` which was implicitly made available via the `boost/algorithm/string.hpp` dependency to prevent having to introduce a new dependency `boost/algorithm/string/trim.hpp`.
af652d9
to
7905ea0
Compare
Needs rebase |
Thanks for the work you've done here. However the project has decided that while it remains impossible to remove all of our Boost usage, we are no longer going to remove smaller components by rewriting them ourselves. |
Thanks @fanquake. Context FWIW: bitcoin-core-dev/2019-10-31.log
|
This pull request drops the
boost/algorithm/string/split.hpp
dependency from the project. It replacesboost::split
with a custom template functionSplit
that has a similar API and returns exactly the same results asboost::split
.In addition this pull request refactors an instance of
boost::algorithm::trim_right
, which was implicitly made available via theboost/algorithm/string.hpp
dependency to prevent having to introduce a new dependencyboost/algorithm/string/trim.hpp
.The
#include <boost/algorithm/string/predicate.hpp>
insrc/wallet/rpcdump.cpp
will be addressed in #13656 if that PR is merged after this one; or in this PR should #13656 be merged first.The test vectors in the accompanying unit test have been validated against
boost::split
.