Skip to content
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

Alternative message reporting modes #10863

Merged
merged 67 commits into from
Mar 14, 2023
Merged
Changes from 1 commit
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
1daf95a
Avoid some 'Called from macro here' errors
kLabz Nov 30, 2022
f5b4d32
Add nesting level data to errors
kLabz Nov 30, 2022
d6b6d59
Add verbose error reporting
kLabz Nov 30, 2022
b08f30b
Use ExtString.String.starts_with
kLabz Nov 30, 2022
b64fba0
Rename to pretty-errors
kLabz Nov 30, 2022
dd398b0
Some cleanup
kLabz Nov 30, 2022
c5b82ad
Expose nesting level parameter to message emiting API
kLabz Nov 30, 2022
ca9c805
Better handling of invalid positions
kLabz Nov 30, 2022
e8a6840
Rewrite into generic -D message-reporting=[format] feature
kLabz Dec 7, 2022
5fd394f
Handle non-ascii characters in sources
kLabz Dec 7, 2022
a834ac6
Implement -D message-reporting=diagnostics
kLabz Dec 7, 2022
34b8f2b
Add Info prefix to info messages
kLabz Dec 13, 2022
f135ae6
Properly close log file
kLabz Dec 13, 2022
4c3e493
Only add 'Info : ' prefix in diagnostics mode
kLabz Dec 13, 2022
18dbafb
Error handling and directory creation for log file
kLabz Dec 13, 2022
2b6abd1
Whitespace
kLabz Dec 13, 2022
3b6154b
Error reporting specific defines shouldn't trigger new context
kLabz Jan 17, 2023
540cc3f
Rename indented message display mode
kLabz Mar 10, 2023
e303cb1
[tests] Add pretty test output for 6065
kLabz Mar 10, 2023
362d31f
Avoid adding useless whitespace on empty lines
kLabz Mar 10, 2023
d13c202
Cleanup source resolution, fix files not ending with empty line
kLabz Mar 10, 2023
12f6ed4
[tests] Add pretty test output for 5644
kLabz Mar 10, 2023
e34f19e
Avoid adding useless whitespace with multiline positions
kLabz Mar 10, 2023
8622ae7
[tests] Add pretty test output for 6584
kLabz Mar 10, 2023
f996506
[tests] Add pretty test output for 6790
kLabz Mar 10, 2023
92ba3b9
[tests] Add pretty test output for 6796
kLabz Mar 10, 2023
99c969a
[tests] Add pretty test output for 7968
kLabz Mar 10, 2023
dffec0d
Fix indent reporting mode, add error message
kLabz Mar 10, 2023
d4ce284
[tests] Add indent test output for 6065
kLabz Mar 10, 2023
d638f3a
[tests] Add pretty and indent test output for 5949
kLabz Mar 10, 2023
c0c32a3
Improve conditions for displaying error headings
kLabz Mar 10, 2023
b603fdd
[tests] Add pretty test output for 8471
kLabz Mar 10, 2023
f178145
Indent message reporting: indent su errors instead of prefixing with ...
kLabz Mar 11, 2023
1a2029a
[tests] Add pretty and indent tests output for 6810
kLabz Mar 11, 2023
cb0cae2
[tests] Add pretty and indent tests output for 10844
kLabz Mar 11, 2023
e96d8f1
[tests] Update indent test output for 6065
kLabz Mar 11, 2023
449e6f4
[test] remove haxe -version output check
kLabz Mar 11, 2023
fb42c80
Also remove '...' prefixes to single line errors in indent mode
kLabz Mar 11, 2023
913f19f
Carry position with compiler errors
kLabz Mar 12, 2023
862dd0f
[tests] Add pretty and indent tests output for 8303
kLabz Mar 12, 2023
5bd5d89
Position marker for single char positions
kLabz Mar 13, 2023
f9aef6c
Don't nest first element of Stack errors
kLabz Mar 13, 2023
30376a0
[tests] update pretty/indent tests
kLabz Mar 13, 2023
b9b40ec
nesting_level -> depth
kLabz Mar 13, 2023
a73f2e5
A bit of cleanup
kLabz Mar 13, 2023
2f0bd63
Cleanup typing_error
kLabz Mar 13, 2023
c0a5ef8
Cleanup display_error
kLabz Mar 13, 2023
a7de883
Add std path resolution to misc tests output checks
kLabz Mar 13, 2023
d825cf5
More nesting level -> depth changes
kLabz Mar 13, 2023
c72401b
[tests] only normalize root of std path
kLabz Mar 13, 2023
d37916a
Fix missing depth
kLabz Mar 13, 2023
d01c101
Update doc
kLabz Mar 13, 2023
c930cfc
Add another test for 4803
kLabz Mar 13, 2023
fad493e
Internal errors handling
kLabz Mar 13, 2023
b098fb8
[tests] don't resolve real path of std root since eval doesn't
kLabz Mar 13, 2023
60f50c5
[tests] remove test with different outcome on all platforms
kLabz Mar 14, 2023
a901502
[ci] use predictable std path for misc tests
kLabz Mar 14, 2023
4295d5b
[tests] No need for Context
kLabz Mar 14, 2023
b405fef
[tests] add log file tests
kLabz Mar 14, 2023
ca40974
Handle stack in located_typing_error
kLabz Mar 14, 2023
4b243a3
Reduce diff
kLabz Mar 14, 2023
5febce4
Whitespace
kLabz Mar 14, 2023
ae59be4
Add comment
kLabz Mar 14, 2023
3b07613
Reduce diff
kLabz Mar 14, 2023
882fe67
Change compiler_message from tuple to record
kLabz Mar 14, 2023
58ee66d
[tests] Add missing test output for 10844
kLabz Mar 14, 2023
baa094e
[skip ci] add comments
kLabz Mar 14, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
[skip ci] add comments
  • Loading branch information
kLabz committed Mar 14, 2023
commit baa094e009cceadef9a9cf7d9202bc1b919041a9
4 changes: 2 additions & 2 deletions src/core/error.ml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ and type_not_found_reason =
| Private_type
| Not_defined

exception Fatal_error of Globals.located * int
exception Error of error_msg * Globals.pos * int
exception Fatal_error of Globals.located * int (* depth *)
exception Error of error_msg * Globals.pos * int (* depth *)

let string_source t = match follow t with
| TInst(c,tl) -> PMap.foldi (fun s _ acc -> s :: acc) (TClass.get_all_fields c tl) []
Expand Down