pub fn record_checkout(
store: &Path,
identity: &str,
workspace_root: &Path,
target_dir: &Path,
) -> Result<()>Expand description
Record that workspace_root built identity.
Identities are shared by every checkout of one dependency graph, so this is what later tells the collector whether anything still needs what a build cached: one file per checkout under the identity it built. Writing a whole file per checkout rather than merging a list into one keeps concurrent builds out of each other’s way – there is nothing to merge, so there is no lock and no lost update.
A build with no target directory of its own passes workspace_root for
target_dir, which reads as “none” rather than as a tree to measure.