Diagnostics for the full project? #280
Replies: 11 comments 4 replies
-
Thanks for the suggestion. This idea is interesting but an implementation for it will have to come from the community because we don't have time for it right now, sorry. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the answer, @ccordoba12! After taking a look at the code, I am tempted to give it a try. I will probably ask you a few things here until I feel confident enough to submit a PR, if you don't mind. |
Beta Was this translation helpful? Give feedback.
-
Sure, no problem with that. And thanks a lot for your interest in adding this feature. |
Beta Was this translation helpful? Give feedback.
-
Hi @ccordoba12 I have been taking a look at this and I think there is some ambiguity about where to solve this:
Not sure what is the right way to proceed, to be honest. The first one looks simpler, but maybe more memory-expensive, since more files need to be open? (or maybe the signal is sent but the file is not actually loaded in memory by the editor) Since I am using eglot as a client, maybe @joaotavora has an opinion regarding this, or knows at what level this is addressed for other language servers? |
Beta Was this translation helpful? Give feedback.
-
@JesusTorrado : From LSP spec there is a specific hook for this on server side: workspaceDiagnostic But i think the better solution will be to enable the textDocument/diagnostic capability on server side textDocumentDiagnostic so that any LSP client can gather the diagnostic for each file. So Option 1 is fine but instead of sending didOpen for all files at startup the client can request at any time the diagnostics for a set of files with textDocument/diagnostic |
Beta Was this translation helpful? Give feedback.
-
In order for any client to easily take advantage of this functionality, I'd be in favor of implementing the |
Beta Was this translation helpful? Give feedback.
-
Carlos Cordoba that could make sense, but eglot doesn't issue these new
kinds of
requests. It could.
Suggest you submit a feature report to Emacs's bug tracker, link to the
LSP spec page,
and CC: me in the report email.
https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_pullDiagnostics
Also please list one of two servers you know that support this.
|
Beta Was this translation helpful? Give feedback.
-
Thanks, @albilu! I'll try to get to this in 1-2 weeks. @joaotavora I will take care of the emacs side when this is done. |
Beta Was this translation helpful? Give feedback.
-
OK, see also related https://debbugs.gnu.org/cgi/bugreport.cgi?bug=59824
This bug report, which will soon be fixed (already have a fix) concerns a
server that already supplies workspace-wide diagnostics without
making use of the new workspaceDiagnostics "pull" request.
So, with some servers, this functionality is already available in
Eglot. Doesn't mean workspaceDiagnostics shouldn't also
be added to Eglot, of course, but it's not essential to get
this functionality to the end user.
João
…On Wed, Dec 7, 2022 at 8:20 AM Jesús Torrado ***@***.***> wrote:
Thanks, @albilu <https://github.com/albilu>!
I'll try to get to this in 1-2 weeks.
@joaotavora <https://github.com/joaotavora> I will take care of the emacs
side when this is done.
—
Reply to this email directly, view it on GitHub
<#280 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAC6PQ2S3UKXIYQAPYX7USDWMBCEVANCNFSM6AAAAAARHDZJIA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***
.com>
--
João Távora
|
Beta Was this translation helpful? Give feedback.
-
@JesusTorrado any progress on this feature? |
Beta Was this translation helpful? Give feedback.
-
hey guys any news on the workspace diagnostics feature? |
Beta Was this translation helpful? Give feedback.
-
Hi there,
Is there any chance that
pylsp
will at some point implement a switch for diagnostics for the full workspace, as mentioned forpyright
in this comment #143 (comment) ?E.g. for static type checkers like
mypy
it does make sense to see possible bad side effects of changes in type declarations in other files. And it would be useful in general too, e.g. for activating it just before pushing a large change.Thanks for the great work!
Beta Was this translation helpful? Give feedback.
All reactions