mirror of
https://github.com/NixOS/nix
synced 2025-06-25 10:41:16 +02:00
Make ValidPathInfo
have plain StorePathSet
references like before
This change can wait for another PR.
This commit is contained in:
parent
056cc1c1b9
commit
b3d91239ae
24 changed files with 109 additions and 166 deletions
|
@ -1544,8 +1544,7 @@ static void prim_readFile(EvalState & state, const PosIdx pos, Value * * args, V
|
|||
StorePathSet refs;
|
||||
if (state.store->isInStore(path)) {
|
||||
try {
|
||||
// FIXME: Are self references becoming non-self references OK?
|
||||
refs = state.store->queryPathInfo(state.store->toStorePath(path).first)->referencesPossiblyToSelf();
|
||||
refs = state.store->queryPathInfo(state.store->toStorePath(path).first)->references;
|
||||
} catch (Error &) { // FIXME: should be InvalidPathError
|
||||
}
|
||||
// Re-scan references to filter down to just the ones that actually occur in the file.
|
||||
|
@ -1980,7 +1979,7 @@ static void addPath(
|
|||
try {
|
||||
auto [storePath, subPath] = state.store->toStorePath(path);
|
||||
// FIXME: we should scanForReferences on the path before adding it
|
||||
refs = state.store->queryPathInfo(storePath)->referencesPossiblyToSelf();
|
||||
refs = state.store->queryPathInfo(storePath)->references;
|
||||
path = state.store->toRealPath(storePath) + subPath;
|
||||
} catch (Error &) { // FIXME: should be InvalidPathError
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue