mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2025-01-19 17:46:46 +02:00
Merge pull request #11041 from hercules-ci/trace-nix-env-attribute-names
getDerivations: add attributes to trace
This commit is contained in:
commit
61e1880847
1 changed files with 19 additions and 14 deletions
|
@ -374,6 +374,7 @@ static void getDerivations(EvalState & state, Value & vIn,
|
||||||
bound to the attribute with the "lower" name should take
|
bound to the attribute with the "lower" name should take
|
||||||
precedence). */
|
precedence). */
|
||||||
for (auto & i : v.attrs()->lexicographicOrder(state.symbols)) {
|
for (auto & i : v.attrs()->lexicographicOrder(state.symbols)) {
|
||||||
|
try {
|
||||||
debug("evaluating attribute '%1%'", state.symbols[i->name]);
|
debug("evaluating attribute '%1%'", state.symbols[i->name]);
|
||||||
if (!std::regex_match(std::string(state.symbols[i->name]), attrRegex))
|
if (!std::regex_match(std::string(state.symbols[i->name]), attrRegex))
|
||||||
continue;
|
continue;
|
||||||
|
@ -390,6 +391,10 @@ static void getDerivations(EvalState & state, Value & vIn,
|
||||||
getDerivations(state, *i->value, pathPrefix2, autoArgs, drvs, done, ignoreAssertionFailures);
|
getDerivations(state, *i->value, pathPrefix2, autoArgs, drvs, done, ignoreAssertionFailures);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} catch (Error & e) {
|
||||||
|
e.addTrace(state.positions[i->pos], "while evaluating the attribute '%s'", state.symbols[i->name]);
|
||||||
|
throw;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue