mirror of
https://github.com/NixOS/nix
synced 2025-06-25 06:31:14 +02:00
Use BuildableReq
for buildPaths
and ensurePath
This avoids an ambiguity where the `StorePathWithOutputs { drvPath, {} }` could mean "build `brvPath`" or "substitute `drvPath`" depending on context. It also brings the internals closer in line to the new CLI, by generalizing the `Buildable` type is used there and makes that distinction already. In doing so, relegate `StorePathWithOutputs` to being a type just for backwards compatibility (CLI and RPC).
This commit is contained in:
parent
32f4454b9f
commit
255d145ba7
31 changed files with 364 additions and 126 deletions
|
@ -12,6 +12,7 @@
|
|||
#include "affinity.hh"
|
||||
#include "util.hh"
|
||||
#include "shared.hh"
|
||||
#include "path-with-outputs.hh"
|
||||
#include "eval.hh"
|
||||
#include "eval-inline.hh"
|
||||
#include "get-drvs.hh"
|
||||
|
@ -321,7 +322,8 @@ static void main_nix_build(int argc, char * * argv)
|
|||
|
||||
state->printStats();
|
||||
|
||||
auto buildPaths = [&](const std::vector<StorePathWithOutputs> & paths) {
|
||||
auto buildPaths = [&](const std::vector<StorePathWithOutputs> & paths0) {
|
||||
auto paths = toBuildableReqs(paths0);
|
||||
/* Note: we do this even when !printMissing to efficiently
|
||||
fetch binary cache data. */
|
||||
uint64_t downloadSize, narSize;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue