aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr/get-drvs.cc
diff options
context:
space:
mode:
authorKevin Amado <kamadorueda@gmail.com>2021-11-27 12:40:24 -0500
committerKevin Amado <kamadorueda@gmail.com>2022-01-21 16:32:43 -0500
commit49b0bb020663b7283549754a826b1346c93a8bbb (patch)
tree6415237a41abb754bcc51d426f3a85cd4f5f28aa /src/libexpr/get-drvs.cc
parent5f08db69d18ea5b868cbb58993822e7dd0307518 (diff)
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
Diffstat (limited to 'src/libexpr/get-drvs.cc')
-rw-r--r--src/libexpr/get-drvs.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libexpr/get-drvs.cc b/src/libexpr/get-drvs.cc
index 25fd9b949..fe1d11505 100644
--- a/src/libexpr/get-drvs.cc
+++ b/src/libexpr/get-drvs.cc
@@ -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 =