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
This commit is contained in:
+2
-3
@@ -173,13 +173,12 @@ struct CmdFlakeLock : FlakeCommand
|
||||
static void enumerateOutputs(EvalState & state, Value & vFlake,
|
||||
std::function<void(const std::string & name, Value & vProvide, const PosIdx pos)> 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");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user