-
Notifications
You must be signed in to change notification settings - Fork 118
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: enhance cycle deps error message (#1639)
* feat: enhance cycle deps error message Signed-off-by: he1pa <[email protected]> * fix: fix ut Signed-off-by: he1pa <[email protected]> * fix ut Signed-off-by: he1pa <[email protected]> * remove unwrap and extra magic var __main__ Signed-off-by: he1pa <[email protected]> * use SchemaType::full_ty_str() to calculate schame name in cycle Signed-off-by: he1pa <[email protected]> * use full_ty_str() to calculate schame name in cycle Signed-off-by: he1pa <[email protected]> --------- Signed-off-by: he1pa <[email protected]>
- Loading branch information
Showing
13 changed files
with
219 additions
and
87 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
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,6 +1,13 @@ | ||
error[E2L23]: CompileError | ||
--> ${CWD}/module.k:2:1 | ||
| | ||
2 | import main | ||
| ^ There is a circular reference between modules module, main | ||
| | ||
|
||
error[E2L23]: CompileError | ||
--> ${CWD}/main.k:1:1 | ||
| | ||
1 | import module | ||
| ^ There is a circular import reference between module main and module | ||
| ^ There is a circular reference between modules module, main | ||
| |
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,3 @@ | ||
error[E2L23]: CompileError | ||
--> ${CWD}/main.k:1:1 | ||
| | ||
1 | import main | ||
| ^ There is a circular import reference between module main and main | ||
| | ||
error[E3M38]: error[E1001]: RecursiveLoad | ||
Could not compiles due to cyclic import statements | ||
- ${CWD}/main.k |
9 changes: 8 additions & 1 deletion
9
test/grammar/schema/inherit/cycle_inherit_fail_0/stderr.golden
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,13 @@ | ||
error[E2L23]: CompileError | ||
--> ${CWD}/main.k:1:8 | ||
| | ||
1 | schema Parent(Son): | ||
| ^ There is a circular reference between schemas Parent, Son | ||
| | ||
|
||
error[E2L23]: CompileError | ||
--> ${CWD}/main.k:4:8 | ||
| | ||
4 | schema Son(Parent): | ||
| ^ There is a circular reference between schema Son and Parent | ||
| ^ There is a circular reference between schemas Parent, Son | ||
| |
Oops, something went wrong.