From c145ce0e1a01f54f7ddf7d38909cf6bd8ec32a88 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Fri, 5 Apr 2024 16:15:43 +0200 Subject: [PATCH] realiseContext: Remove no-op replacements A possible use of them might have been to figure out the paths (which can now be retrieved with maybePathsOut), but I have not found evidence that it was used this way, and it would have been broken, because non-CA outputs weren't recorded in the map. --- src/libexpr/primops.cc | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc index e446199ae..5fd3256a5 100644 --- a/src/libexpr/primops.cc +++ b/src/libexpr/primops.cc @@ -59,7 +59,6 @@ StringMap EvalState::realiseContext(const NixStringContext & context, StorePathS }, [&](const NixStringContextElem::Opaque & o) { auto ctxS = store->printStorePath(o.path); - res.insert_or_assign(ctxS, ctxS); ensureValid(o.path); if (maybePathsOut) maybePathsOut->emplace(o.path); @@ -67,7 +66,6 @@ StringMap EvalState::realiseContext(const NixStringContext & context, StorePathS [&](const NixStringContextElem::DrvDeep & d) { /* Treat same as Opaque */ auto ctxS = store->printStorePath(d.drvPath); - res.insert_or_assign(ctxS, ctxS); ensureValid(d.drvPath); if (maybePathsOut) maybePathsOut->emplace(d.drvPath);