libstore: fix non-awaited calls to optimisePath()

LocalStore::optimisePath() was made asynchronous in 38b75b736¹, but we
lost warnings for not awaiting kj::Promise in f68233ec4², since our
capnproto no longer has the [[nodiscard]] patch.

[1]: 38b75b7367
[2]: f68233ec43

Change-Id: I2363396949f40dd43eae08cc76be9ede6b488cf7
This commit is contained in:
Qyriad
2025-10-17 18:41:43 +00:00
parent 20ba2b49fb
commit 013d5e54e9
2 changed files with 5 additions and 4 deletions
+2 -1
View File
@@ -2229,7 +2229,8 @@ try {
debug("unreferenced input: '%1%'", worker.store.printStorePath(i));
}
localStore.optimisePath(actualPath, NoRepair); // FIXME: combine with scanForReferences()
// FIXME: combine with scanForReferences()
TRY_AWAIT(localStore.optimisePath(actualPath, NoRepair));
worker.markContentsGood(newInfo.path);
newInfo.deriver = drvPath;
+3 -3
View File
@@ -1166,7 +1166,7 @@ try {
canonicalisePathMetaData(realPath, {});
optimisePath(realPath, repair); // FIXME: combine with hashPath()
TRY_AWAIT(optimisePath(realPath, repair)); // FIXME: combine with hashPath()
TRY_AWAIT(registerValidPath(info));
}
@@ -1333,7 +1333,7 @@ try {
canonicalisePathMetaData(realPath, {}); // FIXME: merge into restorePath
optimisePath(realPath, repair);
TRY_AWAIT(optimisePath(realPath, repair));
ValidPathInfo info {
*this,
@@ -1385,7 +1385,7 @@ try {
sink << dumpString(s);
auto narHash = hashString(HashType::SHA256, sink.s);
optimisePath(realPath, repair);
TRY_AWAIT(optimisePath(realPath, repair));
ValidPathInfo info { dstPath, narHash };
info.narSize = sink.s.size();