mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-25 23:36:16 +02:00
Remove some blank lines from stack traces
This keeps hint messages, source location information, and source code snippets grouped together, while making stack traces shorter (so that more stack frames can be viewed on the same terminal). Before: error: … while evaluating the attribute 'body' at /Users/wiggles/nix/tests/functional/lang/eval-fail-assert.nix:4:3: 3| 4| body = x "x"; | ^ 5| } … from call site at /Users/wiggles/nix/tests/functional/lang/eval-fail-assert.nix:4:10: 3| 4| body = x "x"; | ^ 5| } … while calling 'x' at /Users/wiggles/nix/tests/functional/lang/eval-fail-assert.nix:2:7: 1| let { 2| x = arg: assert arg == "y"; 123; | ^ 3| error: assertion '(arg == "y")' failed at /Users/wiggles/nix/tests/functional/lang/eval-fail-assert.nix:2:12: 1| let { 2| x = arg: assert arg == "y"; 123; | ^ 3| After: error: … while evaluating the attribute 'body' at /Users/wiggles/nix/tests/functional/lang/eval-fail-assert.nix:4:3: 3| 4| body = x "x"; | ^ 5| } … from call site at /Users/wiggles/nix/tests/functional/lang/eval-fail-assert.nix:4:10: 3| 4| body = x "x"; | ^ 5| } … while calling 'x' at /Users/wiggles/nix/tests/functional/lang/eval-fail-assert.nix:2:7: 1| let { 2| x = arg: assert arg == "y"; 123; | ^ 3| error: assertion '(arg == "y")' failed at /Users/wiggles/nix/tests/functional/lang/eval-fail-assert.nix:2:12: 1| let { 2| x = arg: assert arg == "y"; 123; | ^ 3|
This commit is contained in:
parent
419a64f9e0
commit
5cb98095ba
45 changed files with 1 additions and 140 deletions
|
@ -173,10 +173,9 @@ static bool printUnknownLocations = getEnv("_NIX_EVAL_SHOW_UNKNOWN_LOCATIONS").h
|
||||||
static bool printPosMaybe(std::ostream & oss, std::string_view indent, const std::shared_ptr<AbstractPos> & pos) {
|
static bool printPosMaybe(std::ostream & oss, std::string_view indent, const std::shared_ptr<AbstractPos> & pos) {
|
||||||
bool hasPos = pos && *pos;
|
bool hasPos = pos && *pos;
|
||||||
if (hasPos) {
|
if (hasPos) {
|
||||||
oss << "\n" << indent << ANSI_BLUE << "at " ANSI_WARNING << *pos << ANSI_NORMAL << ":";
|
oss << indent << ANSI_BLUE << "at " ANSI_WARNING << *pos << ANSI_NORMAL << ":";
|
||||||
|
|
||||||
if (auto loc = pos->getCodeLines()) {
|
if (auto loc = pos->getCodeLines()) {
|
||||||
oss << "\n";
|
|
||||||
printCodeLines(oss, "", *pos, *loc);
|
printCodeLines(oss, "", *pos, *loc);
|
||||||
oss << "\n";
|
oss << "\n";
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
error:
|
error:
|
||||||
… while calling the 'abort' builtin
|
… while calling the 'abort' builtin
|
||||||
|
|
||||||
at /pwd/lang/eval-fail-abort.nix:1:14:
|
at /pwd/lang/eval-fail-abort.nix:1:14:
|
||||||
|
|
||||||
1| if true then abort "this should fail" else 1
|
1| if true then abort "this should fail" else 1
|
||||||
| ^
|
| ^
|
||||||
2|
|
2|
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
error:
|
error:
|
||||||
… while calling the 'addDrvOutputDependencies' builtin
|
… while calling the 'addDrvOutputDependencies' builtin
|
||||||
|
|
||||||
at /pwd/lang/eval-fail-addDrvOutputDependencies-empty-context.nix:1:1:
|
at /pwd/lang/eval-fail-addDrvOutputDependencies-empty-context.nix:1:1:
|
||||||
|
|
||||||
1| builtins.addDrvOutputDependencies ""
|
1| builtins.addDrvOutputDependencies ""
|
||||||
| ^
|
| ^
|
||||||
2|
|
2|
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
error:
|
error:
|
||||||
… while calling the 'addDrvOutputDependencies' builtin
|
… while calling the 'addDrvOutputDependencies' builtin
|
||||||
|
|
||||||
at /pwd/lang/eval-fail-addDrvOutputDependencies-multi-elem-context.nix:18:4:
|
at /pwd/lang/eval-fail-addDrvOutputDependencies-multi-elem-context.nix:18:4:
|
||||||
|
|
||||||
17|
|
17|
|
||||||
18| in builtins.addDrvOutputDependencies combo-path
|
18| in builtins.addDrvOutputDependencies combo-path
|
||||||
| ^
|
| ^
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
error:
|
error:
|
||||||
… while calling the 'addDrvOutputDependencies' builtin
|
… while calling the 'addDrvOutputDependencies' builtin
|
||||||
|
|
||||||
at /pwd/lang/eval-fail-addDrvOutputDependencies-wrong-element-kind.nix:9:4:
|
at /pwd/lang/eval-fail-addDrvOutputDependencies-wrong-element-kind.nix:9:4:
|
||||||
|
|
||||||
8|
|
8|
|
||||||
9| in builtins.addDrvOutputDependencies drv.outPath
|
9| in builtins.addDrvOutputDependencies drv.outPath
|
||||||
| ^
|
| ^
|
||||||
|
|
|
@ -1,35 +1,27 @@
|
||||||
error:
|
error:
|
||||||
… while evaluating the attribute 'body'
|
… while evaluating the attribute 'body'
|
||||||
|
|
||||||
at /pwd/lang/eval-fail-assert.nix:4:3:
|
at /pwd/lang/eval-fail-assert.nix:4:3:
|
||||||
|
|
||||||
3|
|
3|
|
||||||
4| body = x "x";
|
4| body = x "x";
|
||||||
| ^
|
| ^
|
||||||
5| }
|
5| }
|
||||||
|
|
||||||
… from call site
|
… from call site
|
||||||
|
|
||||||
at /pwd/lang/eval-fail-assert.nix:4:10:
|
at /pwd/lang/eval-fail-assert.nix:4:10:
|
||||||
|
|
||||||
3|
|
3|
|
||||||
4| body = x "x";
|
4| body = x "x";
|
||||||
| ^
|
| ^
|
||||||
5| }
|
5| }
|
||||||
|
|
||||||
… while calling 'x'
|
… while calling 'x'
|
||||||
|
|
||||||
at /pwd/lang/eval-fail-assert.nix:2:7:
|
at /pwd/lang/eval-fail-assert.nix:2:7:
|
||||||
|
|
||||||
1| let {
|
1| let {
|
||||||
2| x = arg: assert arg == "y"; 123;
|
2| x = arg: assert arg == "y"; 123;
|
||||||
| ^
|
| ^
|
||||||
3|
|
3|
|
||||||
|
|
||||||
error: assertion '(arg == "y")' failed
|
error: assertion '(arg == "y")' failed
|
||||||
|
|
||||||
at /pwd/lang/eval-fail-assert.nix:2:12:
|
at /pwd/lang/eval-fail-assert.nix:2:12:
|
||||||
|
|
||||||
1| let {
|
1| let {
|
||||||
2| x = arg: assert arg == "y"; 123;
|
2| x = arg: assert arg == "y"; 123;
|
||||||
| ^
|
| ^
|
||||||
|
|
|
@ -1,17 +1,13 @@
|
||||||
error:
|
error:
|
||||||
… while evaluating the attribute 'puppy."${key}"'
|
… while evaluating the attribute 'puppy."${key}"'
|
||||||
|
|
||||||
at /pwd/lang/eval-fail-attr-name-type.nix:3:5:
|
at /pwd/lang/eval-fail-attr-name-type.nix:3:5:
|
||||||
|
|
||||||
2| attrs = {
|
2| attrs = {
|
||||||
3| puppy.doggy = {};
|
3| puppy.doggy = {};
|
||||||
| ^
|
| ^
|
||||||
4| };
|
4| };
|
||||||
|
|
||||||
… while evaluating an attribute name
|
… while evaluating an attribute name
|
||||||
|
|
||||||
at /pwd/lang/eval-fail-attr-name-type.nix:7:17:
|
at /pwd/lang/eval-fail-attr-name-type.nix:7:17:
|
||||||
|
|
||||||
6| in
|
6| in
|
||||||
7| attrs.puppy.${key}
|
7| attrs.puppy.${key}
|
||||||
| ^
|
| ^
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
error:
|
error:
|
||||||
… while evaluating a path segment
|
… while evaluating a path segment
|
||||||
|
|
||||||
at /pwd/lang/eval-fail-bad-string-interpolation-1.nix:1:2:
|
at /pwd/lang/eval-fail-bad-string-interpolation-1.nix:1:2:
|
||||||
|
|
||||||
1| "${x: x}"
|
1| "${x: x}"
|
||||||
| ^
|
| ^
|
||||||
2|
|
2|
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
error:
|
error:
|
||||||
… while evaluating a path segment
|
… while evaluating a path segment
|
||||||
|
|
||||||
at /pwd/lang/eval-fail-bad-string-interpolation-3.nix:1:3:
|
at /pwd/lang/eval-fail-bad-string-interpolation-3.nix:1:3:
|
||||||
|
|
||||||
1| ''${x: x}''
|
1| ''${x: x}''
|
||||||
| ^
|
| ^
|
||||||
2|
|
2|
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
error:
|
error:
|
||||||
… while evaluating a path segment
|
… while evaluating a path segment
|
||||||
|
|
||||||
at /pwd/lang/eval-fail-bad-string-interpolation-4.nix:9:3:
|
at /pwd/lang/eval-fail-bad-string-interpolation-4.nix:9:3:
|
||||||
|
|
||||||
8| # The error message should not be too long.
|
8| # The error message should not be too long.
|
||||||
9| ''${pkgs}''
|
9| ''${pkgs}''
|
||||||
| ^
|
| ^
|
||||||
|
|
|
@ -1,17 +1,13 @@
|
||||||
error:
|
error:
|
||||||
… while evaluating the attribute 'body'
|
… while evaluating the attribute 'body'
|
||||||
|
|
||||||
at /pwd/lang/eval-fail-blackhole.nix:2:3:
|
at /pwd/lang/eval-fail-blackhole.nix:2:3:
|
||||||
|
|
||||||
1| let {
|
1| let {
|
||||||
2| body = x;
|
2| body = x;
|
||||||
| ^
|
| ^
|
||||||
3| x = y;
|
3| x = y;
|
||||||
|
|
||||||
error: infinite recursion encountered
|
error: infinite recursion encountered
|
||||||
|
|
||||||
at /pwd/lang/eval-fail-blackhole.nix:3:7:
|
at /pwd/lang/eval-fail-blackhole.nix:3:7:
|
||||||
|
|
||||||
2| body = x;
|
2| body = x;
|
||||||
3| x = y;
|
3| x = y;
|
||||||
| ^
|
| ^
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
error:
|
error:
|
||||||
… while calling the 'length' builtin
|
… while calling the 'length' builtin
|
||||||
|
|
||||||
at /pwd/lang/eval-fail-call-primop.nix:1:1:
|
at /pwd/lang/eval-fail-call-primop.nix:1:1:
|
||||||
|
|
||||||
1| builtins.length 1
|
1| builtins.length 1
|
||||||
| ^
|
| ^
|
||||||
2|
|
2|
|
||||||
|
|
|
@ -1,24 +1,18 @@
|
||||||
error:
|
error:
|
||||||
… while calling the 'deepSeq' builtin
|
… while calling the 'deepSeq' builtin
|
||||||
|
|
||||||
at /pwd/lang/eval-fail-deepseq.nix:1:1:
|
at /pwd/lang/eval-fail-deepseq.nix:1:1:
|
||||||
|
|
||||||
1| builtins.deepSeq { x = abort "foo"; } 456
|
1| builtins.deepSeq { x = abort "foo"; } 456
|
||||||
| ^
|
| ^
|
||||||
2|
|
2|
|
||||||
|
|
||||||
… while evaluating the attribute 'x'
|
… while evaluating the attribute 'x'
|
||||||
|
|
||||||
at /pwd/lang/eval-fail-deepseq.nix:1:20:
|
at /pwd/lang/eval-fail-deepseq.nix:1:20:
|
||||||
|
|
||||||
1| builtins.deepSeq { x = abort "foo"; } 456
|
1| builtins.deepSeq { x = abort "foo"; } 456
|
||||||
| ^
|
| ^
|
||||||
2|
|
2|
|
||||||
|
|
||||||
… while calling the 'abort' builtin
|
… while calling the 'abort' builtin
|
||||||
|
|
||||||
at /pwd/lang/eval-fail-deepseq.nix:1:24:
|
at /pwd/lang/eval-fail-deepseq.nix:1:24:
|
||||||
|
|
||||||
1| builtins.deepSeq { x = abort "foo"; } 456
|
1| builtins.deepSeq { x = abort "foo"; } 456
|
||||||
| ^
|
| ^
|
||||||
2|
|
2|
|
||||||
|
|
|
@ -1,17 +1,13 @@
|
||||||
error:
|
error:
|
||||||
… while evaluating the attribute 'set'
|
… while evaluating the attribute 'set'
|
||||||
|
|
||||||
at /pwd/lang/eval-fail-dup-dynamic-attrs.nix:2:3:
|
at /pwd/lang/eval-fail-dup-dynamic-attrs.nix:2:3:
|
||||||
|
|
||||||
1| {
|
1| {
|
||||||
2| set = { "${"" + "b"}" = 1; };
|
2| set = { "${"" + "b"}" = 1; };
|
||||||
| ^
|
| ^
|
||||||
3| set = { "${"b" + ""}" = 2; };
|
3| set = { "${"b" + ""}" = 2; };
|
||||||
|
|
||||||
error: dynamic attribute 'b' already defined at /pwd/lang/eval-fail-dup-dynamic-attrs.nix:2:11
|
error: dynamic attribute 'b' already defined at /pwd/lang/eval-fail-dup-dynamic-attrs.nix:2:11
|
||||||
|
|
||||||
at /pwd/lang/eval-fail-dup-dynamic-attrs.nix:3:11:
|
at /pwd/lang/eval-fail-dup-dynamic-attrs.nix:3:11:
|
||||||
|
|
||||||
2| set = { "${"" + "b"}" = 1; };
|
2| set = { "${"" + "b"}" = 1; };
|
||||||
3| set = { "${"b" + ""}" = 2; };
|
3| set = { "${"b" + ""}" = 2; };
|
||||||
| ^
|
| ^
|
||||||
|
|
|
@ -1,35 +1,27 @@
|
||||||
error:
|
error:
|
||||||
… while calling the 'foldl'' builtin
|
… while calling the 'foldl'' builtin
|
||||||
|
|
||||||
at /pwd/lang/eval-fail-foldlStrict-strict-op-application.nix:2:1:
|
at /pwd/lang/eval-fail-foldlStrict-strict-op-application.nix:2:1:
|
||||||
|
|
||||||
1| # Tests that the result of applying op is forced even if the value is never used
|
1| # Tests that the result of applying op is forced even if the value is never used
|
||||||
2| builtins.foldl'
|
2| builtins.foldl'
|
||||||
| ^
|
| ^
|
||||||
3| (_: f: f null)
|
3| (_: f: f null)
|
||||||
|
|
||||||
… while calling anonymous lambda
|
… while calling anonymous lambda
|
||||||
|
|
||||||
at /pwd/lang/eval-fail-foldlStrict-strict-op-application.nix:3:7:
|
at /pwd/lang/eval-fail-foldlStrict-strict-op-application.nix:3:7:
|
||||||
|
|
||||||
2| builtins.foldl'
|
2| builtins.foldl'
|
||||||
3| (_: f: f null)
|
3| (_: f: f null)
|
||||||
| ^
|
| ^
|
||||||
4| null
|
4| null
|
||||||
|
|
||||||
… from call site
|
… from call site
|
||||||
|
|
||||||
at /pwd/lang/eval-fail-foldlStrict-strict-op-application.nix:3:10:
|
at /pwd/lang/eval-fail-foldlStrict-strict-op-application.nix:3:10:
|
||||||
|
|
||||||
2| builtins.foldl'
|
2| builtins.foldl'
|
||||||
3| (_: f: f null)
|
3| (_: f: f null)
|
||||||
| ^
|
| ^
|
||||||
4| null
|
4| null
|
||||||
|
|
||||||
… while calling anonymous lambda
|
… while calling anonymous lambda
|
||||||
|
|
||||||
at /pwd/lang/eval-fail-foldlStrict-strict-op-application.nix:5:6:
|
at /pwd/lang/eval-fail-foldlStrict-strict-op-application.nix:5:6:
|
||||||
|
|
||||||
4| null
|
4| null
|
||||||
5| [ (_: throw "Not the final value, but is still forced!") (_: 23) ]
|
5| [ (_: throw "Not the final value, but is still forced!") (_: 23) ]
|
||||||
| ^
|
| ^
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
error:
|
error:
|
||||||
… while calling the 'fromTOML' builtin
|
… while calling the 'fromTOML' builtin
|
||||||
|
|
||||||
at /pwd/lang/eval-fail-fromTOML-timestamps.nix:1:1:
|
at /pwd/lang/eval-fail-fromTOML-timestamps.nix:1:1:
|
||||||
|
|
||||||
1| builtins.fromTOML ''
|
1| builtins.fromTOML ''
|
||||||
| ^
|
| ^
|
||||||
2| key = "value"
|
2| key = "value"
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
error:
|
error:
|
||||||
… while calling the 'toString' builtin
|
… while calling the 'toString' builtin
|
||||||
|
|
||||||
at /pwd/lang/eval-fail-hashfile-missing.nix:4:3:
|
at /pwd/lang/eval-fail-hashfile-missing.nix:4:3:
|
||||||
|
|
||||||
3| in
|
3| in
|
||||||
4| toString (builtins.concatLists (map (hash: map (builtins.hashFile hash) paths) ["md5" "sha1" "sha256" "sha512"]))
|
4| toString (builtins.concatLists (map (hash: map (builtins.hashFile hash) paths) ["md5" "sha1" "sha256" "sha512"]))
|
||||||
| ^
|
| ^
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
error:
|
error:
|
||||||
… while evaluating one of the elements to concatenate
|
… while evaluating one of the elements to concatenate
|
||||||
|
|
||||||
at /pwd/lang/eval-fail-list.nix:1:2:
|
at /pwd/lang/eval-fail-list.nix:1:2:
|
||||||
|
|
||||||
1| 8++1
|
1| 8++1
|
||||||
| ^
|
| ^
|
||||||
2|
|
2|
|
||||||
|
|
|
@ -1,16 +1,12 @@
|
||||||
error:
|
error:
|
||||||
… from call site
|
… from call site
|
||||||
|
|
||||||
at /pwd/lang/eval-fail-missing-arg.nix:1:1:
|
at /pwd/lang/eval-fail-missing-arg.nix:1:1:
|
||||||
|
|
||||||
1| ({x, y, z}: x + y + z) {x = "foo"; z = "bar";}
|
1| ({x, y, z}: x + y + z) {x = "foo"; z = "bar";}
|
||||||
| ^
|
| ^
|
||||||
2|
|
2|
|
||||||
|
|
||||||
error: function 'anonymous lambda' called without required argument 'y'
|
error: function 'anonymous lambda' called without required argument 'y'
|
||||||
|
|
||||||
at /pwd/lang/eval-fail-missing-arg.nix:1:2:
|
at /pwd/lang/eval-fail-missing-arg.nix:1:2:
|
||||||
|
|
||||||
1| ({x, y, z}: x + y + z) {x = "foo"; z = "bar";}
|
1| ({x, y, z}: x + y + z) {x = "foo"; z = "bar";}
|
||||||
| ^
|
| ^
|
||||||
2|
|
2|
|
||||||
|
|
|
@ -1,16 +1,12 @@
|
||||||
error:
|
error:
|
||||||
… in the argument of the not operator
|
… in the argument of the not operator
|
||||||
|
|
||||||
at /pwd/lang/eval-fail-not-throws.nix:1:4:
|
at /pwd/lang/eval-fail-not-throws.nix:1:4:
|
||||||
|
|
||||||
1| ! (throw "uh oh!")
|
1| ! (throw "uh oh!")
|
||||||
| ^
|
| ^
|
||||||
2|
|
2|
|
||||||
|
|
||||||
… while calling the 'throw' builtin
|
… while calling the 'throw' builtin
|
||||||
|
|
||||||
at /pwd/lang/eval-fail-not-throws.nix:1:4:
|
at /pwd/lang/eval-fail-not-throws.nix:1:4:
|
||||||
|
|
||||||
1| ! (throw "uh oh!")
|
1| ! (throw "uh oh!")
|
||||||
| ^
|
| ^
|
||||||
2|
|
2|
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
error: path has a trailing slash
|
error: path has a trailing slash
|
||||||
|
|
||||||
at /pwd/lang/eval-fail-path-slash.nix:6:12:
|
at /pwd/lang/eval-fail-path-slash.nix:6:12:
|
||||||
|
|
||||||
5| # and https://nixos.org/nix-dev/2016-June/020829.html
|
5| # and https://nixos.org/nix-dev/2016-June/020829.html
|
||||||
6| /nix/store/
|
6| /nix/store/
|
||||||
| ^
|
| ^
|
||||||
|
|
|
@ -1,16 +1,12 @@
|
||||||
error:
|
error:
|
||||||
… in the right operand of the update (//) operator
|
… in the right operand of the update (//) operator
|
||||||
|
|
||||||
at /pwd/lang/eval-fail-recursion.nix:1:12:
|
at /pwd/lang/eval-fail-recursion.nix:1:12:
|
||||||
|
|
||||||
1| let a = {} // a; in a.foo
|
1| let a = {} // a; in a.foo
|
||||||
| ^
|
| ^
|
||||||
2|
|
2|
|
||||||
|
|
||||||
error: infinite recursion encountered
|
error: infinite recursion encountered
|
||||||
|
|
||||||
at /pwd/lang/eval-fail-recursion.nix:1:15:
|
at /pwd/lang/eval-fail-recursion.nix:1:15:
|
||||||
|
|
||||||
1| let a = {} // a; in a.foo
|
1| let a = {} // a; in a.foo
|
||||||
| ^
|
| ^
|
||||||
2|
|
2|
|
||||||
|
|
|
@ -1,17 +1,13 @@
|
||||||
error:
|
error:
|
||||||
… while evaluating the attribute 'body'
|
… while evaluating the attribute 'body'
|
||||||
|
|
||||||
at /pwd/lang/eval-fail-remove.nix:4:3:
|
at /pwd/lang/eval-fail-remove.nix:4:3:
|
||||||
|
|
||||||
3|
|
3|
|
||||||
4| body = (removeAttrs attrs ["x"]).x;
|
4| body = (removeAttrs attrs ["x"]).x;
|
||||||
| ^
|
| ^
|
||||||
5| }
|
5| }
|
||||||
|
|
||||||
error: attribute 'x' missing
|
error: attribute 'x' missing
|
||||||
|
|
||||||
at /pwd/lang/eval-fail-remove.nix:4:10:
|
at /pwd/lang/eval-fail-remove.nix:4:10:
|
||||||
|
|
||||||
3|
|
3|
|
||||||
4| body = (removeAttrs attrs ["x"]).x;
|
4| body = (removeAttrs attrs ["x"]).x;
|
||||||
| ^
|
| ^
|
||||||
|
|
|
@ -1,35 +1,27 @@
|
||||||
error:
|
error:
|
||||||
… while evaluating the attribute 'body'
|
… while evaluating the attribute 'body'
|
||||||
|
|
||||||
at /pwd/lang/eval-fail-scope-5.nix:8:3:
|
at /pwd/lang/eval-fail-scope-5.nix:8:3:
|
||||||
|
|
||||||
7|
|
7|
|
||||||
8| body = f {};
|
8| body = f {};
|
||||||
| ^
|
| ^
|
||||||
9|
|
9|
|
||||||
|
|
||||||
… from call site
|
… from call site
|
||||||
|
|
||||||
at /pwd/lang/eval-fail-scope-5.nix:8:10:
|
at /pwd/lang/eval-fail-scope-5.nix:8:10:
|
||||||
|
|
||||||
7|
|
7|
|
||||||
8| body = f {};
|
8| body = f {};
|
||||||
| ^
|
| ^
|
||||||
9|
|
9|
|
||||||
|
|
||||||
… while calling 'f'
|
… while calling 'f'
|
||||||
|
|
||||||
at /pwd/lang/eval-fail-scope-5.nix:6:7:
|
at /pwd/lang/eval-fail-scope-5.nix:6:7:
|
||||||
|
|
||||||
5|
|
5|
|
||||||
6| f = {x ? y, y ? x}: x + y;
|
6| f = {x ? y, y ? x}: x + y;
|
||||||
| ^
|
| ^
|
||||||
7|
|
7|
|
||||||
|
|
||||||
error: infinite recursion encountered
|
error: infinite recursion encountered
|
||||||
|
|
||||||
at /pwd/lang/eval-fail-scope-5.nix:6:12:
|
at /pwd/lang/eval-fail-scope-5.nix:6:12:
|
||||||
|
|
||||||
5|
|
5|
|
||||||
6| f = {x ? y, y ? x}: x + y;
|
6| f = {x ? y, y ? x}: x + y;
|
||||||
| ^
|
| ^
|
||||||
|
|
|
@ -1,16 +1,12 @@
|
||||||
error:
|
error:
|
||||||
… while calling the 'seq' builtin
|
… while calling the 'seq' builtin
|
||||||
|
|
||||||
at /pwd/lang/eval-fail-seq.nix:1:1:
|
at /pwd/lang/eval-fail-seq.nix:1:1:
|
||||||
|
|
||||||
1| builtins.seq (abort "foo") 2
|
1| builtins.seq (abort "foo") 2
|
||||||
| ^
|
| ^
|
||||||
2|
|
2|
|
||||||
|
|
||||||
… while calling the 'abort' builtin
|
… while calling the 'abort' builtin
|
||||||
|
|
||||||
at /pwd/lang/eval-fail-seq.nix:1:15:
|
at /pwd/lang/eval-fail-seq.nix:1:15:
|
||||||
|
|
||||||
1| builtins.seq (abort "foo") 2
|
1| builtins.seq (abort "foo") 2
|
||||||
| ^
|
| ^
|
||||||
2|
|
2|
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
error: undefined variable 'x'
|
error: undefined variable 'x'
|
||||||
|
|
||||||
at /pwd/lang/eval-fail-set.nix:1:3:
|
at /pwd/lang/eval-fail-set.nix:1:3:
|
||||||
|
|
||||||
1| 8.x
|
1| 8.x
|
||||||
| ^
|
| ^
|
||||||
2|
|
2|
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
error:
|
error:
|
||||||
… while calling the 'substring' builtin
|
… while calling the 'substring' builtin
|
||||||
|
|
||||||
at /pwd/lang/eval-fail-substring.nix:1:1:
|
at /pwd/lang/eval-fail-substring.nix:1:1:
|
||||||
|
|
||||||
1| builtins.substring (builtins.sub 0 1) 1 "x"
|
1| builtins.substring (builtins.sub 0 1) 1 "x"
|
||||||
| ^
|
| ^
|
||||||
2|
|
2|
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
error:
|
error:
|
||||||
… while calling the 'toPath' builtin
|
… while calling the 'toPath' builtin
|
||||||
|
|
||||||
at /pwd/lang/eval-fail-to-path.nix:1:1:
|
at /pwd/lang/eval-fail-to-path.nix:1:1:
|
||||||
|
|
||||||
1| builtins.toPath "foo/bar"
|
1| builtins.toPath "foo/bar"
|
||||||
| ^
|
| ^
|
||||||
2|
|
2|
|
||||||
|
|
|
@ -1,25 +1,19 @@
|
||||||
error:
|
error:
|
||||||
… while calling the 'toJSON' builtin
|
… while calling the 'toJSON' builtin
|
||||||
|
|
||||||
at /pwd/lang/eval-fail-toJSON.nix:1:1:
|
at /pwd/lang/eval-fail-toJSON.nix:1:1:
|
||||||
|
|
||||||
1| builtins.toJSON {
|
1| builtins.toJSON {
|
||||||
| ^
|
| ^
|
||||||
2| a.b = [
|
2| a.b = [
|
||||||
|
|
||||||
… while evaluating attribute 'a'
|
… while evaluating attribute 'a'
|
||||||
|
|
||||||
at /pwd/lang/eval-fail-toJSON.nix:2:3:
|
at /pwd/lang/eval-fail-toJSON.nix:2:3:
|
||||||
|
|
||||||
1| builtins.toJSON {
|
1| builtins.toJSON {
|
||||||
2| a.b = [
|
2| a.b = [
|
||||||
| ^
|
| ^
|
||||||
3| true
|
3| true
|
||||||
|
|
||||||
… while evaluating attribute 'b'
|
… while evaluating attribute 'b'
|
||||||
|
|
||||||
at /pwd/lang/eval-fail-toJSON.nix:2:3:
|
at /pwd/lang/eval-fail-toJSON.nix:2:3:
|
||||||
|
|
||||||
1| builtins.toJSON {
|
1| builtins.toJSON {
|
||||||
2| a.b = [
|
2| a.b = [
|
||||||
| ^
|
| ^
|
||||||
|
@ -28,27 +22,21 @@ error:
|
||||||
… while evaluating list element at index 3
|
… while evaluating list element at index 3
|
||||||
|
|
||||||
… while evaluating attribute 'c'
|
… while evaluating attribute 'c'
|
||||||
|
|
||||||
at /pwd/lang/eval-fail-toJSON.nix:7:7:
|
at /pwd/lang/eval-fail-toJSON.nix:7:7:
|
||||||
|
|
||||||
6| {
|
6| {
|
||||||
7| c.d = throw "hah no";
|
7| c.d = throw "hah no";
|
||||||
| ^
|
| ^
|
||||||
8| }
|
8| }
|
||||||
|
|
||||||
… while evaluating attribute 'd'
|
… while evaluating attribute 'd'
|
||||||
|
|
||||||
at /pwd/lang/eval-fail-toJSON.nix:7:7:
|
at /pwd/lang/eval-fail-toJSON.nix:7:7:
|
||||||
|
|
||||||
6| {
|
6| {
|
||||||
7| c.d = throw "hah no";
|
7| c.d = throw "hah no";
|
||||||
| ^
|
| ^
|
||||||
8| }
|
8| }
|
||||||
|
|
||||||
… while calling the 'throw' builtin
|
… while calling the 'throw' builtin
|
||||||
|
|
||||||
at /pwd/lang/eval-fail-toJSON.nix:7:13:
|
at /pwd/lang/eval-fail-toJSON.nix:7:13:
|
||||||
|
|
||||||
6| {
|
6| {
|
||||||
7| c.d = throw "hah no";
|
7| c.d = throw "hah no";
|
||||||
| ^
|
| ^
|
||||||
|
|
|
@ -1,16 +1,12 @@
|
||||||
error:
|
error:
|
||||||
… from call site
|
… from call site
|
||||||
|
|
||||||
at /pwd/lang/eval-fail-undeclared-arg.nix:1:1:
|
at /pwd/lang/eval-fail-undeclared-arg.nix:1:1:
|
||||||
|
|
||||||
1| ({x, z}: x + z) {x = "foo"; y = "bla"; z = "bar";}
|
1| ({x, z}: x + z) {x = "foo"; y = "bla"; z = "bar";}
|
||||||
| ^
|
| ^
|
||||||
2|
|
2|
|
||||||
|
|
||||||
error: function 'anonymous lambda' called with unexpected argument 'y'
|
error: function 'anonymous lambda' called with unexpected argument 'y'
|
||||||
|
|
||||||
at /pwd/lang/eval-fail-undeclared-arg.nix:1:2:
|
at /pwd/lang/eval-fail-undeclared-arg.nix:1:2:
|
||||||
|
|
||||||
1| ({x, z}: x + z) {x = "foo"; y = "bla"; z = "bar";}
|
1| ({x, z}: x + z) {x = "foo"; y = "bla"; z = "bar";}
|
||||||
| ^
|
| ^
|
||||||
2|
|
2|
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
error:
|
error:
|
||||||
… while evaluating an attribute name
|
… while evaluating an attribute name
|
||||||
|
|
||||||
at /pwd/lang/eval-fail-using-set-as-attr-name.nix:5:10:
|
at /pwd/lang/eval-fail-using-set-as-attr-name.nix:5:10:
|
||||||
|
|
||||||
4| in
|
4| in
|
||||||
5| attr.${key}
|
5| attr.${key}
|
||||||
| ^
|
| ^
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
error: attribute 'x' already defined at «stdin»:1:3
|
error: attribute 'x' already defined at «stdin»:1:3
|
||||||
|
|
||||||
at «stdin»:3:3:
|
at «stdin»:3:3:
|
||||||
|
|
||||||
2| y = 456;
|
2| y = 456;
|
||||||
3| x = 789;
|
3| x = 789;
|
||||||
| ^
|
| ^
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
error: attribute 'x' already defined at «stdin»:9:5
|
error: attribute 'x' already defined at «stdin»:9:5
|
||||||
|
|
||||||
at «stdin»:10:17:
|
at «stdin»:10:17:
|
||||||
|
|
||||||
9| x = 789;
|
9| x = 789;
|
||||||
10| inherit (as) x;
|
10| inherit (as) x;
|
||||||
| ^
|
| ^
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
error: attribute 'x' already defined at «stdin»:9:5
|
error: attribute 'x' already defined at «stdin»:9:5
|
||||||
|
|
||||||
at «stdin»:10:17:
|
at «stdin»:10:17:
|
||||||
|
|
||||||
9| x = 789;
|
9| x = 789;
|
||||||
10| inherit (as) x;
|
10| inherit (as) x;
|
||||||
| ^
|
| ^
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
error: attribute 'services.ssh.port' already defined at «stdin»:2:3
|
error: attribute 'services.ssh.port' already defined at «stdin»:2:3
|
||||||
|
|
||||||
at «stdin»:3:3:
|
at «stdin»:3:3:
|
||||||
|
|
||||||
2| services.ssh.port = 22;
|
2| services.ssh.port = 22;
|
||||||
3| services.ssh.port = 23;
|
3| services.ssh.port = 23;
|
||||||
| ^
|
| ^
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
error: attribute 'x' already defined at «stdin»:6:12
|
error: attribute 'x' already defined at «stdin»:6:12
|
||||||
|
|
||||||
at «stdin»:7:12:
|
at «stdin»:7:12:
|
||||||
|
|
||||||
6| inherit x;
|
6| inherit x;
|
||||||
7| inherit x;
|
7| inherit x;
|
||||||
| ^
|
| ^
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
error: duplicate formal function argument 'x'
|
error: duplicate formal function argument 'x'
|
||||||
|
|
||||||
at «stdin»:1:8:
|
at «stdin»:1:8:
|
||||||
|
|
||||||
1| {x, y, x}: x
|
1| {x, y, x}: x
|
||||||
| ^
|
| ^
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
error: syntax error, unexpected end of file, expecting '"'
|
error: syntax error, unexpected end of file, expecting '"'
|
||||||
|
|
||||||
at «stdin»:3:5:
|
at «stdin»:3:5:
|
||||||
|
|
||||||
2| # Note that this file must not end with a newline.
|
2| # Note that this file must not end with a newline.
|
||||||
3| a 1"$
|
3| a 1"$
|
||||||
| ^
|
| ^
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
error: attribute 'z' already defined at «stdin»:3:16
|
error: attribute 'z' already defined at «stdin»:3:16
|
||||||
|
|
||||||
at «stdin»:2:3:
|
at «stdin»:2:3:
|
||||||
|
|
||||||
1| {
|
1| {
|
||||||
2| x.z = 3;
|
2| x.z = 3;
|
||||||
| ^
|
| ^
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
error: attribute 'y' already defined at «stdin»:3:9
|
error: attribute 'y' already defined at «stdin»:3:9
|
||||||
|
|
||||||
at «stdin»:2:3:
|
at «stdin»:2:3:
|
||||||
|
|
||||||
1| {
|
1| {
|
||||||
2| x.y.y = 3;
|
2| x.y.y = 3;
|
||||||
| ^
|
| ^
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
error: duplicate formal function argument 'args'
|
error: duplicate formal function argument 'args'
|
||||||
|
|
||||||
at «stdin»:1:1:
|
at «stdin»:1:1:
|
||||||
|
|
||||||
1| args@{args, x, y, z}: x
|
1| args@{args, x, y, z}: x
|
||||||
| ^
|
| ^
|
||||||
2|
|
2|
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
error: undefined variable 'gcc'
|
error: undefined variable 'gcc'
|
||||||
|
|
||||||
at «stdin»:8:12:
|
at «stdin»:8:12:
|
||||||
|
|
||||||
7|
|
7|
|
||||||
8| body = ({
|
8| body = ({
|
||||||
| ^
|
| ^
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
error: syntax error, unexpected ':', expecting '}'
|
error: syntax error, unexpected ':', expecting '}'
|
||||||
|
|
||||||
at «stdin»:3:13:
|
at «stdin»:3:13:
|
||||||
|
|
||||||
2|
|
2|
|
||||||
3| f = {x, y :
|
3| f = {x, y :
|
||||||
| ^
|
| ^
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
error: undefined variable 'y'
|
error: undefined variable 'y'
|
||||||
|
|
||||||
at «stdin»:1:4:
|
at «stdin»:1:4:
|
||||||
|
|
||||||
1| x: y
|
1| x: y
|
||||||
| ^
|
| ^
|
||||||
2|
|
2|
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
error: syntax error, unexpected invalid token, expecting end of file
|
error: syntax error, unexpected invalid token, expecting end of file
|
||||||
|
|
||||||
at «stdin»:1:5:
|
at «stdin»:1:5:
|
||||||
|
|
||||||
1| 123 Ã
|
1| 123 Ã
|
||||||
| ^
|
| ^
|
||||||
|
|
Loading…
Reference in a new issue