Merge pull request #10187 from NixOS/backport-10183-to-2.14-maintenance

[Backport 2.14-maintenance] 2.16 faster flake lock parsing
This commit is contained in:
Théophane Hufschmitt 2024-03-08 10:28:59 +01:00 committed by GitHub
commit 9e19aca31b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -89,7 +89,7 @@ LockFile::LockFile(const nlohmann::json & json, const Path & path)
std::string inputKey = i.value();
auto k = nodeMap.find(inputKey);
if (k == nodeMap.end()) {
auto nodes = json["nodes"];
auto & nodes = json["nodes"];
auto jsonNode2 = nodes.find(inputKey);
if (jsonNode2 == nodes.end())
throw Error("lock file references missing node '%s'", inputKey);