mirror of
https://github.com/NixOS/nix
synced 2025-07-01 12:37:59 +02:00
toXML: display errors position
- This change applies to builtins.toXML and inner workings - Proof of concept: ```nix let e = builtins.toXML e; in e ``` - Before: ``` $ nix-instantiate --eval poc.nix error: infinite recursion encountered ``` - After: ``` $ nix-instantiate --eval poc.nix error: infinite recursion encountered at /data/github/kamadorueda/nix/poc.nix:1:9: 1| let e = builtins.toXML e; in e | ```
This commit is contained in:
parent
bceda30498
commit
d0e9e18489
5 changed files with 20 additions and 16 deletions
|
@ -50,7 +50,7 @@ void processExpr(EvalState & state, const Strings & attrPaths,
|
|||
else
|
||||
state.autoCallFunction(autoArgs, v, vRes);
|
||||
if (output == okXML)
|
||||
printValueAsXML(state, strict, location, vRes, std::cout, context);
|
||||
printValueAsXML(state, strict, location, vRes, std::cout, context, noPos);
|
||||
else if (output == okJSON)
|
||||
printValueAsJSON(state, strict, vRes, std::cout, context);
|
||||
else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue