3 ms·
Yeah I think we're in agreement, except that Ninja is not a replacement for Make. Make is both a high-level and a low-level build tool (i.e. logic/graph descri
by chubot 8y ago
Yeah I think we're in agreement, except that Ninja is not a replacement for Make.
Make is both a high-level and a low-level build tool (i.e. logic/graph description vs. execution)
Ninja is only a low-level build tool -- it focuses on execution only, punting logic to a higher level, which I like.
See my comments here:
https://news.ycombinator.com/item?id=19057836 https://news.ycombinator.com/item?id=19057836
I used Bazel/Blaze for many years, and even contributed to it a long time ago, and I agree it has many nice properties (although I'm more interested in building open source projects with diverse dependencies, which it isn't great for AFAIK.)
Another potential advantage of a build generator (described in that comment) is having one mode to enforce correctness of the build description, and another mode to be fast. In other words, you could generate a Ninja file with a sandbox like Bazel uses. You could use a tree of symlinks or run in a chroot with a setuid helper.
- klodolph 8y ago> Yeah I think we're in agreement, except that Ninja is not a replacement for Make. I would definitely disagree with this. Make's higher-level logic/graph description features are only incidental, as Ninja proved, you can remove those features and end up with a tool that is equally valuable, more or less. To abuse an analogy, if I'm shopping for notebooks, I don't need to buy a notebook and pen shrink-wrapped together. I already have plenty of pens. You're right that Bazel isn't good for open-source projects with diverse dependencies, but I think this is a problem that can be solved by developing some more infrastructure for that and writing the appropriate Starlark code (to be called from your your WORKSPACE file and create the appropriate repositories somehow). That code just isn't around yet.
- chubot 8y agoAll I'm saying is that Make was designed to be hand-written and often is, and Ninja was designed to be generated, and almost always is. See the manual: https://ninja-build.org/manual.html#_philosophical_overview https://ninja-build.org/manual.html#_philosophical_overview Concretely, if you look at how Android or buildroot used GNU make, you can't do that with Ninja alone -- you need another tool. GNU make is Turing complete, and Ninja isn't. IMO the Ninja design is better (which isn't surprising since it's not an accretion over decades).