Related area
Diagnostics
Configuration
Description
clice currently produces C++ compiler diagnostics during translation-unit compilation, but it does not implement the standard LSP textDocument/diagnostic request. A client requesting document diagnostics receives -32601: method not found.
The server capabilities also do not advertise a diagnosticProvider. This makes clice diagnostics inaccessible to clients that use the pull-diagnostics API instead of consuming textDocument/publishDiagnostics notifications.
This report is about the LSP diagnostic contract, not Visual Studio-specific VCR#### rules. A generic C++ LSP client should not be expected to reproduce Visual Studio's proprietary code-style diagnostic IDs.
Steps to reproduce
- Start clice for a Windows MSVC project with a valid
compile_commands.json.
- Initialize the server with a standard LSP client.
- Open a C++ translation unit containing a deliberate semantic error such as an unknown type.
- Request
textDocument/diagnostic for the document, both without an identifier and with identifiers such as DocumentCompilerSemantic or DocumentAnalyzerSemantic.
- Observe
-32601: method not found: textDocument/diagnostic.
- Observe from the clice session log that compilation still produces diagnostics.
A minimal probe can be as small as:
int diagnostic_probe()
{
UnknownType value{};
return value.member;
}
Motivation
Please either:
- implement standard LSP pull diagnostics and advertise
diagnosticProvider, including stable source/code/severity/range fields; or
- document clearly that clice is push-only for diagnostics and specify the expected
publishDiagnostics behavior and payload.
Supporting pull diagnostics would make clice interoperable with generic LSP clients. If push-only is intentional, documenting it would prevent clients from treating method not found as an empty diagnostic result.
The existing clang-tidy tracking issue is related to analyzer coverage, but this report concerns the LSP transport and discoverability of diagnostics.
Related area
Diagnostics
Configuration
Description
clice currently produces C++ compiler diagnostics during translation-unit compilation, but it does not implement the standard LSP
textDocument/diagnosticrequest. A client requesting document diagnostics receives-32601: method not found.The server capabilities also do not advertise a
diagnosticProvider. This makes clice diagnostics inaccessible to clients that use the pull-diagnostics API instead of consumingtextDocument/publishDiagnosticsnotifications.This report is about the LSP diagnostic contract, not Visual Studio-specific
VCR####rules. A generic C++ LSP client should not be expected to reproduce Visual Studio's proprietary code-style diagnostic IDs.Steps to reproduce
compile_commands.json.textDocument/diagnosticfor the document, both without an identifier and with identifiers such asDocumentCompilerSemanticorDocumentAnalyzerSemantic.-32601: method not found: textDocument/diagnostic.A minimal probe can be as small as:
Motivation
Please either:
diagnosticProvider, including stable source/code/severity/range fields; orpublishDiagnosticsbehavior and payload.Supporting pull diagnostics would make clice interoperable with generic LSP clients. If push-only is intentional, documenting it would prevent clients from treating
method not foundas an empty diagnostic result.The existing clang-tidy tracking issue is related to analyzer coverage, but this report concerns the LSP transport and discoverability of diagnostics.