Skip to content
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

wanted: nelhage/rules_boost #292

Open
chenyuanrun opened this issue Nov 24, 2022 · 5 comments
Open

wanted: nelhage/rules_boost #292

chenyuanrun opened this issue Nov 24, 2022 · 5 comments
Labels
module wanted Users want a certain module to be available in the BCR, contributions are welcome!

Comments

@chenyuanrun
Copy link

Can somebody add boost support for bcr? Or may you accept a PR to add boost?

@fmeum
Copy link
Contributor

fmeum commented Nov 24, 2022

Contributions in this area would be very welcome. https://github.com/nelhage/rules_boost appears to be a promising candidate for BCR inclusion.

@fmeum fmeum added the module wanted Users want a certain module to be available in the BCR, contributions are welcome! label Nov 24, 2022
@yl7890
Copy link

yl7890 commented Nov 26, 2022

+1, but Boost is a very large repository and will likely need many maintainers. Some immediate questions:

  • Is it better to include boost directly? Or is it better to include nelhage/rules_boost?
  • If the former, is it better to have one monolithic boost repo? (e.g. boost/) or is it better to have many subrepos? (e.g. boost-accumulator, boost-any, etc...). Note that vcpkg seems to have both.
  • If the latter, it is likely that lots of time will need to be spent writing adapters, since nelhage/rules_boost introduces many customizations.

@zaucy
Copy link
Contributor

zaucy commented Nov 26, 2022

In the past I did fork the individual boost repositories and add BUILD and WORKSPACE files to them. https://github.com/bazelboost. No MODULE files since I did this before bcr was available. What I did was have the individual repositories and a single repository that creates an alias similar to the boostorg repository. Example alias @boost//libs/mp11:mp11 -> @com_github_bazelboost_mp11//:mp11 (source: https://github.com/bazelboost/boost/blob/main/libs/mp11/BUILD.bazel)

However, they are woefully unmaintained. I do use them, but I would consider it more of an experiment.

@aaronmondal
Copy link

Looks to me like the rules_boost BUILD.bazel is actively maintained, but I'm not sure whether this covers all libraries: https://github.com/nelhage/rules_boost/blob/master/BUILD.boost. I do agree though that the custom boost_library rules seem rather unnecessary to me. I think it would be a bit nicer to have "raw" rules_cc.

If it helps, I also played around with overlaying boost a while ago. Boost has a CMake build file generator tool. That tool can be rather easily adjusted to output Bazel BUILD files instead. The nice thing is that this way the dependencies for libraries are autogenerated. I believe I had to manually fix some smaller issues with these autogenerated files, but most targets "just worked" out of the box.

A relatively low maintenance overhead way to handle boost in the BCR may be to http_archive-fetch the packaged stable releases from the boost homepage and apply an overlay to it that adds a BUILD.bazel file, similarly to the bazel overlay in the llvm-project. Or we could just add a build file as a BCR-side patch 😄

@alexeagle alexeagle changed the title Add boost wanted: nelhage/rules_boost Dec 1, 2022
@zaucy zaucy mentioned this issue Jul 21, 2023
1 task
@hofbi
Copy link
Contributor

hofbi commented Jun 15, 2024

nelhage/rules_boost#553 ported rules_boost to bzlmod. Linking nelhage/rules_boost#573 for cross reference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module wanted Users want a certain module to be available in the BCR, contributions are welcome!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants