Use revcount/last-modified for computing the flake fingerprint
The store path is not enough. For example, when we build a dirty tree, commit, and build the clean tree, a re-evaluation is necessary because the flake may depend on the lastModified or revCount attributes.
This commit is contained in:
parent
88c452d160
commit
d5f1cc3e94
|
@ -686,7 +686,11 @@ Fingerprint ResolvedFlake::getFingerprint() const
|
|||
// and we haven't changed it, then it's sufficient to use
|
||||
// flake.sourceInfo.storePath for the fingerprint.
|
||||
return hashString(htSHA256,
|
||||
fmt("%s;%s", flake.sourceInfo.storePath, lockFile));
|
||||
fmt("%s;%d;%d;%s",
|
||||
flake.sourceInfo.storePath,
|
||||
flake.sourceInfo.revCount.value_or(0),
|
||||
flake.sourceInfo.lastModified.value_or(0),
|
||||
lockFile));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue