A very early prototype of a unique build system.
A forward based build system, where you can make calls to
cmd. These are:
- Skipped if their inputs/outputs haven’t changed
- Have their outputs copied in if only the outputs have changed
- Can be speculated in advance
The innovation over something like Fabricate is that I have a notion of hazards - if two rules write to the same file, or one writes after another reads, I consider that a build hazard and throw an error - the result is no longer consistent. For speculation, I just run commands that look useful and don’t look like they’ll cause a hazard. If speculation does cause a hazard, I give up and try again without speculation.
This build system fundamentally relies on tracing the files used by system commands, and currently uses the
fsatrace program to do so, which must be installed. As a consequence of the design, if
fsatrace fails, then
rattle won’t work properly. Example reasons that
fsatrace might fail include:
- If you use Go compiled binaries on Linux or Mac then it’s unlikely to be traced, see Issue 24.
- If you a Mac OS X 1.10 or higher then system binaries that themselves invoke system binaries they won’t be traced, unless you disable System Integrity Protection (which you do at your own risk).
- If you use statically linked binaries on Linux they probably won’t be traced.
It is possible to write alternative tracing mechanisms that wouldn’t have these limitations, for example:
0.1, released 2019-04-17
Initial version, not ready for public use