4 ms·
Er, most of the capabilities of Bezel and Buck just appear. That said, can you explain providers to me? I looked up the docs, and I'm no closer to understandin
by ghoward 4y ago
Er, most of the capabilities of Bezel and Buck just appear.
That said, can you explain providers to me? I looked up the docs, and I'm no closer to understanding them.
I want to understand them and their uses do that my build system can have the same capabilities.
- substation13 4y agoDisclaimer: I'm not a Bazel expert by any means Every Bazel rule (e.g. cxx_library) has attributes and an internal implementation function in Starlark. The implementation can read the attributes and coordinates the work of actually calling programs (like Clang) and collecting the outputs. The collected outputs are exposed via a list of data-structures of type "Provider". When a target depends on other targets, it can see the providers of its direct dependencies. This allows targets to build on their dependencies. In C/C++, for example, the Providers contain the header files, the objects for linking etc. I would definitely write (or at least read) a few Bazel rules before writing a new build system that improves on it!
- ghoward 4y ago> I would definitely write (or at least read) a few Bazel rules before writing a new build system that improves on it! You have a point there; I didn't because everything I've seen is that people like the results of Bazel, but they hate writing rules, so Bazel rules seemed like something to not emulate. But point taken. And thank you for the explanation. It seems providers allow for multiple outputs on a target. My build system allows that, but bundling such outputs together is a good idea that I need to add.