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
[feature] Generator for Bazel #6235
Comments
Yes, a Bazel generator might be useful and interesting. It is not the first time it has been floating as an idea. Creating generators is not difficult, check for example (https://blog.conan.io/2019/07/24/C++-build-systems-new-integrations-in-Conan-package-manager.html), if you know a bit about the build system. Unfortunately we don't have that expertise in the team, and now our backlog is completely full, so it doesn't seem we could prioritize this. Regarding the ideas:
I will annotate this as a valid feature request at the moment and open for contributions as we won't be able to work on it at least in the short term. Thanks for the suggestion! |
I created a Bazel generator. It's very basic right now so I'm not going to contribute it in the current state. |
Currently looking at this related to building a tensorflow package. Not sure how rapid progress is likely to be but will submit a PR once I have something workable. |
Hi @technoir42 , @planetmarshall Don't hold that contribution for too long unnecessarily, it doesn't need to be perfect. New generators for build systems are very low-risk, so we can start releasing a very basic functionality (label it as experimental), put it in other users hands and then they can help with testing, feedback, etc. |
I've looked into at a little as well. IMHO the first step would be something like the On the other hand: I guess integration could be accomplished using the |
One potential helper is is to use the CMake generator and have Bazel build using CMake (https://github.com/bazelbuild/rules_foreign_cc). I don't plan to work on this myself, I'm just sharing it as I've had some success using those rules. |
I've had some time to play with this and created a small POC. This is by no means a fully functioning solution, but may provide some pointers for others. I might continue exploring this in the future. What it does (from inside a
See https://github.com/lummax/experiments_rules_conan/tree/c6a54e1041a36e9b374b5ebe640ab31a37a6a676 |
Hi all! We are providing in #8991 an experimental, built-in integration with Bazel. This issue will be closed when merged, and it will be released in 1.37 next week. Thanks! |
Dependencies with Bazel are a pain sometimes. This has the potential to solve it. google/cargo-raze is a tool that interprets Rust's
Cargo.toml
and generates build files from which simplifies the import story for Rust packages. There is the possibility of creating something similar for yourconanfile.txt
in the form of a Bazel generator. This would generate build files for each of the libraries and make them available as dependencies to other actions.The main question that needs to be answered is how to reason with the various combinations of local cache vs remote and build-from-source vs prebuilt. Some ideas:
Cargo raze is the simplest approach in that it always downloads the source code and builds locally
We have the potential to, where they exist, download precompiled binaries and depend on them with
cc_import
(fast)I've read the CONTRIBUTING guide.
The text was updated successfully, but these errors were encountered: