From bd383d1b6f91c4fe7ac21c52771e92027f649fa0 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 4 Feb 2022 00:31:33 +0100 Subject: Make most calls to determinePos() lazy --- src/nix-instantiate/nix-instantiate.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nix-instantiate') diff --git a/src/nix-instantiate/nix-instantiate.cc b/src/nix-instantiate/nix-instantiate.cc index 8836f810c..a08683be1 100644 --- a/src/nix-instantiate/nix-instantiate.cc +++ b/src/nix-instantiate/nix-instantiate.cc @@ -40,7 +40,7 @@ void processExpr(EvalState & state, const Strings & attrPaths, for (auto & i : attrPaths) { Value & v(*findAlongAttrPath(state, i, autoArgs, vRoot).first); - state.forceValue(v, v.determinePos(noPos)); + state.forceValue(v, [&]() { return v.determinePos(noPos); }); PathSet context; if (evalOnly) { -- cgit v1.2.3