mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-30 01:26:15 +02:00
Merge pull request #4370 from NixOS/ca/more-precise-build-noop
Better detect when `buildPaths` would be a no-op
This commit is contained in:
commit
ae3c3e3bb2
1 changed files with 11 additions and 3 deletions
|
@ -729,9 +729,17 @@ void Store::buildPaths(const std::vector<StorePathWithOutputs> & paths, BuildMod
|
||||||
StorePathSet paths2;
|
StorePathSet paths2;
|
||||||
|
|
||||||
for (auto & path : paths) {
|
for (auto & path : paths) {
|
||||||
if (path.path.isDerivation())
|
if (path.path.isDerivation()) {
|
||||||
unsupported("buildPaths");
|
if (settings.isExperimentalFeatureEnabled("ca-derivations")) {
|
||||||
paths2.insert(path.path);
|
for (auto & outputName : path.outputs) {
|
||||||
|
if (!queryRealisation({path.path, outputName}))
|
||||||
|
unsupported("buildPaths");
|
||||||
|
}
|
||||||
|
} else
|
||||||
|
unsupported("buildPaths");
|
||||||
|
|
||||||
|
} else
|
||||||
|
paths2.insert(path.path);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (queryValidPaths(paths2).size() != paths2.size())
|
if (queryValidPaths(paths2).size() != paths2.size())
|
||||||
|
|
Loading…
Reference in a new issue