Skip to content

metaModel.json doesn't match the specs for diagnostics markupMessageSupport #2246

@jwortmann

Description

@jwortmann

In the upcoming 3.18 specs, the client can declare support for textDocument.diagnostic.markupMessageSupport and then the diagnostics message can be of type MarkupContent:

/**
* The diagnostic's message.
*
* @since 3.18.0 - support for MarkupContent. This is guarded by the client
* capability `textDocument.diagnostic.markupMessageSupport`.
*/
message: string | MarkupContent;

But the type definition from the metaModel.json file doesn't reflect that:

{
"name": "message",
"type": {
"kind": "base",
"name": "string"
},
"documentation": "The diagnostic's message. It usually appears in the user interface"
},

Note that support for MarkupContent was initially added to the metaModel.json file in df7c77b on 2024-03-19.

But then it was later reverted/overwritten (accidentally?) in 7e1b69d on 2024-08-05.


Another thing that seems a bit inconsistent to me is that the client can declare markupMessageSupport only for pull diagnostics (via textDocument.diagnostic.markupMessageSupport in DiagnosticClientCapabilities), but not for the publishDiagnostics notifications (via textDocument.publishDiagnostics in PublishDiagnosticsClientCapabilities). But perhaps that is intentional, if publishDiagnostics notifications should be discouraged in favor of the newer pull diagnostics model?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions