Bug 442133 - LSP reporting stale errors after file is reloaded externally
Summary: LSP reporting stale errors after file is reloaded externally
Status: RESOLVED WORKSFORME
Alias: None
Product: kate
Classification: Applications
Component: general (show other bugs)
Version: 21.08.1
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-09-07 15:13 UTC by Denis Lisov
Modified: 2021-12-07 05:35 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Denis Lisov 2021-09-07 15:13:18 UTC
STEPS TO REPRODUCE
1. Open a file in some repository that has LSP support
2. Edit it, introducing a bug that LSP highlights, and save
3. Outside Kate, revert it to the previous state in the way corresponding to the VCS used
4. Return to Kate and allow it to reload the externally modified file

OBSERVED RESULT
Kate is still showing old error positions corresponding to the pre-revert state

EXPECTED RESULT
Kate should propagate the new stat of the file to the language server so that its output matches the displayed state of the file.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Gentoo, Frameworks 5.85.0, Kate 21.08.1
Comment 1 Waqar Ahmed 2021-10-11 07:20:12 UTC
Which LSP?

> Kate should propagate the new stat of the file to the language server

Kate does that.

Try pressing F5, and if the errors are still being highlighted, then it is most likely a bug in the server.
Comment 2 Denis Lisov 2021-10-11 07:28:53 UTC
(In reply to Waqar Ahmed from comment #1)
> Which LSP?

RLS (Rust)

> > Kate should propagate the new stat of the file to the language server
> 
> Kate does that.
> 
> Try pressing F5, and if the errors are still being highlighted, then it is
> most likely a bug in the server.

The errors are still being highlighted immediately after a revert. F5 does not help, but a small edit (like adding a space to the last line) causes them to disappear. Does the propagation on reload and propagation on edit happen in different ways?..
Comment 3 Waqar Ahmed 2021-10-11 11:55:42 UTC
Weird that F5 doesn't help since it reloads everything about the doc.

Anyways, for the warnings to disappear, that is expected behaviour but yeah could be improved.
Comment 4 Waqar Ahmed 2021-12-07 05:35:37 UTC
Closing as doesn't seem like a bug in our client + rust-analyzer is the prefered way to go these days.