STEllAR-GROUP / hpx

The C++ Standard Library for Parallelism and Concurrency
https://hpx.stellar-group.org
Boost Software License 1.0
2.52k stars 429 forks source link

Explore feasibility of removing all dependencies on Boost #3440

Open biddisco opened 6 years ago

biddisco commented 6 years ago

A discussion at CSCS took place where the anti-boost argument went as follows

Q: The idea is that eventually the features in HPX will be available via the c++ standard? A: Ideally, yes most of the HPX features will be in c++ Q: Will the c++ standard have a dependency on boost then? A: Of course not. Q: Well then, you need to get rid of the boost dependency in HPX before it will be adopted by users X,Y,Z

Currently we make use of program options which could be replaced (given a lot of effort), by cxxopt or an alternative.

other boost libraries that we use are

It would seem on casual inspection that we rely on context/thread and others could be removed apart from spirit that is used in parsing thread binding options (yes? elsewhere?).

Are there other parts of our code that rely on boost that are not listed here? How much effort would it take to absorb context/thread into HPX? (and do it in such a way that we could still benefit from upstream fixes)

Does anyone feel strongly about this? (either in favour or against using boost).

Boost dependency tracker:

Accumulators

These can be made optional

(string) algorithms

These are genuinely useful, and don't have a good replacement. Are they small enough to copy over?

Removed in #4434

Serialization

These are leftovers and can be removed

