-
-
Notifications
You must be signed in to change notification settings - Fork 74
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
improvement: shared diagnostics between compiler and language server #239
Merged
baszalmstra
merged 3 commits into
mun-lang:master
from
baszalmstra:feature/lsp/diagnostics
Aug 23, 2020
Merged
improvement: shared diagnostics between compiler and language server #239
baszalmstra
merged 3 commits into
mun-lang:master
from
baszalmstra:feature/lsp/diagnostics
Aug 23, 2020
Conversation
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
baszalmstra
changed the title
Feature: shared diagnostics between compiler and language server
feature: shared diagnostics between compiler and language server
Jul 4, 2020
baszalmstra
changed the title
feature: shared diagnostics between compiler and language server
improvement: shared diagnostics between compiler and language server
Jul 4, 2020
Codecov Report
@@ Coverage Diff @@
## master #239 +/- ##
==========================================
- Coverage 79.10% 78.57% -0.53%
==========================================
Files 201 210 +9
Lines 12807 12771 -36
==========================================
- Hits 10131 10035 -96
- Misses 2676 2736 +60
Continue to review full report at Codecov.
|
baszalmstra
force-pushed
the
feature/lsp/diagnostics
branch
5 times, most recently
from
July 25, 2020 09:21
af0217d
to
88ed4bc
Compare
Wodann
requested changes
Jul 25, 2020
baszalmstra
force-pushed
the
feature/lsp/diagnostics
branch
from
August 22, 2020 17:21
88ed4bc
to
4fd59be
Compare
baszalmstra
force-pushed
the
feature/lsp/diagnostics
branch
from
August 22, 2020 17:37
35bf917
to
c676431
Compare
Wodann
requested changes
Aug 22, 2020
baszalmstra
force-pushed
the
feature/lsp/diagnostics
branch
from
August 22, 2020 17:41
c676431
to
eb0da2c
Compare
Wodann
approved these changes
Aug 22, 2020
Wodann
added
type: refactor
Refactor existing code
and removed
type: perf
Changes that improve performance
labels
Dec 28, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR introduces the
mun_diagnostics
crate. This crate provides theDiagnostic
trait which is used by both the compiler and the language server to provide the same detailed diagnotics. The crate enables conversion fromhir::Diagnostic
tomun_diagnostics::Diagnostic
which also adds more detailed information (which first resided in the compiler itself).The compiler uses the
Diagnostic
trait to convert it to aSnippet
from annotate_snippets to emit the diagnostic information to the console.The language server uses the
Diagnostic
trait to convert it to alsp_types::Diagnostic
which is send to the language server client.This enables sharing a lot of the logic of diagnostics between these two use cases.
In the future, we could also add quick-fixes to the crate to be able to provide hints on the console and provide quick actions for the LSP.
This PR is branched of from #236 which should be merged first.