Skip to content

Diagnostics version is always 0 #1323

@jwortmann

Description

@jwortmann

Using the latest master branch (https://github.com/julia-vscode/LanguageServer.jl/tree/0da181a8e48da14c2ac46519311e01352c7c6fca) I noticed that the optional version property of the PublishDiagnosticsParams is always set to 0. As a result, the client likely rejects to update the diagnostics which are shown in the editor UI due to outdated document version. In other words the diagnostics from the state when a file was initially opened are shown in the editor, but after that they never change.

For example, the client sends textDocument/didChange like

{
    "textDocument": {
        "uri": "file:///D:/code/Julia/LspTest/main.jl",
        "version": 2
    },
    "contentChanges": ...
}

then the server sends textDocument/publishDiagnostics with

{
    "uri": "file:///d%3A/code/Julia/LspTest/main.jl",
    "version": 0,
    "diagnostics": ...
}

I assume this bug was introduced with the JuliaWorkspaces, and is perhaps caused by drive letter casing of URIs not being handled correctly (just a guess), because otherwise you would have very likely already noticed it in VSCode.

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