-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
Description
The task and target infrastructure will need to be reimplemented to be easier to understand, more robust and more compatible with additional targets (like remote files).
It turned out to be quite useful to detect changes in the dependency graph through a checksum mechanism:
- Each initial target (i.e. not created by a task) computes a checksum of its contents
- Each task computes a checksum calculated from the checksums of its inputs and its code
- Each created target gets passed a deterministic key by its task
- Each intermediate or final target computes its checksum from the checksums of its task and its deterministic key
- All checksums are saved in a database, and changes in a target's checksum force the target to be recreated
- Old checksums need to be cleaned properly, or switching back and forth won't cause a rebuild
How do we compute the initial checksums?
A relatively nice way is to use pickle to dump the object into a string, which can be hashed with SHA1.
How do timestamps (and possibly other info) fit in with this?
They could be treated as a fallback, as in
- IF a target's checksum hasn't changed AND it offers timestamps THEN check if the timestamp has changed compared to the last saved state