forked from lix-project/lix
add pos to EvalState::forceValue
- This way we improve error messages on infinite recursion - Demo: ```nix let x = builtins.fetchMercurial x; in x ``` - Before: ```bash $ nix-instantiate --show-trace --strict error: infinite recursion encountered ``` - After: ```bash nix-instantiate --show-trace --strict error: infinite recursion encountered at /data/github/kamadorueda/test/default.nix:2:7: 1| let 2| x = builtins.fetchMercurial x; | ^ 3| in ``` Mentions: #3505
This commit is contained in:
parent
4c0cde95ad
commit
1bdeef8395
|
@ -15,7 +15,7 @@ static void prim_fetchMercurial(EvalState & state, const Pos & pos, Value * * ar
|
|||
std::string name = "source";
|
||||
PathSet context;
|
||||
|
||||
state.forceValue(*args[0]);
|
||||
state.forceValue(*args[0], pos);
|
||||
|
||||
if (args[0]->type() == nAttrs) {
|
||||
|
||||
|
|
Loading…
Reference in a new issue