From c121daf3310e4578247c1b728afa9eb6d9b4db9b Mon Sep 17 00:00:00 2001 From: John Ericson Date: Mon, 24 Mar 2025 11:24:16 -0400 Subject: [PATCH] `appendLogTailErrorMsg`: Take a "smaller" arugment We just need a `const Store &`, not a `Worker &`. --- src/libstore/build/derivation-goal.cc | 6 +++--- src/libstore/build/derivation-goal.hh | 2 +- src/libstore/unix/build/local-derivation-goal.cc | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/libstore/build/derivation-goal.cc b/src/libstore/build/derivation-goal.cc index d2e02c6c3..4236f6089 100644 --- a/src/libstore/build/derivation-goal.cc +++ b/src/libstore/build/derivation-goal.cc @@ -873,7 +873,7 @@ void runPostBuildHook( void appendLogTailErrorMsg( - Worker & worker, + const Store & store, const StorePath & drvPath, const std::list & logTail, std::string & msg) @@ -893,7 +893,7 @@ void appendLogTailErrorMsg( // command will not put it at the start of the line unfortunately. msg += fmt("For full logs, run:\n " ANSI_BOLD "%s %s" ANSI_NORMAL, nixLogCommand, - worker.store.printStorePath(drvPath)); + store.printStorePath(drvPath)); } } @@ -940,7 +940,7 @@ Goal::Co DerivationGoal::hookDone() Magenta(worker.store.printStorePath(drvPath)), statusToString(status)); - appendLogTailErrorMsg(worker, drvPath, logTail, msg); + appendLogTailErrorMsg(worker.store, drvPath, logTail, msg); outputLocks.unlock(); diff --git a/src/libstore/build/derivation-goal.hh b/src/libstore/build/derivation-goal.hh index f95f10b39..26391b744 100644 --- a/src/libstore/build/derivation-goal.hh +++ b/src/libstore/build/derivation-goal.hh @@ -64,7 +64,7 @@ void runPostBuildHook( /** Used internally */ void appendLogTailErrorMsg( - Worker & worker, + const Store & store, const StorePath & drvPath, const std::list & logTail, std::string & msg); diff --git a/src/libstore/unix/build/local-derivation-goal.cc b/src/libstore/unix/build/local-derivation-goal.cc index 3baf92471..89ededa45 100644 --- a/src/libstore/unix/build/local-derivation-goal.cc +++ b/src/libstore/unix/build/local-derivation-goal.cc @@ -621,7 +621,7 @@ Goal::Co LocalDerivationGoal::tryLocalBuild() Magenta(worker.store.printStorePath(drvPath)), statusToString(status)); - appendLogTailErrorMsg(worker, drvPath, logTail, msg); + appendLogTailErrorMsg(worker.store, drvPath, logTail, msg); if (diskFull) msg += "\nnote: build failure may have been caused by lack of free disk space";