N2: Alternative Ninja Implementation
github.com
github.com
[1] https://www.microsoft.com/en-us/research/uploads/prod/2018/0...
(an understanding of Haskell is recommended to understand the implementations, but not required to understand the concepts)
Instead of relying on modification-time comparisons between dependency and target output, use hashes of the relevant "ingredients" of building a target (cmdline, arguments, meta-data about input files etc.).
https://github.com/ninja-build/ninja/issues/1139
At a certain scale (i.e. package management and not a mono build system), having a common job server is essential to scaling in a healthy way.
(Both rustc and cargo support the make job server)
It would be nice if a new, less cumbersome, environment protocol could be adopted.
Both. But server is more important to me usually (ninja running cargo, in particular -- but also sometimes ninja running make or ninja running ninja). Technically you can obviously kinda trick client-only support into being server support by wrapping ninja in a jobserver like make, and letting that jobserver cascade down, but that's pretty gross.
So while client support is nice, it's not really sufficient. I actually don't think I have much use for client-without-server at all, the main configuration I need client for at all is ninja->ninja.
There's also that kitware's is a one-purpose fork that's just kind of a pain to install in CI because lack of packages, but it's pretty easy to `cargo install n2` on a machine where I'm building rust anyways, and cache the CARGO_HOME so it doesn't build every time.
To be honest, with the fact that compilers are no longer single-threaded almost as a rule, something like jobserver seems like an essential feature in a build system now. It's basically impossible to meaningfully limit concurrency without some level of coordination or fuzzy imperfect indicators like load average. I hope other compilers follow rust's lead here and implement client support eventually.
(and then hopefully a more robust common protocol can evolve out of it)
In the end, it was able to compile my own kernel and a few other Ninja projects.
* What your motivation for writing it was.
* Why people might like to use it instead of ninja or n2.
It looks eminently reasonable to me, and Avery Pennarun plus DJB sounds like a majorly winning team to me.
There is some messy reality that causes redo the struggle. For instance it doesn't natively support a single command that produces multiple build targets. You end up needing workarounds. I also find that redo starts to feel like Rails where your logic is spread around is many little files. Each file is easy to understand, but it takes a while to build the full picture.