Skip to content

Idea: a way to "lint" server messages to see if they're respecting client capabilities #306

Open
@michaelpj

Description

@michaelpj

Clients provide servers with lots of information about what features they support. But it's very easy for the server to just ignore this and send the client things that they may not understand.

Now, I think this is usually fine because usually this just means the server sends extra fields, which the client will ignore. But in some cases it can be important: for example if you send documentChanges in WorkspaceEdit to a client that only supports changes, then it may do nothing.

What I was thinking is that we could write, for each client capability, a "linter" that checks certain messages to see if they contain fields that the client hasn't stated that they support. Then we could, e.g. emit warnings if we see such fields, helping server authors notice if they're not honouring client capabilities.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions