mirror of
https://github.com/NixOS/nix.git
synced 2025-12-11 11:31:03 +01:00
Give DerivationBuilder a LocalStore not Store
This is just more honest, since we downcasted it to `LocalStore` in many places. We had the downcast before because it wasn't needed in the hook case, just the local building case, but now that `DerivationBuilder` is separated and just does the building case, we have formalized the boundary where the single downcast should occur.
This commit is contained in:
parent
14e355d87d
commit
4bc9ae67c7
6 changed files with 24 additions and 34 deletions
|
|
@ -673,10 +673,13 @@ Goal::Co DerivationBuildingGoal::tryToBuild()
|
|||
}
|
||||
};
|
||||
|
||||
auto * localStoreP = dynamic_cast<LocalStore *>(&worker.store);
|
||||
assert(localStoreP);
|
||||
|
||||
/* If we have to wait and retry (see below), then `builder` will
|
||||
already be created, so we don't need to create it again. */
|
||||
builder = makeDerivationBuilder(
|
||||
worker.store,
|
||||
*localStoreP,
|
||||
std::make_unique<DerivationBuildingGoalCallbacks>(*this, builder),
|
||||
DerivationBuilderParams{
|
||||
drvPath,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue