microsoft / language-server-protocol

Defines a common protocol for language servers.
https://microsoft.github.io/language-server-protocol/
Creative Commons Attribution 4.0 International
10.91k stars 764 forks source link

Unclear handling of nil diagnostic responses #1882

Open MariaSolOs opened 5 months ago

MariaSolOs commented 5 months ago

The protocol indicates that the response to the textDocument/diagnostic request is a proper DiagnosticReport, yet certain language servers return null as a response (like the Ruby language server).

Initially one would blame this on the misbehaving server that's not following the specification, yet one finds editors/clients that accommodate this behavior (example here).

Hence the issue is: Should we allow null responses for this request and send the same reply as VS Code does? Or should we handle this as an invalid reply?