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

textDocument/publishDiagnostics: Publish any source-less warnings or errors #601

Merged
merged 1 commit into from
Aug 2, 2021

Conversation

radeksimko
Copy link
Member

Previously we would suppress any diagnostics which do not have source context associated with them.

This for example means that if user attempted to run validate on uninitialized module they wouldn't receive any feedback at all - as if the configuration is valid.

This PR makes such diagnostics visible.

LSP technically makes source range mandatory in the protocol - which seems kinda awkward given that they allow diagnostic to be associated with a directory URI.

We can however just pass an "empty" 0,0-0,0 range which satisfies the protocol and allows the diagnostic to still be displayed, as demonstrated in VS Code:

Screenshot 2021-08-02 at 13 08 07

@radeksimko radeksimko merged commit 61995cc into main Aug 2, 2021
@radeksimko radeksimko deleted the b-publish-sourceless-diags branch August 2, 2021 12:54
@github-actions
Copy link

github-actions bot commented Sep 2, 2021

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 2, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant