1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-12-25 02:10:54 +01:00

Factor out UnkeyedValidPathInfo and test

This makes the path info serialisers ideomatic again, which allows me to
test them.
This commit is contained in:
John Ericson 2023-04-17 17:13:44 -04:00
parent 596bd469cc
commit 70f8b96c11
10 changed files with 218 additions and 34 deletions

View file

@ -332,7 +332,8 @@ void RemoteStore::queryPathInfoUncached(const StorePath & path,
if (!valid) throw InvalidPath("path '%s' is not valid", printStorePath(path));
}
info = std::make_shared<ValidPathInfo>(
WorkerProto::Serialise<ValidPathInfo>::read(*this, *conn, StorePath{path}));
StorePath{path},
WorkerProto::Serialise<UnkeyedValidPathInfo>::read(*this, *conn));
}
callback(std::move(info));
} catch (...) { callback.rethrow(); }