-
Notifications
You must be signed in to change notification settings - Fork 48
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
Bzlmod #238
base: main
Are you sure you want to change the base?
Bzlmod #238
Conversation
Current state is that things are complaining about boost. I think rather than trying to use the WORKSPACE-only rules_boost it would be best to switch over to bazelbuild/bazel-central-registry#1280 (comment) (once that's ready). |
Boost is used at a single place
|
Here's the issues/todos as of now:
|
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.
High level comments: let's leave version updates and reordering of deps for follow-up PRs to make the review easier.
Great job so far!
92986a5
to
1333d8a
Compare
Getting closer...
The reason is that Bzlmod asio is configured as header-only: https://github.com/bazelbuild/bazel-central-registry/blob/main/modules/asio/1.28.2/patches/add_build_file.patch But in WORKSPACE we use the checked-in asio.BUILD that has rules_ros2/repositories/asio.BUILD.bazel Lines 13 to 15 in 4b8441a
rules_ros2/repositories/asio.BUILD.bazel Line 18 in 4b8441a
CI is green with this change, but that may just mean that there are no tests that really need ssl :) Not sure what's the better approach here. But IMO WORKSPACE and MODULE.bazel should both do the same thing. We still need OpenSSL for libcurl, which is not on BCR yet. |
9a11bf9
to
35007ec
Compare
60855d8
to
ac503cd
Compare
Why do you think this is necessary? AFAIK |
right, but my understanding is that if the root repo uses a default != 3.10, the rules_ros2_pip_deps are not guaranteed to be compatible |
Are you sure that they will chosen in the first place? My understanding is that it will only use pip deps with the correct version. This is why most projects specify the same pip deps for many Python versions. IIUC when it won't find pip deps in the correct version, it will throw an error. |
@lalten were you able to make progress on this PR? |
I'm working on this on and off when I find time, which I didn't since the last commit 🙈 |
No worries, thank you for your contribution. As far as I understand, you got everything working already, right? Maybe time to merge 👀 ? |
Tried to update this branch (still waiting on #344 and #340) but the new rust features require some work to be compatible with Bzlmod. In particular it's not obvious how to get the bindgen stuff into Bzlmod. Looks like bazelbuild/rules_rust#2787 |
My previous comment regarding the rust stuff is still the state of things. I'm thinking if we could add a custom build config flag or so to disable the rust support that might be a way around those issues. |
Yeah, that sounds good. You could tag all Rust-related tests with |
I have no objections merging bzlmod support. But, workspace-based workflow must work, no compromises on that one for the time being. I am not personally using bzlmod (yet) in any projects, so, no Rust support is fine. Something to think about: https://github.com/mvukov/rules_ros is for instance migrated to bzlmod recently. Since no one is using the workspace workflow, it was decided to remove workspace support. Something I found along the way:
|
bazelbuild/rules_python#2370 also very relevant and would solve issues with bzlmod and python packages coming from multiple places. |
rust bindgen is available in bzlmod iirc since rules_rust 0.55.0. |
Watching this eagerly! I'm going through the painful process now of getting my company's dependencies all up on BCR / working with bazel modules. Bazel 8 disabling the workspace option by default put a fire under us as motivation. |
Incomplete, work in progress 🚧