Properties of Build Systems.
- Minimality: build a task only once and only if their dependencies have changed.
- Must rebuild only out of date keys and at most once
- Must build all keys in an order that respects their dependencies
- Self Tracking: tracks changes in task definitions themselves
- Early Cutoff optimization: don’t try to build dependant tasks if a task execution has unchanged result
- Shallow Builds: Materialize only end build products locally
- Content Addressable Cache: maps hash of file content to actual content
- Memo table: record all build commands with input and output file hashes.
- Hermicity: Dependent only on a known set of inputs, which is essential for ensuring that builds are reproducible.
- nb: achieved in bazel by disallowing arbitrary IO
- “Very fast incremental builds”
|Build System||Persistent bulid info (rescheduler)||Scheduler||Dependencies||Minimal||Cutoff||Cloud||Cyclic Tasks||Direction|
|make||file modification times||topological||static||yes||no||no||no||backwards|
|excel||dirty cells, calc chain||restarting||dynamic||no||no||no||no||backwards|
|shake||previous dependency graph||suspending||dynamic||yes||yes||no||no||backwards / some forward|
|bazel||cloud cache, command history||restarting||yes (builtin rules) no (user-defined rules)||no||yes||yes||no||backwards|
TODO: Integrate some of this https://github.com/terabyte/blog/blob/master/legacy/2016-01-26-Buildsystem-Rundown.md