arrdem / katamari

Roll up all your software into artifacts!
67 stars 4 forks source link

Incremental rebuilds #17

Closed arrdem closed 5 years ago

arrdem commented 5 years ago

This changeset implements the machinery required to achieve incremental content hash based rebuilding atop dependency order builds.

The fundamental strategy here is to use the rule-id extension point to compute a content address for every single rule to be built. If that content address exists in a trivial filesystem cache, then the previously built product in the cache is deserialized and used.

The rule-build contract has been extended to define rules to occur within a chroot addressed by me.raynes.fs/*cwd*. This allows the roll machinery to preserve and potentially restore previously rolled build products.

The product records have been extended with :id, being the content address of the product.

The task clean-cache [ttl-age-ms] has been added, allowing users to clean cached build products beyond some age or to bust the cache entirely using clean-cache 0 to remove all cached products.

Fixes #5