Skip to content

Language server protocol is being violated over stdio #371

@parkuman

Description

@parkuman

When in stdio mode using the --stdio flag, any LSP client expects all messages from the server to start with Content-Length.

The following two lines violate this protocol by printing non-LSP-compliant stuff to stdio:

This results in the following error for clients on stdio:

Content-Length not found in header: New client connection
Called method: initialize
Content-Length: 694

We need a nice way to handle (or outright ignore) debugging output when in stdio mode. We should also implement some sort of safeguard such that someone can't accidentally add a new stdout a few years down the line and breaks stdio mode for all the stdio-using clients

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