mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-27 00:06:16 +02:00
Don't register invalid paths as GC roots
Unfortunately this doesn't work. Maybe we should keep separate roots for each path.
This commit is contained in:
parent
4ec1a9ab40
commit
45b5c606ac
1 changed files with 8 additions and 3 deletions
|
@ -207,11 +207,16 @@ void makeFlakeClosureGCRoot(Store & store,
|
|||
/* Note: due to lazy fetching, these paths might not exist
|
||||
yet. */
|
||||
for (auto & dep : flake.flakeInputs) {
|
||||
closure.insert(dep.second.computeStorePath(store));
|
||||
auto path = dep.second.computeStorePath(store);
|
||||
if (store.isValidPath(path))
|
||||
closure.insert(path);
|
||||
queue.push(dep.second);
|
||||
}
|
||||
for (auto & dep : flake.nonFlakeInputs)
|
||||
closure.insert(dep.second.computeStorePath(store));
|
||||
for (auto & dep : flake.nonFlakeInputs) {
|
||||
auto path = dep.second.computeStorePath(store);
|
||||
if (store.isValidPath(path))
|
||||
closure.insert(path);
|
||||
}
|
||||
}
|
||||
|
||||
if (closure.empty()) return;
|
||||
|
|
Loading…
Reference in a new issue