-
-
Notifications
You must be signed in to change notification settings - Fork 388
Support structured diagnostics #4311
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
Closed
dylan-thinnes
wants to merge
43
commits into
haskell:master
from
dylan-thinnes:support-structured-diagnostics
Closed
Changes from all commits
Commits
Show all changes
43 commits
Select commit
Hold shift + click to select a range
d5b70e0
Change FileDiagnostic type synonym to a datatype
dylan-thinnes 3c9ae07
Make `ideErrorWithSource` produce FileDiagnostic by adding filepath arg
dylan-thinnes ac78312
Supply structured error wherever we easily can - TODOs for hard parts
dylan-thinnes 4b39d0f
Fix UnitTests for new FileDiagnostic struct
dylan-thinnes 465ee2b
Remove explicit uses of FileDiagnostic, add codes to LSP diagnostics
dylan-thinnes 4d2f3f0
Add field for expected error codes in ghcide tests
dylan-thinnes e4ca141
Expect GHC-83865 for "type error" test - basic test
dylan-thinnes 2a2bc3d
Return structured warnings in TcModuleResult by copying from Driver
dylan-thinnes 2cd33df
Store FileDiagnostic instead of LSP Diagnostic in Shake store
dylan-thinnes c4d5edd
Add expected error codes for diagnostics that have them
dylan-thinnes ae50843
Dispatch TODOs, amend remaining TODOs as future work
dylan-thinnes 0cf77e5
Add scary comments all over copied code in Compat.Driver
dylan-thinnes 4b452c9
Update all remaining diagnostics that could use an expected error code
dylan-thinnes 25b02fa
Add _code to pretty printing for FileDiagnostic
dylan-thinnes a46f0a2
Use case instead of `maybe` for StructuredMessage match
dylan-thinnes 25bfcb3
Use CPP to prevent setting _code before structured errors
dylan-thinnes 003c15c
Swap modifier for lenses, document StructuredMessage type
dylan-thinnes 3500ac3
Add link to Issue & MR to Compat.Driver
dylan-thinnes 4fed987
Drop attachReason logic from withWarnings, technically incorrect
dylan-thinnes 74b245d
Revert "Drop attachReason logic", needed by pragmas-plugin
dylan-thinnes 326f314
Fix plugins where necessary for new diagnostic structure
dylan-thinnes 52150c7
Fix build issues with other tests from `expectDiagnostics`
dylan-thinnes 7ec0481
Improve comment on metadata fdStructuredMessage in FileDiagnostic
dylan-thinnes be37756
Add note to withWarnings explaining the current state of things
dylan-thinnes 7bb82d0
Attach reasons into data field of LSP Diagnostic instead of code field
dylan-thinnes c248bb3
Merge remote-tracking branch 'upstream/master' into support-structure…
dylan-thinnes 8d310fb
Fix up mistakes from merge, TODO fix merge issues for 9.3.0
dylan-thinnes 414c845
Set CodeDescription from HaskellErrorIndex when available
dylan-thinnes fc22ac5
Remove debugging print, fix expectation for preprocessor tests
dylan-thinnes 5bb39cd
Fix CPP for using Show instance on DiagnosticCode
dylan-thinnes 8051130
Remove diagFromErrMsgs for GHC version < 9.6.1 using CPP
dylan-thinnes 0e9d75e
CPP fix
dylan-thinnes 863e42e
More stylish-haskell, more CPP fix
dylan-thinnes 4c798e4
Fix all stylish-haskell errors triggering
dylan-thinnes b7761de
Fix more CPP
dylan-thinnes 596a4cb
Only override the LSP diagnostic code when not already set
dylan-thinnes 58cdc41
Fixes for stylish-haskell
dylan-thinnes 503a861
Qualify s, t for FuzzySearch
dylan-thinnes 3ad6bca
Ignore use of unsafePerformIO in FuzzySearch
dylan-thinnes c30267c
Properly split GHC.Types.Error import in Diagnostics for stylish-haskell
dylan-thinnes 29133ba
Force type signature of annotation on FuzzySearch.dictionary
dylan-thinnes 1a76f88
DRY up definition of closure_errs
dylan-thinnes f52e9c2
Merge remote-tracking branch 'upstream/master' into support-structure…
dylan-thinnes 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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.
Seems like this section can now be nicely DRYied like this (also taking advantage of the fact that we recently dropped support for GHCs < 9.4, so
MIN_VERSION_ghc(9,3,0)
will always be true going forward):