-
Notifications
You must be signed in to change notification settings - Fork 434
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
Expose bindgen toolchain through bzlmod #2740
base: main
Are you sure you want to change the base?
Conversation
cd2f5f9
to
237339a
Compare
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.
Thank you! Just had some questions and nits 😄
3eb82d9
to
b8a817a
Compare
Sorry, I took my eye off this when I realised I wouldn't need it for OpenTitan. I'm happy to finish it off but I won't have time for at least a week. Happy for anyone else to take it over if they get there before me. Aside, it turns out the I still have no resolution for the |
@jwnrt Hello James, is there any plan to fix this issue? Has a bug been filed with bazelbuild for the repo_mapping issue? Thanks! |
caa3139
to
a39df01
Compare
With Bzlmod enabled, `repo_mapping` isn't that useful since repositories are namespaced under their parents. Unfortunately, Bazel errors out if you try to use it. This commit conditionally provides the parameter if needed, but allows it to be disabled.
a39df01
to
4a483e1
Compare
Thanks for the reminder, I've updated the PR to resolve those issues. Based on bazelbuild/bazel#21846 it seems to me that Bazel are moving away from supporting I've worked around it by making |
@jwnrt Thanks for your effort, sounds like a good solution to me. @UebelAndre Could you take another look, so we can merge this PR? The issue blocks the transition of rules_ros2 to bzlmod. |
@jwnrt Thank you!! Sorry it took me a while to get back but I appreciate your help! |
(just a drive by that this is an exciting change and it would be great to have it merged - thanks @jwnrt and @UebelAndre) |
With this change I was able to use the default bindgen toolchain with bzlmod by adding this to my
MODULE.bazel
:Had to backport a change from recent versions of LLVM which use this
WORKSPACE_ROOT
environment variable to fix paths to generated files. Updating the LLVM archive would also fix that problem.Happy to add tests and documentation if this matches what you had in mind for getting this working.