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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Operation beautify error messages #1521
Merged
felixmulder
merged 53 commits into
scala:master
from
felixmulder:topic/better-errormessages
Oct 10, 2016
Merged
Changes from all commits
Commits
Show all changes
53 commits
Select commit
Hold shift + click to select a range
281dbb5
Add initial structure for improved explanations of error messages
felixmulder a699758
Add highlighter string interpolator
felixmulder d2c9e19
Return iterable from highlighting function instead of vector
felixmulder 6495210
Add highlighting for `???`
felixmulder e4a7db1
Simplify "hl" interpolator
felixmulder 66f7f7d
Use highlighting in explanation classes
felixmulder c9a8bb8
Add more examples to Typer
felixmulder 1946f94
Change layout of ErrorMessages
felixmulder 11cfc30
Add missing star in docstring
felixmulder 15db5f6
Add smart comment formatting in ConsoleReporter
felixmulder f8456fc
Add error kind to diagnostic
felixmulder fb4f8ce
Rename `ConsoleReporter` => `FancyConsoleReporter`
felixmulder 12ac305
Add ability to choose between fancy and non-fancy output
felixmulder 18a69f7
Rename Diagnostic to diagnostic.Message
felixmulder 2b2cfe7
Refactor common error messages to `diagnostic.basic`
felixmulder 2764609
Complete better structure to diagnostic messages
felixmulder 15dfb56
Add coloring util
felixmulder 30b5410
Factor out explanation header to Reporter
felixmulder 5c24377
Add `MissingIdent` message to `Typer`
felixmulder 787a2ce
Add modifiers to highlighting
felixmulder 628b7f3
Make `FancyConsoleReporter` and `Highlighting` obey color setting
felixmulder e24289a
Make relevant parts of compiler conform to new error handling
felixmulder 1532c82
Remove duplication of console reporters
felixmulder 146add1
Improve syntax highlighting for ValDefs
felixmulder bf8803d
Add deprecation message on `with` type operator
felixmulder af25cb1
Improve syntax highlighting on polymorphic defs
felixmulder 48000c6
Fix underline position
felixmulder f1cc4f2
Better operator highlighting
felixmulder 68eae1a
Indent 2 after newline in REPL
felixmulder 6b12f65
Fix #1525: start repl if first arg to dotr starts with hyphen
felixmulder 153c566
Fix multiple parsing errors on e.g. `try 1`
felixmulder 88e4146
Add basic diffing for shown values
felixmulder 8743fa8
Unrainbow syntax highlighting
felixmulder aa55935
Refactor explanation interpolator
felixmulder 33d4490
Make `typeDiff` aware of placeholder types
felixmulder 24bcdfd
Add `dotty.jar` to gitignore
felixmulder f5ad849
Fix reporting of ErrorTypes in highlighted segments
felixmulder a7d3f6e
Don't force Message twice in MessageContainer
felixmulder 7561db0
Fix TypeMismatch not getting nonsensical tags in some cases
felixmulder 18d63fe
Get rid of `kind` in `MessageContainer`
felixmulder f7b8980
Improve documentation for message framework
felixmulder e42bb30
Change Message#errorId to type Int
felixmulder a0026a0
Make reporter hint about existing explanations
felixmulder 0781b31
Handle multiline messages in ConsoleReporter
felixmulder f23ff3a
Improve positions for MemberDefs using `namePos`
felixmulder 41d6429
Get rid of unnecessary fields in `MessageContainer`
felixmulder 29d19ba
Correct line extraction from SourcePosition
felixmulder d2b6205
Insert message "inline" into multiline code at point
felixmulder e754a2d
Change `typeDiff` to highlight changes less than 50%
felixmulder 45a2df1
Fix TreeChecker mismatch string
felixmulder b9e03b8
Remove unnecessary printing of hints for `-explain`
felixmulder d490f7d
Add Levenshtein distance for member values and types
felixmulder 550c643
Adopt delegating reporter to new scheme
felixmulder File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
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
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
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.
Sophisticated enough for now - we will have to revisit this script to get it on par with the
scala
script eventually - see: #1526