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
  • Expressiveness of Build System Operation DSLs#
  • Build System Schedulers#
  • Build System Rebuilders#
  • Build System Correctness#
  • 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.
  • Reproducible Builds#
  • 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 SystemPersistent bulid info (rescheduler)SchedulerDependenciesMinimalCutoffCloudCyclic TasksDirection
makefile modification timestopologicalstaticyesnononobackwards
exceldirty cells, calc chainrestartingdynamicnonononobackwards
shakeprevious dependency graphsuspendingdynamicyesyesnonobackwards / some forward
bazelcloud cache, command historyrestartingyes (builtin rules) no (user-defined rules)noyesyesnobackwards

TODO: Integrate some of this https://github.com/terabyte/blog/blob/master/legacy/2016-01-26-Buildsystem-Rundown.md