-
Notifications
You must be signed in to change notification settings - Fork 351
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
Boost Libs (work in progress) #1577
base: main
Are you sure you want to change the base?
Conversation
Initial copy across from previous workings to test with entire central registry. Currently working on adding boost tests for every module
….assert//:assert". Changes were in boost.rules.tools but needed extra changes here
… main targets, as it wasn't included and causes build failures for boost as boost libraries aren't expecting to prefix the headers with "lib/"
…sing pre-release version
Fixed boost.rules.tools & boost.ublas source repositories metadata
…n the boost module. This allows us to prevent mix and matching boost versions across modules
Added xz Deleted bazel_test folders and tests from rules_boost - not needed as we are using native boost tests Added build files to all test folders Updated presubmit.yml to run tests
…t building due to unrelated modules in error
Pivoted test system to auto-find all tests and assume they are a positive test unless in negative_test_names section. Reduces the need for a ton of lines specifying test files
Hello @bazelbuild/bcr-maintainers, modules without existing maintainers (boost.accumulators, boost.algorithm, boost.align, boost.any, boost.array, boost.asio, boost.assert, boost.assign, boost.atomic, boost.beast, boost.bimap, boost.bind, boost.callable_traits, boost.chrono, boost.circular_buffer, boost.compatibility, boost.compute, boost.concept_check, boost.config, boost.container, boost.container_hash, boost.context, boost.contract, boost.conversion, boost.convert, boost.core, boost.coroutine, boost.coroutine2, boost.crc, boost.date_time, boost.describe, boost.detail, boost.dll, boost.dynamic_bitset, boost.endian, boost.exception, boost.fiber, boost.filesystem, boost.flyweight, boost.foreach, boost.format, boost.function, boost.function_types, boost.functional, boost.fusion, boost.geometry, boost.gil, boost.graph.parallel, boost.graph, boost.hana, boost.heap, boost.histogram, boost.hof, boost.icl, boost.integer, boost.interprocess, boost.intrusive, boost.io, boost.iostreams, boost.iterator, boost.json, boost.lambda, boost.lambda2, boost.leaf, boost.lexical_cast, boost.local_function, boost.locale, boost.lockfree, boost.log, boost.logic, boost.math, boost.metaparse, boost.move, boost.mp11, boost.mpi, boost.mpl, boost.msm, boost.multi_array, boost.multi_index, boost.multiprecision, boost.nowide, boost.numeric.conversion, boost.numeric.interval, boost.numeric.odeint, boost.numeric.ublas, boost.optional, boost.outcome, boost.parameter, boost.parameter_python, boost.pfr, boost.phoenix, boost.poly_collection, boost.polygon, boost.pool, boost.predef, boost.preprocessor, boost.process, boost.program_options, boost.property_map.parallel, boost.property_map, boost.property_tree, boost.proto, boost.ptr_container, boost.python, boost.qvm, boost.random, boost.range, boost.ratio, boost.rational, boost.regex, boost.rules.tools, boost.safe_numerics, boost.scope_exit, boost.serialization, boost.signals2, boost.smart_ptr, boost.sort, boost.spirit, boost.stacktrace, boost.statechart, boost.static_assert, boost.static_string, boost.stl_interfaces, boost.system, boost.test, boost.thread, boost.throw_exception, boost.timer, boost.tokenizer, boost.tti, boost.tuple, boost.type_erasure, boost.type_index, boost.type_traits, boost.typeof, boost.units, boost.unordered, boost.url, boost.utility, boost.uuid, boost.variant, boost.variant2, boost.vmd, boost.wave, boost.winapi, boost.xpressive, boost.yap, boost) have been updated in this PR. Please review the changes. |
getting boost into the BCR is awesome! I was attempting to convert all boost modules into bazel modules here https://github.com/bazelboost but if your tool is doing a better job and is more automatic then I'm all for it (takes a bit of a burden off me 😅.) I'm willing to help out in the coming months if I can. Windows support is important for me. |
@zaucy That's awesome! I'd super duper appreciate the help! The way I've structured this has been with feedback from @Vertexwahn and others who have also had a go, we've managed to avoid needing to maintain forks of all the repos by using patches and an automated script, which will also make it easy to pr upstream to boost eventually. I don't personally have windows handy so support has been difficult for me to assess, you could definitely help there! I haven't been working on this much over the last couple months due to other commitments, but it's still in the pipeline, and if you're looking to make some contributions, I can add you to my BCR fork so you can commit whenever you want and it'll be straight in this PR! Also happy to walk you through what I've done so far 👍 Current status as of end of last year, I had all but 13 of the modules building successfully on my machine, the checklist above is which i've got passing all the unit tests. A lot of the modules need to be passed compiler feature flags from boost.config so they don't try to use features that aren't on the particular compiler setup. I haven't looked into this but it should solve a lot. Also, boost.test isn't linking properly yet, it would be a big priority as it will make a ton of the unit tests that depend on it pass properly! I also think there are some new BCR requirements that haven't been added yet, I'll look into it hopefully soon but some vscode regex find and replace usually makes that pretty easy 😉 Also, once we get this all building, we can write a bit of python to do boost version upgrades in a semi-automated way. It'll make things a ton nicer to maintain. Already got some ideas for automatically solving the interdeps |
it would be awesome to see some of this merged! |
Hey @keith! Gosh I totally agree😝 Unfortunately the last few months I’ve been tied up with two new jobs, but the original project that required and started this is back on the cards as of the other day. I’ll be starting to work on it again slowly, but hoping to get some internal team members to help out so we can make some real progress!👍 |
I recommend to go here with a minimal set that works - i.e. split this PR in a subset that works and get it merged. |
I looked at that a bit, very difficult as most aren’t standalone, and even the ones that are use others in tests 🤔. Might be able to split it up a bit though. |
Hi all, just continuing on work here for adding the Boost modules to BCR. If anyone is interested on helping out, lmk and I'll add you to the fork so you can go to town with commits to this PR😄
This is kinda a big project, but as far as everything building properly, it's not too far off considering a fair bit was taken from [rules_boost)[https://github.com/nelhage/rules_boost]. This tries to incorporate and pass all the tests in all the boost modules though, which has shown a lot more issues across a lot of different platforms, so there's still quite a way to go! I'm working on this as a side project in spare time, so probably won't be done soon, but I'll keep working on it!
For previous discussions, please see #1280
Task List
Fix Compiling issues
Potentially needs work (reference their cmakelists.txt and compare to what BUILD.bazel file is doing)
Random TODO:
Enforce cxx minimum versions on particular libs. (Should we enforce a higher like 20 when extra features are available with that version?)As Bazel 17 defaults to c++17, (the highest minimum required by any boost lib) we won't enforce any versions. The user can choose to build with higher (eg c++20) if they desire.boost.geometry --cxxopt='-std=c++14'boost.hana --cxxopt='-std=c++14'boost.stl_interfaces --cxxopt='-std=c++14'boost.histogram --cxxopt='-std=c++14'boost.pfr --cxxopt='-std=c++17’boost.spirit --cxxopt='-std=c++17’Tests Passing (hence fully operational and ready to be used)
--------------- Negative tests and test deps not added yet (hence will likely fail on test) below this line ---------------
Tests Not Needed:
Test Notes
BUILD.bazel
file.Testing Process
I've been iteratively doing the cycle of:
bazel clean --expunge
I've also been doing this with a.bazelversion
file with6.4.0
as bazel7.0.1
has not been clearing caches for me properly. I literally have not found a way (even manually deleting cache files) for it to actually realise the hash and module has been updated, even though the module version from the local repository is the same. Weird and highly annoying, I would've thoughbazel clean --expunge
would get rid of everything, but apparently not with my config🤷♀️Lockfiles were definitely doing their job properly! Note to self - use
--lockfile_mode=off
when developing modules!