Please help with design for Conan's bazel integration #22594
Replies: 1 comment
-
Bazel 7 support has been implemented, in a different (probably better) way, so this question is no longer relevant. conan-io/conan#16196 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Conan's BazelDeps module does not support bazel 7 and Modules. The Conan team don't understand bazel, and are unclear on how their integration with Module should be designed. To help with this, I have fixed up the cpp-example to work with bazel 7 and conan, and I'm hoping to get critique which will help the Conan team to design their module support.
Here it is: https://github.com/peakschris/bazel7-conan-module-example
The readme explains what is going on. I've taken the same approach used by rules_dotnet, wrapping the repo file in a module extension. I'm not sure that this is the best approach, but it is one approach, and it works.
Conan artifacts are pulled upfront, and then referenced into the build with new_local_repository. Each artifact gets its own repo. This is just how it works, and changing this is probably out of scope. What would be helpful to understand is if the approach presented here is the best way, or if there are more elegant solutions.
My repo requires bazel 7.2.0rc2, but prior versions can be supported by un-including the conan.MODULE.bazel file and moving its contents into the main MODULE.bazel file. Using the include statement makes for cleaner MODULE files, but is a brand new feature.
Thanks for all inputs!
Beta Was this translation helpful? Give feedback.
All reactions