-
Notifications
You must be signed in to change notification settings - Fork 574
Add tooling for populating boost versions #6179
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
base: main
Are you sure you want to change the base?
Conversation
|
Hello @Vertexwahn, modules you maintain (boost.coroutine2, boost.foreach, boost.geometry, boost.graph, boost.heap, boost.icl, boost.lockfree, boost.log, boost.mysql, boost.phoenix, boost.process, boost.property_tree, boost.serialization, boost.sort, boost.spirit, boost.xpressive) have been updated in this PR. |
|
Hello @wep21, modules you maintain (boost.foreach, boost.geometry, boost.graph, boost.heap, boost.icl, boost.log, boost.phoenix, boost.process, boost.property_tree, boost.serialization, boost.sort, boost.spirit, boost.xpressive) have been updated in this PR. |
|
Hello @vtsao-openai, modules you maintain (boost.heap, boost.lockfree) have been updated in this PR. |
|
Hello @lalten, modules you maintain (boost.log) have been updated in this PR. |
|
Hello @kekxv, modules you maintain (boost.mysql) have been updated in this PR. |
|
Hello @hofbi, modules you maintain (boost.process) have been updated in this PR. |
|
Hello @bazelbuild/bcr-maintainers, modules without existing maintainers (boost) have been updated in this PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces a valuable script for automating the addition of new Boost versions and backfills version 1.88.0.bcr.1 for numerous Boost modules. The overall approach and implementation are solid. I've identified a couple of instances where test-only dependencies should be marked as development dependencies and a minor inconsistency in the generated presubmit configuration for the new boost meta-module. Addressing these points will improve dependency management for downstream users and ensure consistent test coverage.
| bazel_dep(name = "boost.container", version = "1.88.0.bcr.1") | ||
| bazel_dep(name = "boost.foreach", version = "1.88.0.bcr.1") | ||
| bazel_dep(name = "boost.test", version = "1.88.0.bcr.1") | ||
| bazel_dep(name = "platforms", version = "1.0.0") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dependencies that are only used for testing should be marked as development dependencies with dev_dependency = True. This prevents them from being transitively included for downstream users of this module, reducing dependency bloat.1
| bazel_dep(name = "boost.container", version = "1.88.0.bcr.1") | |
| bazel_dep(name = "boost.foreach", version = "1.88.0.bcr.1") | |
| bazel_dep(name = "boost.test", version = "1.88.0.bcr.1") | |
| bazel_dep(name = "platforms", version = "1.0.0") | |
| bazel_dep(name = "boost.container", version = "1.88.0.bcr.1", dev_dependency = True) | |
| bazel_dep(name = "boost.foreach", version = "1.88.0.bcr.1", dev_dependency = True) | |
| bazel_dep(name = "boost.test", version = "1.88.0.bcr.1", dev_dependency = True) | |
| bazel_dep(name = "platforms", version = "1.0.0", dev_dependency = True) |
Style Guide References
Footnotes
-
The style guide indicates that development dependencies can be specified with
dev_dependency = Trueand will be ignored when the module is used as a dependency. It is best practice to use this for test-only dependencies. ↩
| bazel_dep(name = "boost.test", version = "1.88.0.bcr.1") | ||
| bazel_dep(name = "platforms", version = "1.0.0") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dependencies that are only used for testing should be marked as development dependencies with dev_dependency = True. This prevents them from being transitively included for downstream users of this module, reducing dependency bloat.1
| bazel_dep(name = "boost.test", version = "1.88.0.bcr.1") | |
| bazel_dep(name = "platforms", version = "1.0.0") | |
| bazel_dep(name = "boost.test", version = "1.88.0.bcr.1", dev_dependency = True) | |
| bazel_dep(name = "platforms", version = "1.0.0", dev_dependency = True) |
Style Guide References
Footnotes
-
The style guide indicates that development dependencies can be specified with
dev_dependency = Trueand will be ignored when the module is used as a dependency. It is best practice to use this for test-only dependencies. ↩
| PRESUBMIT_CONTENT = """\ | ||
| matrix: | ||
| platform: | ||
| - debian10 | ||
| - debian11 | ||
| - macos | ||
| - macos_arm64 | ||
| - ubuntu2004 | ||
| - ubuntu2204 | ||
| - windows | ||
| bazel: [7.x, 8.x] | ||
| tasks: | ||
| verify_targets: | ||
| name: Verify build targets | ||
| platform: ${{ platform }} | ||
| bazel: ${{ bazel }} | ||
| build_flags: | ||
| - '--process_headers_in_dependencies' | ||
| build_targets: | ||
| - '@boost//...' | ||
| """ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PRESUBMIT_CONTENT for the meta-module is missing ubuntu2404 in the platform matrix and rolling in the bazel versions. Other new boost modules in this PR include them. These should be added for consistency and to ensure the meta-module is tested on all relevant platforms and Bazel versions. After updating the script, please regenerate the presubmit.yml for boost/1.88.0.bcr.1.
PRESUBMIT_CONTENT = """\
matrix:
platform:
- debian10
- debian11
- macos
- macos_arm64
- ubuntu2004
- ubuntu2204
- ubuntu2404
- windows
bazel: [7.x, 8.x, rolling]
tasks:
verify_targets:
name: Verify build targets
platform: ${{ platform }}
bazel: ${{ bazel }}
build_flags:
- '--process_headers_in_dependencies'
build_targets:
- '@boost//...'
"""
This comment was marked as duplicate.
This comment was marked as duplicate.
|
@bazel-io skip_check compatibility_level |
|
@bazel-io skip_check unstable_url |
This comment was marked as resolved.
This comment was marked as resolved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
| name = "boost", | ||
| version = "{version}", | ||
| bazel_compatibility = [">=7.6.0"], | ||
| compatibility_level = {compatibility_level}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we still need this? If we assume 7.6.0, could we rely on nodep deps and the synthetic boost module to force the same version for all modules?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not actually familiar with the impact of compatibility level. It was only something I saw when trying to use boost modules and it blocked me from being able to use them. So I tried to conform to what I thought was the existing pattern. If there's a better path forward for the meta module then I'm open to adding it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Depending on module versions with different compatibility levels is an error, which makes deps on boost somewhat risky right now. If the public API isn't actually all that unstable but consistent versions have to be used of different boost modules, forcing them all to the highest version in the graph via a bazel_dep cycle could be an alternative.
@Vertexwahn @wep21 for input
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fmeum You mean we should add bazel_dep(name = "boost.pin_version", version = "1.88.0.bcr.1") to modules/boost/1.88.0.bcr.1/MODULE.bazel? Makes sense - but then we also need to add bazel_dep(name = "boost", version = "1.88.0.bcr.1", repo_name = None) to modules/boost.pin_version/1.88.0.bcr.1/MODULE.bazel - since we have the policy "do not modifiy existing things" - the change is currently not possible - therefore, I would drop it for now (1.88.0.bcr.1 and 1.89.0), and do it mabye for boost@1.90.0 (which comes in December) or 1.88.0.bcr.2 and 1.89.0.bcr.1, etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good to me.
We probably wouldn't need pin_version anymore if we already have a boost meta module, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@meteorcloudy If new boost versions end up with cyclic dependencies, we would need to make sure that CI can handle them in a single PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@UebelAndre In the past, all attempts to get many boost modules in at the time failed - I propose you split this PR (maybe 6-10 modules per PR) - maybe an own PR for boost tooling - of course, you can still try to get in everything in on PR but I think there some rate limits with Apple build jobs, etc. that will give you a hard time... do whatever works for you - just my personal experience... -> see this PR for instance: #4989 which never made it in becaue of "reasons"
I did notice most jobs failing to fetch github metadata. There should probably be a retry added but i have no idea where the code lives for bcr_presubmit.py. I would expect CI to be able to handle rate limits and I think updates to boost should generally happen in one change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If new boost versions end up with cyclic dependencies, we would need to make sure that CI can handle them in a single PR.
I think it should work already?
I did notice most jobs failing to fetch github metadata.
There were some network issue on macOS VMs last week. Retried.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm also hearing complaints from users about bumped compatibility_level for boost libraries. Do I understand correctly that the plan is to stop bumping it with the next boost version and switch to use non-dep with the boost module?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would expect CI to be able to handle rate limits and I think updates to boost should generally happen in one change.
I agree, let me know if CI is blocking this. Currently we are having outage for macOS VMs and are still working on finding a solution. bazelbuild/continuous-integration#2385
Co-authored-by: Fabian Meumertzheim <fabian@meumertzhe.im>
Require module maintainers' approval for newly pushed changes.
Changes:
modules/boost/add_boost_version.pyfor populating boost versions.boostmeta-module which allows for validation of all available boost modules in a single module.1.88.0.bcr.1boost versions.