-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds the failing value to `value is <TYPE> while a <TYPE> is expected` error messages.
- Loading branch information
Showing
15 changed files
with
254 additions
and
130 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
synopsis: Type errors include the failing value | ||
issues: #561 | ||
prs: #9554 | ||
description: { | ||
|
||
In errors like `value is an integer while a list was expected`, the message now | ||
includes the failing value. | ||
|
||
Before: | ||
|
||
``` | ||
error: | ||
… while calling the 'splitVersion' builtin | ||
at bad.nix:5:3: | ||
4| in | ||
5| builtins.splitVersion pkgs.haskell.compiler | ||
| ^ | ||
6| | ||
… while evaluating the first argument passed to builtins.splitVersion | ||
at «none»:0: (source not available) | ||
error: value is a set while a string was expected | ||
``` | ||
|
||
After: | ||
|
||
``` | ||
error: | ||
… while calling the 'splitVersion' builtin | ||
at bad.nix:5:3: | ||
4| in | ||
5| builtins.splitVersion pkgs.haskell.compiler | ||
| ^ | ||
6| | ||
… while evaluating the first argument passed to builtins.splitVersion | ||
error: value is a set while a string was expected: { ghc810 = <CODE>; | ||
ghc8102Binary = <CODE>; ghc8102BinaryMinimal = <CODE>; ghc8107 = <CODE>; | ||
ghc8107Binary = <CODE>; ghc8107BinaryMinimal = <CODE>; ghc865Binary = | ||
<CODE>; ghc88 = <CODE>; ghc884 = <CODE>; ghc90 = <CODE>; ghc902 = | ||
<CODE>; ghc92 = <CODE>; ghc924 = <CODE>; ghc924Binary = <CODE>; | ||
ghc924BinaryMinimal = <CODE>; ghc94 = <CODE>; ghc942 = <CODE>; ghcHEAD = | ||
<CODE>; ghcjs = <CODE>; ghcjs810 = <CODE>; integer-simple = <CODE>; | ||
native-bignum = <CODE>; } | ||
``` | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
#include "print-ambiguous.hh" | ||
#include "print.hh" | ||
#include "signals.hh" | ||
#include "eval.hh" | ||
|
||
namespace nix { | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
error: | ||
… while evaluating the `__overrides` attribute | ||
|
||
error: value is an integer while a set was expected | ||
error: value is an integer while a set was expected: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.