python-lsp / python-lsp-server

Fork of the python-language-server project, maintained by the Spyder IDE team and the community
MIT License
1.95k stars 194 forks source link

Add version support to `workspace/publishDiagnostics` #565

Closed Dylmay closed 4 months ago

Dylmay commented 5 months ago

Currently we do not pass version information when we are publishing diagnostics. See: LSP protocol

Now we pass the version information so the client can create an opinion as to whether the current diagnostics are valid or not for the workspace

Dylmay commented 5 months ago

There is a versionSupport capability passed by the client which we could check beforehand but the field is optional and we already track the document version so I don't believe there is much reason to change behaviour based on it

Dylmay commented 4 months ago

@ccordoba12, could I have a re-review please

ccordoba12 commented 4 months ago

Closing and reopening to run our tests again.