mirror of
https://github.com/NixOS/nix.git
synced 2025-11-09 03:56:01 +01:00
DerivationBuildingGoal::tryToBuild inline
The resulting `goto` is not so nice, but it is still worth doing this so we can turn more fields into local variables.
This commit is contained in:
parent
d596b9754e
commit
abc4f86e4e
2 changed files with 3 additions and 6 deletions
|
|
@ -201,11 +201,9 @@ Goal::Co DerivationBuildingGoal::gaveUpOnSubstitution(bool storeDerivation)
|
|||
slot to become available, since we don't need one if there is a
|
||||
build hook. */
|
||||
co_await yield();
|
||||
co_return tryToBuild();
|
||||
}
|
||||
|
||||
Goal::Co DerivationBuildingGoal::tryToBuild()
|
||||
{
|
||||
tryToBuild:
|
||||
|
||||
std::map<std::string, InitialOutput> initialOutputs;
|
||||
|
||||
/* Recheck at this point. In particular, whereas before we were
|
||||
|
|
@ -527,7 +525,7 @@ Goal::Co DerivationBuildingGoal::tryToBuild()
|
|||
if (curBuilds >= settings.maxBuildJobs) {
|
||||
outputLocks.unlock();
|
||||
co_await waitForBuildSlot();
|
||||
co_return tryToBuild();
|
||||
goto tryToBuild;
|
||||
}
|
||||
|
||||
if (!builder) {
|
||||
|
|
|
|||
|
|
@ -110,7 +110,6 @@ private:
|
|||
* The states.
|
||||
*/
|
||||
Co gaveUpOnSubstitution(bool storeDerivation);
|
||||
Co tryToBuild();
|
||||
|
||||
/**
|
||||
* Is the build hook willing to perform the build?
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue