forked from lix-project/lix
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
|
@ -207,11 +207,16 @@ void makeFlakeClosureGCRoot(Store & store,
|
||||||
/* Note: due to lazy fetching, these paths might not exist
|
/* Note: due to lazy fetching, these paths might not exist
|
||||||
yet. */
|
yet. */
|
||||||
for (auto & dep : flake.flakeInputs) {
|
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);
|
queue.push(dep.second);
|
||||||
}
|
}
|
||||||
for (auto & dep : flake.nonFlakeInputs)
|
for (auto & dep : flake.nonFlakeInputs) {
|
||||||
closure.insert(dep.second.computeStorePath(store));
|
auto path = dep.second.computeStorePath(store);
|
||||||
|
if (store.isValidPath(path))
|
||||||
|
closure.insert(path);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (closure.empty()) return;
|
if (closure.empty()) return;
|
||||||
|
|
Loading…
Reference in a new issue