From 9d761ed5c1d1b53a5c3a712fc4720ea484a47d34 Mon Sep 17 00:00:00 2001 From: eldritch horrors Date: Sat, 26 Apr 2025 22:14:05 +0200 Subject: [PATCH] nix: don't determinePos in flake check by the time enumerateOutputs is called we've already established that vFlake will evaluate to an attrset (as a locked flake it can't be any other kind of value). the outputs attribute is likewise already a set because the nix code that builds it says so. adding positions here is merely an unnecessary debugging aid for developers working on flakes. Change-Id: I2a10ddf1400f7650c6e303433f9fee8813f0188d --- lix/nix/flake.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lix/nix/flake.cc b/lix/nix/flake.cc index 65d0c138b..2028f336b 100644 --- a/lix/nix/flake.cc +++ b/lix/nix/flake.cc @@ -173,13 +173,12 @@ struct CmdFlakeLock : FlakeCommand static void enumerateOutputs(EvalState & state, Value & vFlake, std::function callback) { - auto pos = vFlake.determinePos(noPos); - state.forceAttrs(vFlake, pos, "while evaluating a flake to get its outputs"); + state.forceAttrs(vFlake, noPos, "while evaluating a flake to get its outputs"); auto aOutputs = vFlake.attrs->get(state.ctx.symbols.create("outputs")); assert(aOutputs); - state.forceAttrs(*aOutputs->value, pos, "while evaluating the outputs of a flake"); + state.forceAttrs(*aOutputs->value, noPos, "while evaluating the outputs of a flake"); auto sHydraJobs = state.ctx.symbols.create("hydraJobs");