Skip to content

Bad $/progress token deserialize #1381

@timxx

Description

@timxx

As LSP spec progress said:

type ProgressToken = integer | string;

interface ProgressParams<T> {
	/**
	 * The progress token provided by the client or server.
	 */
	token: ProgressToken;

	/**
	 * The progress data.
	 */
	value: T;
}

the token can be integer or string, but in FormatterBase it decode as long, which may raise exception and flush log

StreamJsonRpc.RpcArgumentDeserializationException: 'Deserializing JSON-RPC argument with name "token" and position 0 to type "System.Int64" failed: Error converting value "backgroundIndexProgress" to type 'System.Int64'. Path 'params.token'.'

As clangd pass token as string

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