Skip to content

Progress percentage should be an uint according to the spec #1412

@w0rm

Description

@w0rm

Hi folks!

@absynce and I are trying to integrate elm-language-server that is based on vscode-languageserver with Zed and running into the following error:

[2024-01-25T20:44:07Z ERROR lsp] error deserializing $/progress request: Error("data did not match any variant of untagged enum ProgressParamsValue", line: 1, column: 127), message: "{\"token\":\"36abce40-63b2-4fa1-8464-030400636f26\",\"value\":{\"kind\":\"report\",\"percentage\":100.00000000000155,\"message\":\"Indexing\"}}"

According to the lsp specification the percentage should be a uinteger. However, the actual value is a float. This works just fine if the receiving end is not strict about this, but the rust lsp implementation assumes percentage to be a u32.

Would you be open for a PR that rounds the reported percentage in

report(arg0: number | string, arg1?: string): void {
?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssue identified by VS Code Team member as probable bug

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions