-
Notifications
You must be signed in to change notification settings - Fork 463
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clean up Super_error #6199
Merged
Merged
Clean up Super_error #6199
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
8db4e2f
add tests
mununki 4b8c3ee
error message with loc of repeated definition
mununki 4ec6771
changelog
mununki 2bd9366
clean up
mununki 6a76c51
clean up super_error
mununki 9706da8
use Location.print_loc
mununki 10ac8c0
move some tests from ounit to super_errors
mununki 9d4e302
changelog
mununki 8d8bf81
remove unused ounit tests
mununki 4ecaeb3
changelog
mununki 2c24e15
changelog
mununki File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
12 changes: 12 additions & 0 deletions
12
jscomp/build_tests/super_errors/expected/repeated_def_extension_constr.res.expected
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,12 @@ | ||
|
||
[1;31mWe've found a bug for you![0m | ||
[36m/.../fixtures/repeated_def_extension_constr.res[0m:[2m3:6[0m | ||
|
||
1 [2m│[0m type a = .. | ||
2 [2m│[0m | ||
[1;31m3[0m [2m│[0m type [1;31ma[0m | ||
4 [2m│[0m | ||
|
||
Multiple definition of the type name a | ||
at [1m[36m/.../fixtures/repeated_def_extension_constr.res[0m:[2m1:6[0m[0m | ||
Names must be unique in a given structure or signature. |
12 changes: 12 additions & 0 deletions
12
jscomp/build_tests/super_errors/expected/repeated_def_module_types.res.expected
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,12 @@ | ||
|
||
[1;31mWe've found a bug for you![0m | ||
[36m/.../fixtures/repeated_def_module_types.res[0m:[2m3:13[0m | ||
|
||
1 [2m│[0m module type M = {} | ||
2 [2m│[0m | ||
[1;31m3[0m [2m│[0m module type [1;31mM[0m = {} | ||
4 [2m│[0m | ||
|
||
Multiple definition of the module type name M | ||
at [1m[36m/.../fixtures/repeated_def_module_types.res[0m:[2m1:13[0m[0m | ||
Names must be unique in a given structure or signature. |
12 changes: 12 additions & 0 deletions
12
jscomp/build_tests/super_errors/expected/repeated_def_modules.res.expected
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,12 @@ | ||
|
||
[1;31mWe've found a bug for you![0m | ||
[36m/.../fixtures/repeated_def_modules.res[0m:[2m3:8[0m | ||
|
||
1 [2m│[0m module M = {} | ||
2 [2m│[0m | ||
[1;31m3[0m [2m│[0m module [1;31mM[0m = {} | ||
4 [2m│[0m | ||
|
||
Multiple definition of the module name M | ||
at [1m[36m/.../fixtures/repeated_def_modules.res[0m:[2m1:8[0m[0m | ||
Names must be unique in a given structure or signature. |
12 changes: 12 additions & 0 deletions
12
jscomp/build_tests/super_errors/expected/repeated_def_types.res.expected
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,12 @@ | ||
|
||
[1;31mWe've found a bug for you![0m | ||
[36m/.../fixtures/repeated_def_types.res[0m:[2m3:6[0m | ||
cristianoc marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
1 [2m│[0m type a | ||
2 [2m│[0m | ||
[1;31m3[0m [2m│[0m type [1;31ma[0m | ||
4 [2m│[0m | ||
|
||
Multiple definition of the type name a | ||
at [1m[36m/.../fixtures/repeated_def_types.res[0m:[2m1:6[0m[0m | ||
Names must be unique in a given structure or signature. |
14 changes: 14 additions & 0 deletions
14
jscomp/build_tests/super_errors/expected/type2.res.expected
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,14 @@ | ||
|
||
[1;31mWe've found a bug for you![0m | ||
[36m/.../fixtures/type2.res[0m:[2m6:11-13[0m | ||
|
||
4 [2m│[0m let () = { | ||
5 [2m│[0m push(a, 3)->ignore | ||
[1;31m6[0m [2m│[0m push(a, [1;31m"3"[0m)->ignore | ||
7 [2m│[0m } | ||
8 [2m│[0m | ||
|
||
This has type: [1;31mstring[0m | ||
Somewhere wanted: [1;33mint[0m | ||
|
||
You can convert [1;33mstring[0m to [1;33mint[0m with [1;33mBelt.Int.fromString[0m. |
13 changes: 13 additions & 0 deletions
13
jscomp/build_tests/super_errors/expected/type3.res.expected
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,13 @@ | ||
|
||
[1;31mWe've found a bug for you![0m | ||
[36m/.../fixtures/type3.res[0m:[2m1:5[0m | ||
|
||
[1;31m1[0m [2m│[0m let [1;31mu[0m = [] | ||
2 [2m│[0m | ||
|
||
This expression's type contains type variables that cannot be generalized: | ||
[1;31marray<'_weak1>[0m | ||
|
||
This happens when the type system senses there's a mutation/side-effect, | ||
in combination with a polymorphic value. | ||
[1;33mUsing or annotating that value usually solves it.[0m |
3 changes: 3 additions & 0 deletions
3
jscomp/build_tests/super_errors/fixtures/repeated_def_extension_constr.res
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,3 @@ | ||
type a = .. | ||
|
||
type a |
3 changes: 3 additions & 0 deletions
3
jscomp/build_tests/super_errors/fixtures/repeated_def_module_types.res
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,3 @@ | ||
module type M = {} | ||
|
||
module type M = {} |
3 changes: 3 additions & 0 deletions
3
jscomp/build_tests/super_errors/fixtures/repeated_def_modules.res
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,3 @@ | ||
module M = {} | ||
|
||
module M = {} |
3 changes: 3 additions & 0 deletions
3
jscomp/build_tests/super_errors/fixtures/repeated_def_types.res
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,3 @@ | ||
type a | ||
|
||
type a |
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,7 @@ | ||
@send external push: (array<'a>, 'a) => unit = "push" | ||
|
||
let a = [] | ||
let () = { | ||
push(a, 3)->ignore | ||
push(a, "3")->ignore | ||
} |
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 @@ | ||
let u = [] |
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
File renamed without changes.
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps mention this as breaking change in the changelog.
I don't think there's any use for calling
bsc
directly, but just to be on the safe side.Isn't there also something in
bsconfig
? Perhaps one could deprecate or remove that too.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can add it to the changelog as a breaking change, but how do I deprecate it when I've already removed the super_error? There is a way to make it deprecated?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is low risk. Remove is OK. No need to deprecate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
4ecaeb3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2c24e15