From 013d5e54e9c5bf6c8bd60a6dd661c9785d9f4558 Mon Sep 17 00:00:00 2001 From: Qyriad Date: Fri, 17 Oct 2025 17:39:35 +0200 Subject: [PATCH] libstore: fix non-awaited calls to optimisePath() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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]: 38b75b7367eaeaf078ae7cf247cc84cf6e92801f [2]: f68233ec4320c75c3e913313f47a06621b1e0dfe Change-Id: I2363396949f40dd43eae08cc76be9ede6b488cf7 --- lix/libstore/build/local-derivation-goal.cc | 3 ++- lix/libstore/local-store.cc | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/lix/libstore/build/local-derivation-goal.cc b/lix/libstore/build/local-derivation-goal.cc index 9087c5d45..956470cae 100644 --- a/lix/libstore/build/local-derivation-goal.cc +++ b/lix/libstore/build/local-derivation-goal.cc @@ -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; diff --git a/lix/libstore/local-store.cc b/lix/libstore/local-store.cc index e3a6c300d..d7cfe6874 100644 --- a/lix/libstore/local-store.cc +++ b/lix/libstore/local-store.cc @@ -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();