-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add location to import error messages
This is crude but helpful. See #40
- Loading branch information
Showing
11 changed files
with
81 additions
and
10 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
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 +1,6 @@ | ||
MissingEnvVar | ||
Type error: error: error | ||
--> <current file>:1:45 | ||
| | ||
1 | env:UNSET1 as Text ? env:UNSET2 ? missing ? env:UNSET3 | ||
| ^^^^^^^^^^ MissingEnvVar | ||
| |
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 +1,6 @@ | ||
Missing | ||
Type error: error: error | ||
--> <current file>:1:13 | ||
| | ||
1 | env:UNSET ? missing | ||
| ^^^^^^^ Missing | ||
| |
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 +1,16 @@ | ||
ImportCycle([Local("./dhall-lang/tests/import/data/cycle.dhall"), Local("./dhall-lang/tests/import/failure/cycle.dhall")], Local("./dhall-lang/tests/import/data/cycle.dhall")) | ||
Type error: error: error | ||
--> <current file>:1:1 | ||
| | ||
1 | ../data/cycle.dhall | ||
| ^^^^^^^^^^^^^^^^^^^ Type error: error: error | ||
--> <current file>:1:1 | ||
| | ||
1 | ../failure/cycle.dhall | ||
| ^^^^^^^^^^^^^^^^^^^^^^ Type error: error: error | ||
--> <current file>:1:1 | ||
| | ||
1 | ../data/cycle.dhall | ||
| ^^^^^^^^^^^^^^^^^^^ ImportCycle([Local("./dhall-lang/tests/import/data/cycle.dhall"), Local("./dhall-lang/tests/import/failure/cycle.dhall")], Local("./dhall-lang/tests/import/data/cycle.dhall")) | ||
| | ||
| | ||
| |
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,7 +1,12 @@ | ||
Type error: error: unbound variable `x` | ||
Type error: error: error | ||
--> <current file>:1:15 | ||
| | ||
1 | \(x: Bool) -> ../data/importBoundary.dhall | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Type error: error: unbound variable `x` | ||
--> <current file>:1:1 | ||
| | ||
... | ||
3 | x | ||
| ^ not found in this scope | ||
| | ||
| |
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 +1,6 @@ | ||
Missing | ||
Type error: error: error | ||
--> <current file>:1:1 | ||
| | ||
1 | missing | ||
| ^^^^^^^ Missing | ||
| |
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 +1,12 @@ | ||
SanityCheck | ||
Type error: error: error | ||
--> <current file>:6:1 | ||
| | ||
1 | {- The following remote import attempts to import an environment variable, which | ||
2 | must be disallowed by the referential sanity check | ||
3 | | ||
4 | One reason for doing this is to protect against remote imports exfiltrating | ||
... | ||
12 | -} | ||
13 | https://raw.githubusercontent.com/dhall-lang/dhall-lang/master/tests/import/data/referentiallyOpaque.dhall | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SanityCheck | ||
| |
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 +1,6 @@ | ||
MissingEnvVar | ||
Type error: error: error | ||
--> <current file>:1:1 | ||
| | ||
1 | env:DHALL_TEST_UNSET | ||
| ^^^^^^^^^^^^^^^^^^^^ MissingEnvVar | ||
| |
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 +1,6 @@ | ||
MissingEnvVar | ||
Type error: error: error | ||
--> <current file>:1:1 | ||
| | ||
1 | env:DHALL_TEST_UNSET as Text | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ MissingEnvVar | ||
| |
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 @@ | ||
./not-a-file.dhall |
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,6 @@ | ||
Type error: error: error | ||
--> <current file>:1:1 | ||
| | ||
1 | ./not-a-file.dhall | ||
| ^^^^^^^^^^^^^^^^^^ No such file or directory (os error 2) | ||
| |