Anyway, CMake is terrible - for all the reasons you have identified - so I wish you luck!
Anyway, CMake is terrible - for all the reasons you have identified - so I wish you luck!
Funny you should mention Bazel and Buck; I'm coming for them too! I'm also coming for Nix; I want its advantages to be easily accessible for mere mortals.
I think I can do better alone than those teams have because they have all made assumptions that weren't great. I'm learning from their mistakes.
Also, UX matters, and I'm putting a lot of effort into that.
But the other reason is that if you do Nix right, the capabilities of Bazel and Buck just appear.
Thank you for the encouragement!
I'm curious about that... Nix has no notion of "providers" AFAIK, but these are key for optimization and composition of targets in Bazel / Buck(2)
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.
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!
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.