Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Diagnostics version is always 0 #1323

Open
jwortmann opened this issue Sep 30, 2024 · 0 comments
Open

Diagnostics version is always 0 #1323

jwortmann opened this issue Sep 30, 2024 · 0 comments

Comments

@jwortmann
Copy link
Contributor

jwortmann commented Sep 30, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant