@@ -439,37 +439,36 @@ Goal::Co DerivationBuildingGoal::gaveUpOnSubstitution()
439
439
co_return tryToBuild ();
440
440
}
441
441
442
- void DerivationBuildingGoal::started ()
442
+ Goal::Co DerivationBuildingGoal::tryToBuild ()
443
443
{
444
- auto msg =
445
- fmt (buildMode == bmRepair ? " repairing outputs of '%s'"
446
- : buildMode == bmCheck ? " checking outputs of '%s'"
447
- : " building '%s'" ,
448
- worker.store .printStorePath (drvPath));
449
- fmt (" building '%s'" , worker.store .printStorePath (drvPath));
444
+ auto started = [&]() {
445
+ auto msg =
446
+ fmt (buildMode == bmRepair ? " repairing outputs of '%s'"
447
+ : buildMode == bmCheck ? " checking outputs of '%s'"
448
+ : " building '%s'" ,
449
+ worker.store .printStorePath (drvPath));
450
+ fmt (" building '%s'" , worker.store .printStorePath (drvPath));
450
451
#ifndef _WIN32 // TODO enable build hook on Windows
451
- if (hook)
452
- msg += fmt (" on '%s'" , machineName);
452
+ if (hook)
453
+ msg += fmt (" on '%s'" , machineName);
453
454
#endif
454
- act = std::make_unique<Activity>(
455
- *logger,
456
- lvlInfo,
457
- actBuild,
458
- msg,
459
- Logger::Fields{
460
- worker.store .printStorePath (drvPath),
455
+ act = std::make_unique<Activity>(
456
+ *logger,
457
+ lvlInfo,
458
+ actBuild,
459
+ msg,
460
+ Logger::Fields{
461
+ worker.store .printStorePath (drvPath),
461
462
#ifndef _WIN32 // TODO enable build hook on Windows
462
- hook ? machineName :
463
+ hook ? machineName :
463
464
#endif
464
- " " ,
465
- 1 ,
466
- 1 });
467
- mcRunningBuilds = std::make_unique<MaintainCount<uint64_t >>(worker.runningBuilds );
468
- worker.updateProgress ();
469
- }
465
+ " " ,
466
+ 1 ,
467
+ 1 });
468
+ mcRunningBuilds = std::make_unique<MaintainCount<uint64_t >>(worker.runningBuilds );
469
+ worker.updateProgress ();
470
+ };
470
471
471
- Goal::Co DerivationBuildingGoal::tryToBuild ()
472
- {
473
472
/* *
474
473
* Activity that denotes waiting for a lock.
475
474
*/
0 commit comments