build.rebuilders.mtime

Special meaning of keys?
No, but they must have an associated file name.
Requires an specific scheduler?
Yes, any scheduler that provides dependency information along with the task. For example, the topological scheduler.

This simple rebuilder will cache a key only for as long as its modification time (also known as mtime) remains bigger than that of it’s dependencies.

Usage

local Rebuilder = require "build.rebuilders.mtime" (Posix_File_System, File_Of_Key)

The Rebuilder.create(fs) (where fs is the instance of Posix_File_System) will create and return the new rebuilder.

Notes

When checking the timestamps, keys without an associated file will be handled as permanently out of date. This sound wrong but is the only way to keep the invariants of the build system: always rebuilding file-less keys will never leave a key that should have been rebuilt unbuilt.

See Also