mirror of
https://github.com/NixOS/nix
synced 2025-06-28 01:11:15 +02:00
forceValue: make pos mandatory
- Make passing the position to `forceValue` mandatory, this way we remember people that the position is important for better error messages - Add pos to all `forceValue` calls
This commit is contained in:
parent
5f08db69d1
commit
49b0bb0206
12 changed files with 28 additions and 26 deletions
|
@ -172,7 +172,7 @@ StringSet DrvInfo::queryMetaNames()
|
|||
|
||||
bool DrvInfo::checkMeta(Value & v)
|
||||
{
|
||||
state->forceValue(v);
|
||||
state->forceValue(v, v.determinePos(noPos));
|
||||
if (v.type() == nList) {
|
||||
for (auto elem : v.listItems())
|
||||
if (!checkMeta(*elem)) return false;
|
||||
|
@ -278,7 +278,7 @@ static bool getDerivation(EvalState & state, Value & v,
|
|||
bool ignoreAssertionFailures)
|
||||
{
|
||||
try {
|
||||
state.forceValue(v);
|
||||
state.forceValue(v, v.determinePos(noPos));
|
||||
if (!state.isDerivation(v)) return true;
|
||||
|
||||
/* Remove spurious duplicates (e.g., a set like `rec { x =
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue