1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-22 02:09:36 +01:00

Add a structured log message for FOD hash mismatches

This commit is contained in:
Eelco Dolstra 2025-02-17 14:40:50 +01:00
parent 1212b1fbfe
commit 8ef94c1114
2 changed files with 7 additions and 0 deletions

View file

@ -2656,6 +2656,12 @@ SingleDrvOutputs LocalDerivationGoal::registerOutputs()
worker.store.printStorePath(drvPath),
wanted.to_string(HashFormat::SRI, true),
got.to_string(HashFormat::SRI, true)));
// FIXME: put this in BuildResult and log that as JSON.
act->result(resHashMismatch,
{worker.store.printStorePath(drvPath),
wanted.to_string(HashFormat::SRI, true),
got.to_string(HashFormat::SRI, true)
});
}
if (!newInfo0.references.empty()) {
auto numViolations = newInfo.references.size();