ASIO thread pools (#5158)

The service pools can already be disabled at compile time.

Context switching

This one is optional (generic coroutines)

Exception

These are used in networking (made optional in #4365), needed only if the user enables ASIO_HAS_BOOST_THROW_EXCEPTION)

Filesystem

These need a compatibility layer. In progress: #4036.

Spirit/fusion/phoenix

Can be made optional by making performance counters and thread affinity optional. Needs to be replaced with an alternative in other places.

Iostreams

Used in iostreams and some components.

Iterator

Mostly used in tests and examples, also libfabric.

Queues

Deque is already copied, why not the others? (see #6098)

Log

Used in parcelports. Can be replaced with our logging.

Pool

Used in verbs parcelport.

Program options

Can be copied over (#4040).

Range

Mostly used in examples, some uses in the core library (#6095).

SIMD

To be deleted (#4028).

SmartPtr

Used in concurrency module.

System

Header only since 1.69. Do we want to completely get rid of it?

Miscellaneous

hkaiser commented 6 years ago

Current status:

You forgot to mention boost::asio in your list above, we depend on it for the TCP parcel-port, the system timer functionality, and for general kernel thread scheduling on the main thread.

Easy targets for removal are indeed boost::regex and boost::atomic. @K-ballo has been working on both but got stuck for various reasons. boost::filesystem could be added through a compatibility layer to keep supporting older platforms.

The elephant in the room (in terms of header only libraries) is boost::spirit which I don't even begin understanding how to remove without major effort. It however depends on a rather large list of other Boost libraries (fusion, phoenix, mpl, type traits, variant, to name a few). Spirit alone may prevent us from becoming fully independent from Boost.

Let me however add that I think the discussion cited above is inapproproate at best. For instance, what benefit would we have from replacing boost::program_options with some other external dependency? From my understanding, the main reason for people being against Boost is that they are not able/willing to read documentation and/or properly configure dependencies in general. How would yet another external dependency help? All of those arguments are mostly an attempt to find excuses not to have to learn something new...

K-ballo commented 6 years ago

These are the current boost #inclusion numbers in core HPX, ignoring compatibility:

COUNT | LINE
-----------------------------------------------------
  31 | boost/intrusive_ptr.hpp
  17 | boost/version.hpp
  14 | boost/system/error_code.hpp
  13 | boost/filesystem/path.hpp
  11 | boost/shared_array.hpp
  10 | boost/program_options/options_description.hpp
  10 | boost/ref.hpp
   9 | boost/program_options/variables_map.hpp
   8 | boost/asio/io_service.hpp
   8 | boost/asio/ip/tcp.hpp
   8 | boost/dynamic_bitset.hpp
   7 | boost/algorithm/string/classification.hpp
   7 | boost/algorithm/string/split.hpp
   7 | boost/asio/ip/host_name.hpp
   7 | boost/current_function.hpp
   7 | boost/io/ios_state.hpp
   7 | boost/lexical_cast.hpp
   7 | boost/regex.hpp
   7 | boost/smart_ptr/detail/spinlock.hpp
   7 | boost/tokenizer.hpp
   6 | boost/assign/std/vector.hpp
   6 | boost/config.hpp
   6 | boost/iostreams/device/file_descriptor.hpp
   6 | boost/program_options.hpp
   5 | boost/filesystem.hpp
   5 | boost/shared_ptr.hpp
   5 | boost/simd.hpp
   4 | boost/accumulators/statistics_fwd.hpp
   4 | boost/asio/basic_waitable_timer.hpp
   4 | boost/detail/endian.hpp
   4 | boost/exception/exception.hpp
   4 | boost/filesystem/convenience.hpp
   4 | boost/filesystem/operations.hpp
   4 | boost/spirit/include/qi_numeric.hpp
   4 | boost/spirit/include/qi_parse.hpp
   4 | boost/system/system_error.hpp
   3 | boost/accumulators/accumulators.hpp
   3 | boost/accumulators/framework/accumulator_base.hpp
   3 | boost/accumulators/framework/depends_on.hpp
   3 | boost/accumulators/framework/extractor.hpp
   3 | boost/accumulators/framework/parameters/sample.hpp
   3 | boost/accumulators/numeric/functional.hpp
   3 | boost/accumulators/statistics/count.hpp
   3 | boost/accumulators/statistics/max.hpp
   3 | boost/accumulators/statistics/mean.hpp
   3 | boost/accumulators/statistics/min.hpp
   3 | boost/accumulators/statistics/stats.hpp
   3 | boost/algorithm/string.hpp
   3 | boost/algorithm/string/case_conv.hpp
   3 | boost/intrusive/slist.hpp
   3 | boost/range/irange.hpp
   3 | boost/spirit/include/qi_char.hpp
   3 | boost/spirit/include/qi_operator.hpp
   3 | boost/spirit/include/qi_string.hpp
   3 | boost/spirit/include/qi.hpp
   3 | boost/utility/swap.hpp
   3 | boost/variant.hpp
   2 | boost/accumulators/statistics/median.hpp
   2 | boost/accumulators/statistics/rolling_variance.hpp
   2 | boost/accumulators/statistics/rolling_window.hpp
   2 | boost/accumulators/statistics/variance.hpp
   2 | boost/any.hpp
   2 | boost/array.hpp
   2 | boost/asio/buffer.hpp
   2 | boost/asio/error.hpp
   2 | boost/asio/placeholders.hpp
   2 | boost/asio/read.hpp
   2 | boost/asio/write.hpp
   2 | boost/bimap.hpp
   2 | boost/config/warning_disable.hpp
   2 | boost/cstdint.hpp
   2 | boost/detail/interlocked.hpp
   2 | boost/exception/diagnostic_information.hpp
   2 | boost/fusion/include/adapt_struct.hpp
   2 | boost/fusion/include/define_struct.hpp
   2 | boost/fusion/include/io.hpp
   2 | boost/generator_iterator.hpp
   2 | boost/integer.hpp
   2 | boost/iostreams/filter/zlib.hpp
   2 | boost/lockfree/queue.hpp
   2 | boost/operators.hpp
   2 | boost/program_options/parsers.hpp
   2 | boost/range/algorithm/for_each.hpp
   2 | boost/smart_ptr/scoped_ptr.hpp
   2 | boost/spirit/include/phoenix_core.hpp
   2 | boost/spirit/include/phoenix_object.hpp
   2 | boost/spirit/include/phoenix_operator.hpp
   2 | boost/spirit/include/qi_auxiliary.hpp
   2 | boost/spirit/include/qi_nonterminal.hpp
   2 | boost/spirit/include/qi_uint.hpp
   2 | boost/thread/tss.hpp
   2 | boost/utility/string_ref.hpp
   1 | boost/accumulators/statistics/moment.hpp
   1 | boost/accumulators/statistics/rolling_mean.hpp
   1 | boost/accumulators/statistics/sum.hpp
   1 | boost/algorithm/string/predicate.hpp
   1 | boost/algorithm/string/replace.hpp
   1 | boost/asio/detail/winsock_init.hpp
   1 | boost/asio/ip/address_v4.hpp
   1 | boost/asio/ip/address_v6.hpp
   1 | boost/asio/posix/stream_descriptor.hpp
   1 | boost/asio/windows/stream_handle.hpp
   1 | boost/assert.hpp
   1 | boost/atomic.hpp
   1 | boost/bind/arg.hpp
   1 | boost/container/small_vector.hpp
   1 | boost/context/all.hpp
   1 | boost/context/detail/fcontext.hpp
   1 | boost/detail/sp_typeinfo.hpp
   1 | boost/filesystem/exception.hpp
   1 | boost/functional/hash.hpp
   1 | boost/fusion/include/at.hpp
   1 | boost/fusion/include/pair.hpp
   1 | boost/fusion/include/std_pair.hpp
   1 | boost/iostreams/filter/bzip2.hpp
   1 | boost/iostreams/stream.hpp
   1 | boost/iterator/counting_iterator.hpp
   1 | boost/iterator/iterator_adaptor.hpp
   1 | boost/iterator/iterator_categories.hpp
   1 | boost/iterator/iterator_facade.hpp
   1 | boost/lockfree/detail/prefix.hpp
   1 | boost/lockfree/detail/tagged_ptr.hpp
   1 | boost/lockfree/policies.hpp
   1 | boost/multi_array.hpp
   1 | boost/parameter/keyword.hpp
   1 | boost/phoenix/bind.hpp
   1 | boost/phoenix/core.hpp
   1 | boost/range/adaptor/filtered.hpp
   1 | boost/range/algorithm/copy.hpp
   1 | boost/range/begin.hpp
   1 | boost/range/counting_range.hpp
   1 | boost/range/end.hpp
   1 | boost/range/numeric.hpp
   1 | boost/scoped_array.hpp
   1 | boost/scoped_ptr.hpp
   1 | boost/shmem/shmem_named_shared_object.hpp
   1 | boost/signals2.hpp
   1 | boost/simd/function/aligned_load.hpp
   1 | boost/simd/function/aligned_store.hpp
   1 | boost/simd/function/load.hpp
   1 | boost/simd/function/store.hpp
   1 | boost/simd/function/sum.hpp
   1 | boost/spirit/home/qi/auxiliary/lazy.hpp
   1 | boost/spirit/home/qi/detail/enable_lit.hpp
   1 | boost/spirit/home/qi/detail/string_parse.hpp
   1 | boost/spirit/home/qi/domain.hpp
   1 | boost/spirit/home/qi/meta_compiler.hpp
   1 | boost/spirit/home/qi/parser.hpp
   1 | boost/spirit/home/qi/skip_over.hpp
   1 | boost/spirit/home/support/char_class.hpp
   1 | boost/spirit/home/support/common_terminals.hpp
   1 | boost/spirit/home/support/detail/get_encoding.hpp
   1 | boost/spirit/home/support/handles_container.hpp
   1 | boost/spirit/home/support/info.hpp
   1 | boost/spirit/home/support/modify.hpp
   1 | boost/spirit/home/support/string_traits.hpp
   1 | boost/spirit/home/support/unused.hpp
   1 | boost/spirit/include/qi_alternative.hpp
   1 | boost/spirit/include/qi_directive.hpp
   1 | boost/spirit/include/qi_sequence.hpp
   1 | boost/swap.hpp
   1 | boost/type_traits/integral_constant.hpp
   1 | boost/type_traits/is_same.hpp
   1 | boost/type_traits/remove_reference.hpp
   1 | boost/type_traits/type_with_alignment.hpp
   1 | boost/utility.hpp
   1 | boost/utility/addressof.hpp
   1 | boost/utility/binary.hpp
biddisco commented 6 years ago

Let me however add that I think the discussion cited above is inapproproate at best. For instance, what benefit would we have from replacing boost::program_options with some other external dependency? From my understanding, the main reason for people being against Boost is that they are not able/willing to read documentation and/or properly configure dependencies in general. How would yet another external dependency help? All of those arguments are mostly an attempt to find excuses not to have to learn something new...

program_options was just an example. the idea was not to introduce a new external dependency, but to simply add an include file to hpx::util::cxxopts or something of that kind.

The problem is simply that we have a massive dependency on a set of libraries that are poorly maintained and we frequently have issues with breakages or inconsistencies between different versions of boost. Other people out there have the same problem and they have stopped using boost. They won't touch HPX as long as it depends on boost. I disagree with them and their reasoning. I wanted to get some feedback on just how hard it would be to remove boost.

Where is spirit used? I seem to recall it's in the parsing of thread bindings. Where else?

biddisco commented 6 years ago

@K-ballo Thanks for compiling that list of #include files. It's a worryingly long one.

hkaiser commented 6 years ago

program_options was just an example. the idea was not to introduce a new external dependency, but to simply add an include file to hpx::util::cxxopts or something of that kind.

If you're suggesting to add things to HPX so easily, why are you opposed to adding a simple thread-local allocator arguing about it being 'a shame to see the code base grow in this way'?

The problem is simply that we have a massive dependency on a set of libraries that are poorly maintained and we frequently have issues with breakages or inconsistencies between different versions of boost.

This is quite a mouthful and mostly intended to be spreading FUD. Spirit for instance is a very well supported library with unmatched performance and functionality anywhere else. Same is true for many other Boost libraries we work with (program_options, regex, and others to name a few).

Where is spirit used? I seem to recall it's in the parsing of thread bindings. Where else?

Spirit is used for parsing:

biddisco commented 6 years ago

If you're suggesting to add things to HPX so easily, why are you opposed to adding a simple thread-local allocator arguing about it being 'a shame to see the code base grow in this way'?

Your criticism is valid, however, I was willing to include a single header parser, but remove a dependency on a larger library. The thread allocator is one that you found on the web and is not a supported library with users reporting bugs and supplying fixes, which the suggested program options replacement is. My objection was mostly that this functionality might already be present in jemalloc and it'd be nice to know if we can make use of something we already use.

For performance counter names - does having a parser buy much more than a regex would give us?

hkaiser commented 6 years ago

For performance counter names - does having a parser buy much more than a regex would give us?

I don't think the performance counter names could be 'parsed' using a regex.

hkaiser commented 6 years ago

The thread allocator is one that you found on the web and is not a supported library

What I proposed as a PR is a major rewrite of an idea found on the web. It is not supported in the same way as the rest of HPX is not supported, however.

biddisco commented 6 years ago

@sithhell wrote on IRC

We should just submodule the boost libs we need and include them in our build system. Then it looks like we're free of boost...

And this is very much what I am hoping becomes possible with boost eventually. Do we have any idea of when the modularization work in boost is likely to make this feasible?

hkaiser commented 6 years ago

We should just submodule the boost libs we need and include them in our build system. Then it looks like we're free of boost...

And this is very much what I am hoping becomes possible with boost eventually.

@biddisco Git submodules are generally a PITA, in my experience.

Do we have any idea of when the modularization work in boost is likely to make this feasible?

vcpkg (https://github.com/Microsoft/vcpkg) relies on modularized Boost. I'm not sure how much effort they have put into making this happen.

biddisco commented 6 years ago

git submodules are a PITA but we currently use a slight variation for APEX with our cmake git_external/submodule script that hides some of the pain and that could be implemented for those parts of boost that we wanted to embed.

msimberg commented 5 years ago

I'd like to go ahead and remove the thread compatibility layer as there should be support for it everywhere (and it's off by default). Are there actually platforms where we know that this is still needed?

msimberg commented 5 years ago

I think we can all agree that this is not going to be straightforward. This is never going to happen if we have to find full replacements for all the boost functionality. It can happen with compatibility layers and making features optional. And while we can tell users "just install boost", I think HPX still becomes more approachable with an option of not depending on Boost. It's just one less thing to worry about.

  1. How about actually copying program_options into our repo. It ~hasn't had updates in a few years and~ (not quite true...) has only a few other boost dependencies that I think we can replace with our implementations (shared_ptr, any, function, iterator_facade). The question is if we still have to support e.g. hpx::init overloads with boost::program_options or if we can go directly to hpx::program_options.
  2. Boost.System is everywhere, but only because of the service pools. The service pools are already optional and we could make Boost.System optional if all of the service pools are disabled.
  3. Filesystem in a compatibility layer as @K-ballo already suggested.

These three are the only compulsory compiled libraries that we depend on. That still leaves the header-only dependencies.

  1. Boost.Spirit could be made optional by making the performance counters and the thread affinity syntax optional.
  2. Boost.Accumulator could be made optional (those counters would just not be available).
  3. The rest I think are mostly single-header utilities that we could move over to our repo, if we don't already have the replacement in place.

Remember that e.g. the logging functionality is already Boost functionality copied over and customized for our needs. I don't see how copying the other utilities that we need would be any different.

PS. I'm aware that this would add complexity to testing with a bunch of new optional features, but I think that's acceptable. Ideally many of these options would be batched up into bigger meta-options (HPX_WITH_BOOST=OFF).

@kshitij12345

hkaiser commented 5 years ago
  1. How about actually copying program_options into our repo. It ~hasn't had updates in a few years and~ (not quite true...) has only a few other boost dependencies that I think we can replace with our implementations (shared_ptr, any, function, iterator_facade). The question is if we still have to support e.g. hpx::init overloads with boost::program_options or if we can go directly to hpx::program_options.

I'd be fine with that. We'll have to add variant to the list of things to have in HPX, though. FWIW, we use Park's implementation of variant in Phylanx - this could be moved over (including serialization support, etc.).

  1. Boost.System is everywhere, but only because of the service pools. The service pools are already optional and we could make Boost.System optional if all of the service pools are disabled.

Disabling the timer-pools, while they are already optional (are they?), would disable all timed operations (sleep_until, etc.). But we might be able to rig up some alternative timer support.

  1. Filesystem in a compatibility layer as @K-ballo already suggested.

Yes, agreed.

These three are the only compulsory compiled libraries that we depend on. That still leaves the header-only dependencies.

  1. Boost.Spirit could be made optional by making the performance counters and the thread affinity syntax optional.

Additionally, the SLURM batch environment handling, some runtime parameter handling, and some examples depend on Spirit. Those uses are fairly simple and could be rewritten, however.

  1. Boost.Accumulator could be made optional (those counters would just not be available).

Ok. Fair enough.

  1. The rest I think are mostly single-header utilities that we could move over to our repo, if we don't already have the replacement in place.

In principle I'd agree. We would have to create a list of things to see how many additional support facilities this would entail.

msimberg commented 5 years ago

Disabling the timer-pools, while they are already optional (are they?), would disable all timed operations (sleep_until, etc.). But we might be able to rig up some alternative timer support.

HPX_WITH_TIMER_POOL etc. They're compulsory if you want timed operations but if you don't need them they can be disabled.

In principle I'd agree. We would have to create a list of things to see how many additional support facilities this would entail.

Indeed. I was going by @K-ballo's list and didn't see too many headers outside of the big libraries, but I'll put together a new list.

biddisco commented 5 years ago

Additionally, the SLURM batch environment handling, some runtime parameter handling, and some examples depend on Spirit. Those uses are fairly simple and could be rewritten, however.

Most of the stuff like slurm parsing, affinity argument handling etc is not 'critical' in the sense that if regexes were used, it's a one off cost that would not impact performance. True?

Does the performance counter syntax incur a runtime cost that is significantly improved by using boost spirit? This seems like the one place where it might make a noticable runtime impact. Is this correct and are there other places where it matters?

msimberg commented 5 years ago

A complete list of Boost dependencies with incomplete annotations: https://gist.github.com/msimberg/3a1b4273297ce931717262bcf094f011.

hkaiser commented 5 years ago

Does the performance counter syntax incur a runtime cost that is significantly improved by using boost spirit? This seems like the one place where it might make a noticable runtime impact. Is this correct and are there other places where it matters?

@biddisco I don't think replacing Spirit will incur a measurable runtime overhead. While I agree with using regexes (or manual parsing using string facilities) for the smaller usages of Spirit is feasible, I don't think its possible to replace the perf-counter name parser with some regexes. The syntax is fairly complex. Same is probably true for the affinity description.

However I'd be fine with optionally disabling those two things if somebody doesn't want to have Boost as a dependency. Performance counters and the affinity bindings are important but not mission critical.

msimberg commented 5 years ago

I added the list of boost headers to to main issue description where we can keep track of what to do and what has been done about the different dependencies. Please update as you see fit.

@kshitij12345 I pinged you to let you know that if you're still interested in this there would be some good starting points here. If you want to go easy first you could look at some of the headers from the miscellaneous section. If you want to start at the deep end you can have a look at spirit. If you're unsure about something please check with us first.

kshitij12345 commented 5 years ago

@msimberg Oh Thank You Very Much. Sorry have been a bit busy. Will start with it around October. Will check with you once before starting with it. Thank you again :)

tapaswenipathak commented 5 years ago

Hi folks: Can I PR or is the ticket for internal folks?

msimberg commented 5 years ago

@tapaswenipathak feel free to work on this. My comment above to @kshitij12345 applies to you as well. The miscellaneous section is a good place to start.

hkaiser commented 4 years ago

Taken from here: https://gist.github.com/K-ballo/7b551d71487bdf34d0b25aa034e399a5

COUNT    | LINE
-----------------------------------------------------
      11 | <boost/asio/io_service.hpp>
      11 | <boost/shared_array.hpp>
      10 | <boost/tokenizer.hpp>
       9 | <boost/asio/ip/tcp.hpp>
       9 | <boost/utility/string_ref.hpp>
       8 | <boost/system/error_code.hpp>
       8 | <boost/version.hpp>
       6 | <boost/dynamic_bitset.hpp>
       6 | <boost/iostreams/device/file_descriptor.hpp>
       5 | <boost/asio/ip/host_name.hpp>
       5 | <boost/smart_ptr/detail/spinlock.hpp>
       4 | <boost/accumulators/statistics_fwd.hpp>
       4 | <boost/config.hpp>
       4 | <boost/exception/exception.hpp>
       4 | <boost/predef/other/endian.h>
       4 | <boost/spirit/include/qi_numeric.hpp>
       4 | <boost/spirit/include/qi_parse.hpp>
       4 | <boost/system/system_error.hpp>
       3 | <boost/accumulators/accumulators.hpp>
       3 | <boost/accumulators/framework/accumulator_base.hpp>
       3 | <boost/accumulators/framework/depends_on.hpp>
       3 | <boost/accumulators/framework/extractor.hpp>
       3 | <boost/accumulators/framework/parameters/sample.hpp>
       3 | <boost/accumulators/numeric/functional.hpp>
       3 | <boost/accumulators/statistics/max.hpp>
       3 | <boost/accumulators/statistics/min.hpp>
       3 | <boost/lockfree/queue.hpp>
       3 | <boost/range/irange.hpp>
       3 | <boost/spirit/include/qi_char.hpp>
       3 | <boost/spirit/include/qi_operator.hpp>
       3 | <boost/spirit/include/qi_string.hpp>
       2 | <boost/accumulators/statistics/count.hpp>
       2 | <boost/accumulators/statistics/mean.hpp>
       2 | <boost/accumulators/statistics/median.hpp>
       2 | <boost/accumulators/statistics/rolling_variance.hpp>
       2 | <boost/accumulators/statistics/rolling_window.hpp>
       2 | <boost/accumulators/statistics/stats.hpp>
       2 | <boost/accumulators/statistics/variance.hpp>
       2 | <boost/asio/basic_waitable_timer.hpp>
       2 | <boost/asio/buffer.hpp>
       2 | <boost/asio/error.hpp>
       2 | <boost/asio/placeholders.hpp>
       2 | <boost/asio/read.hpp>
       2 | <boost/asio/write.hpp>
       2 | <boost/exception/diagnostic_information.hpp>
       2 | <boost/fusion/include/adapt_struct.hpp>
       2 | <boost/intrusive/slist.hpp>
       2 | <boost/program_options/detail/cmdline.hpp>
       2 | <boost/program_options/options_description.hpp>
       2 | <boost/program_options/parsers.hpp>
       2 | <boost/program_options/value_semantic.hpp>
       2 | <boost/range/algorithm/for_each.hpp>
       2 | <boost/shared_ptr.hpp>
       2 | <boost/spirit/include/qi_auxiliary.hpp>
       2 | <boost/spirit/include/qi_nonterminal.hpp>
       2 | <boost/spirit/include/qi.hpp>
       2 | <boost/variant.hpp>
       1 | <boost/accumulators/statistics/rolling_mean.hpp>
       1 | <boost/any.hpp>
       1 | <boost/array.hpp>
       1 | <boost/asio/detail/winsock_init.hpp>
       1 | <boost/asio/ip/address_v4.hpp>
       1 | <boost/asio/ip/address_v6.hpp>
       1 | <boost/asio/posix/stream_descriptor.hpp>
       1 | <boost/asio/windows/stream_handle.hpp>
       1 | <boost/bimap.hpp>
       1 | <boost/bind/arg.hpp>
       1 | <boost/config/warning_disable.hpp>
       1 | <boost/container/small_vector.hpp>
       1 | <boost/context/detail/fcontext.hpp>
       1 | <boost/filesystem.hpp>
       1 | <boost/functional/hash.hpp>
       1 | <boost/fusion/include/at.hpp>
       1 | <boost/fusion/include/define_struct.hpp>
       1 | <boost/fusion/include/io.hpp>
       1 | <boost/fusion/include/pair.hpp>
       1 | <boost/fusion/include/std_pair.hpp>
       1 | <boost/intrusive_ptr.hpp>
       1 | <boost/iostreams/stream.hpp>
       1 | <boost/iterator/iterator_categories.hpp>
       1 | <boost/lockfree/detail/prefix.hpp>
       1 | <boost/lockfree/detail/tagged_ptr.hpp>
       1 | <boost/lockfree/policies.hpp>
       1 | <boost/multi_array.hpp>
       1 | <boost/optional.hpp>
       1 | <boost/parameter/keyword.hpp>
       1 | <boost/phoenix/bind.hpp>
       1 | <boost/phoenix/core.hpp>
       1 | <boost/program_options/cmdline.hpp>
       1 | <boost/program_options/config.hpp>
       1 | <boost/program_options/detail/config_file.hpp>
       1 | <boost/program_options/detail/convert.hpp>
       1 | <boost/program_options/detail/parsers.hpp>
       1 | <boost/program_options/detail/utf8_codecvt_facet.hpp>
       1 | <boost/program_options/detail/value_semantic.hpp>
       1 | <boost/program_options/environment_iterator.hpp>
       1 | <boost/program_options/eof_iterator.hpp>
       1 | <boost/program_options/errors.hpp>
       1 | <boost/program_options/option.hpp>
       1 | <boost/program_options/positional_options.hpp>
       1 | <boost/program_options/variables_map.hpp>
       1 | <boost/program_options/version.hpp>
       1 | <boost/range/adaptor/filtered.hpp>
       1 | <boost/range/algorithm/copy.hpp>
       1 | <boost/range/begin.hpp>
       1 | <boost/range/counting_range.hpp>
       1 | <boost/range/end.hpp>
       1 | <boost/range/numeric.hpp>
       1 | <boost/spirit/home/qi/auxiliary/lazy.hpp>
       1 | <boost/spirit/home/qi/detail/enable_lit.hpp>
       1 | <boost/spirit/home/qi/detail/string_parse.hpp>
       1 | <boost/spirit/home/qi/domain.hpp>
       1 | <boost/spirit/home/qi/meta_compiler.hpp>
       1 | <boost/spirit/home/qi/parser.hpp>
       1 | <boost/spirit/home/qi/skip_over.hpp>
       1 | <boost/spirit/home/support/char_class.hpp>
       1 | <boost/spirit/home/support/common_terminals.hpp>
       1 | <boost/spirit/home/support/detail/get_encoding.hpp>
       1 | <boost/spirit/home/support/handles_container.hpp>
       1 | <boost/spirit/home/support/info.hpp>
       1 | <boost/spirit/home/support/modify.hpp>
       1 | <boost/spirit/home/support/string_traits.hpp>
       1 | <boost/spirit/home/support/unused.hpp>
       1 | <boost/spirit/include/phoenix_core.hpp>
       1 | <boost/spirit/include/phoenix_object.hpp>
       1 | <boost/spirit/include/phoenix_operator.hpp>
       1 | <boost/spirit/include/qi_alternative.hpp>
       1 | <boost/spirit/include/qi_directive.hpp>
       1 | <boost/spirit/include/qi_sequence.hpp>
       1 | <boost/spirit/include/qi_uint.hpp>
-----------------------------------------------------
     280 | TOTAL LINES
hkaiser commented 1 year ago

Here is an updated list:

#include <boost/accumulators/accumulators.hpp>
#include <boost/accumulators/framework/accumulator_base.hpp>
#include <boost/accumulators/framework/depends_on.hpp>
#include <boost/accumulators/framework/extractor.hpp>
#include <boost/accumulators/framework/parameters/sample.hpp>
#include <boost/accumulators/numeric/functional.hpp>
#include <boost/accumulators/statistics/count.hpp>
#include <boost/accumulators/statistics/max.hpp>
#include <boost/accumulators/statistics/mean.hpp>
#include <boost/accumulators/statistics/median.hpp>
#include <boost/accumulators/statistics/min.hpp>
#include <boost/accumulators/statistics/rolling_mean.hpp>
#include <boost/accumulators/statistics/rolling_variance.hpp>
#include <boost/accumulators/statistics/rolling_window.hpp>
#include <boost/accumulators/statistics/stats.hpp>
#include <boost/accumulators/statistics/variance.hpp>
#include <boost/accumulators/statistics_fwd.hpp>
#include <boost/archive/iterators/base64_from_binary.hpp>
#include <boost/archive/iterators/binary_from_base64.hpp>
#include <boost/archive/iterators/transform_width.hpp>
#include <boost/array.hpp>
#include <boost/bind/arg.hpp>
#include <boost/config.hpp>
#include <boost/context/detail/fcontext.hpp>
#include <boost/crc.hpp>
#include <boost/exception/diagnostic_information.hpp>
#include <boost/exception/exception.hpp>
#include <boost/filesystem.hpp>
#include <boost/functional/hash.hpp>
#include <boost/fusion/include/adapt_struct.hpp>
#include <boost/fusion/include/define_struct.hpp>
#include <boost/fusion/include/io.hpp>
#include <boost/fusion/include/std_pair.hpp>
#include <boost/fusion/include/vector.hpp>
#include <boost/integer/common_factor.hpp>
#include <boost/intrusive_ptr.hpp>
#include <boost/iostreams/device/file_descriptor.hpp>
#include <boost/iostreams/filter/bzip2.hpp>
#include <boost/iostreams/filter/zlib.hpp>
#include <boost/iostreams/stream.hpp>
#include <boost/iterator/iterator_categories.hpp>
#include <boost/log/expressions.hpp>
#include <boost/log/expressions/formatter.hpp>
#include <boost/log/expressions/formatters.hpp>
#include <boost/log/expressions/formatters/stream.hpp>
#include <boost/log/sources/record_ostream.hpp>
#include <boost/log/sources/severity_logger.hpp>
#include <boost/log/trivial.hpp>
#include <boost/log/utility/formatting_ostream.hpp>
#include <boost/log/utility/manipulators/to_log.hpp>
#include <boost/log/utility/setup/common_attributes.hpp>
#include <boost/log/utility/setup/console.hpp>
#include <boost/multi_array.hpp>
#include <boost/next_prior.hpp>
#include <boost/optional.hpp>
#include <boost/parameter/keyword.hpp>
#include <boost/phoenix.hpp>
#include <boost/preprocessor.hpp>
#include <boost/regex.hpp>
#include <boost/shared_array.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/spirit/home/support/iterators/istream_iterator.hpp>
#include <boost/spirit/home/x3/auxiliary.hpp>
#include <boost/spirit/home/x3/auxiliary.hpp>
#include <boost/spirit/home/x3/char.hpp>
#include <boost/spirit/home/x3/core.hpp>
#include <boost/spirit/home/x3/core/parser.hpp>
#include <boost/spirit/home/x3/core/skip_over.hpp>
#include <boost/spirit/home/x3/directive.hpp>
#include <boost/spirit/home/x3/nonterminal.hpp>
#include <boost/spirit/home/x3/numeric.hpp>
#include <boost/spirit/home/x3/operator.hpp>
#include <boost/spirit/home/x3/string.hpp>
#include <boost/spirit/home/x3/support/traits/move_to.hpp>
#include <boost/spirit/home/x3/support/unused.hpp>
#include <boost/spirit/include/phoenix_core.hpp>
#include <boost/spirit/include/phoenix_object.hpp>
#include <boost/spirit/include/phoenix_operator.hpp>
#include <boost/spirit/include/qi.hpp>
#include <boost/spirit/include/qi_action.hpp>
#include <boost/spirit/include/qi_auxiliary.hpp>
#include <boost/spirit/include/qi_char.hpp>
#include <boost/spirit/include/qi_numeric.hpp>
#include <boost/spirit/include/qi_operator.hpp>
#include <boost/spirit/include/qi_parse.hpp>
#include <boost/spirit/include/qi_string.hpp>
#include <boost/spirit/include/qi_uint.hpp>
#include <boost/spirit/include/support_istream_iterator.hpp>
#include <boost/system/error_code.hpp>
#include <boost/version.hpp>
Pansysk75 commented 3 months ago

Here is an updated list:

#include <boost/accumulators/accumulators.hpp>
#include <boost/accumulators/framework/accumulator_base.hpp>
...

Related to #5728, removing Boost from headers in the public HPX API, would allow dependent applications to not depend on the Boost headers.

Currently, the HPX CMake targets have a PUBLIC dependency on the Boost CMake targets, thus the dependency is propagated. Changing that to PRIVATE would prevent the dependency from being forwarded to applications. That would make using FetchContent easier, as the Boost targets will not have to be installed (which is currently one thing preventing us from using FetchContent properly)

See output of: `grep -r "#include <boost" . --exclude=*.cpp` ``` ./libs/core/serialization/include/hpx/serialization/serialize_buffer.hpp:#include ./libs/core/serialization/include/hpx/serialization/boost_array.hpp:#include ./libs/core/serialization/include/hpx/serialization/boost_shared_ptr.hpp:#include ./libs/core/serialization/include/hpx/serialization/boost_multi_array.hpp:#include ./libs/core/serialization/include/hpx/serialization/boost_intrusive_ptr.hpp:#include ./libs/core/serialization/include/hpx/serialization/boost_variant.hpp:#include ./libs/core/algorithms/include/hpx/parallel/algorithms/for_loop_reduction.hpp:#include ./libs/core/algorithms/include/hpx/parallel/algorithms/partition.hpp:#include ./libs/core/algorithms/include/hpx/parallel/algorithms/remove.hpp:#include ./libs/core/algorithms/include/hpx/parallel/algorithms/copy.hpp:#include ./libs/core/algorithms/include/hpx/parallel/algorithms/detail/set_operation.hpp:#include ./libs/core/algorithms/include/hpx/parallel/algorithms/unique.hpp:#include ./libs/core/config/cmake/templates/config_version.hpp.in:#include ./libs/core/config/include/hpx/config/detail/compat_error_code.hpp:#include ./libs/core/config/include/hpx/config.hpp:#include ./libs/core/filesystem/include/hpx/modules/filesystem.hpp:#include ./libs/core/plugin/include/hpx/plugin/config.hpp:#include ./libs/core/affinity/include/hpx/affinity/detail/partlit.hpp:#include ./libs/core/affinity/include/hpx/affinity/detail/partlit.hpp:#include ./libs/core/affinity/include/hpx/affinity/detail/partlit.hpp:#include ./libs/core/affinity/include/hpx/affinity/detail/partlit.hpp:#include ./libs/core/affinity/include/hpx/affinity/detail/parse_mappings.hpp:#include ./libs/core/coroutines/include/hpx/coroutines/detail/context_generic_context.hpp:#include ./libs/core/coroutines/include/hpx/coroutines/detail/context_impl.hpp:#include ./libs/core/iterator_support/include/hpx/iterator_support/boost_iterator_categories.hpp:#include ./libs/core/functional/include/hpx/functional/traits/is_placeholder.hpp:#include ./libs/core/program_options/include/hpx/program_options/detail/utf8_codecvt_facet.hpp:// #include ./libs/full/parcelport_libfabric/include/hpx/parcelport_libfabric/parcelport_logging.hpp:#include ./libs/full/parcelport_libfabric/include/hpx/parcelport_libfabric/parcelport_logging.hpp:#include ./libs/full/parcelport_libfabric/include/hpx/parcelport_libfabric/parcelport_logging.hpp:#include ./libs/full/parcelport_libfabric/include/hpx/parcelport_libfabric/parcelport_logging.hpp:#include ./libs/full/parcelport_libfabric/include/hpx/parcelport_libfabric/parcelport_logging.hpp:#include ./libs/full/parcelport_libfabric/include/hpx/parcelport_libfabric/parcelport_logging.hpp:#include ./libs/full/parcelport_libfabric/include/hpx/parcelport_libfabric/parcelport_logging.hpp:#include ./libs/full/parcelport_libfabric/include/hpx/parcelport_libfabric/parcelport_logging.hpp:#include ./libs/full/parcelport_libfabric/include/hpx/parcelport_libfabric/parcelport_logging.hpp:#include ./libs/full/parcelport_libfabric/include/hpx/parcelport_libfabric/parcelport_logging.hpp:#include ./libs/full/parcelport_libfabric/include/hpx/parcelport_libfabric/parcelport_logging.hpp:#include ./libs/full/parcelport_libfabric/include/hpx/parcelport_libfabric/parcelport_logging.hpp:#include ./libs/full/parcelport_libfabric/include/hpx/parcelport_libfabric/parcelport_logging.hpp:#include ./libs/full/parcelport_libfabric/include/hpx/parcelport_libfabric/libfabric_controller.hpp:#include ./libs/full/parcelport_libfabric/include/hpx/parcelport_libfabric/libfabric_controller.hpp:#include ./libs/full/parcelport_libfabric/include/hpx/parcelport_libfabric/libfabric_controller.hpp:#include ./libs/full/parcelset/include/hpx/parcelset/decode_parcels.hpp:#include ./libs/full/parcelset/include/hpx/parcelset/encode_parcels.hpp:#include ./libs/full/statistics/include/hpx/statistics/histogram.hpp:#include ./libs/full/statistics/include/hpx/statistics/histogram.hpp:#include ./libs/full/statistics/include/hpx/statistics/histogram.hpp:#include ./libs/full/statistics/include/hpx/statistics/histogram.hpp:#include ./libs/full/statistics/include/hpx/statistics/histogram.hpp:#include ./libs/full/statistics/include/hpx/statistics/histogram.hpp:#include ./libs/full/statistics/include/hpx/statistics/histogram.hpp:#include ./libs/full/statistics/include/hpx/statistics/histogram.hpp:#include ./libs/full/statistics/include/hpx/statistics/histogram.hpp:#include ./libs/full/statistics/include/hpx/statistics/histogram.hpp:#include ./libs/full/statistics/include/hpx/statistics/rolling_max.hpp:#include ./libs/full/statistics/include/hpx/statistics/rolling_max.hpp:#include ./libs/full/statistics/include/hpx/statistics/rolling_max.hpp:#include ./libs/full/statistics/include/hpx/statistics/rolling_max.hpp:#include ./libs/full/statistics/include/hpx/statistics/rolling_max.hpp:#include ./libs/full/statistics/include/hpx/statistics/rolling_max.hpp:#include ./libs/full/statistics/include/hpx/statistics/rolling_max.hpp:#include ./libs/full/statistics/include/hpx/statistics/rolling_min.hpp:#include ./libs/full/statistics/include/hpx/statistics/rolling_min.hpp:#include ./libs/full/statistics/include/hpx/statistics/rolling_min.hpp:#include ./libs/full/statistics/include/hpx/statistics/rolling_min.hpp:#include ./libs/full/statistics/include/hpx/statistics/rolling_min.hpp:#include ./libs/full/statistics/include/hpx/statistics/rolling_min.hpp:#include ./libs/full/statistics/include/hpx/statistics/rolling_min.hpp:#include ./components/parcel_plugins/binary_filter/bzip2/include/hpx/binary_filter/bzip2_serialization_filter.hpp:#include ./components/parcel_plugins/binary_filter/zlib/include/hpx/binary_filter/zlib_serialization_filter.hpp:#include ./components/iostreams/include/hpx/components/iostreams/ostream.hpp:#include ./components/process/include/hpx/components/process/util/posix/initializers/bind_stderr.hpp:#include ./components/process/include/hpx/components/process/util/posix/initializers/set_cmd_line.hpp:#include ./components/process/include/hpx/components/process/util/posix/initializers/bind_stdout.hpp:#include ./components/process/include/hpx/components/process/util/posix/initializers/bind_stdin.hpp:#include ./components/process/include/hpx/components/process/util/windows/initializers/bind_stdin.hpp:#include ./components/process/include/hpx/components/process/util/windows/initializers/bind_stderr.hpp:#include ./components/process/include/hpx/components/process/util/windows/initializers/bind_stdout.hpp:#include ```