[llvm-bugs] [Bug 41217] New: Avoid stale diagnostics in files that have been closed
via llvm-bugs
llvm-bugs at lists.llvm.org
Sun Mar 24 19:08:40 PDT 2019
https://bugs.llvm.org/show_bug.cgi?id=41217
Bug ID: 41217
Summary: Avoid stale diagnostics in files that have been closed
Product: clang-tools-extra
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: clangd
Assignee: unassignedclangbugs at nondot.org
Reporter: zeratul976 at hotmail.com
CC: ibiryukov at google.com, kadircetinkaya.06.tr at gmail.com,
llvm-bugs at lists.llvm.org, malaperle at gmail.com,
sammccall at google.com
Consider the following workflow:
1. User opens file A. File A contains a compiler error, so
clangd sends a diagnostic, which shows up in the editor's
Problems view (assuming it has one).
2. User closes file A. Clangd does not clear diagnostics
for file A, so the error remains in the Problems view.
3. User opens file A in a different (non-LSP) editor, and
fixes the error. The error still remains in the LSP
editor's Problems view, but is now stale.
It would be nice to be able to avoid this. A couple of possible options for
how:
A. Clangd clears diagnostics in a file whenever a file
is closed.
In this case, the user model is that the editor's
Problems view only shows LSP diagnostics that pertain
to open files.
B. Clangd reacts to the workspace/didChangeWatchedFiles
notifications, to detect the change made in step #3
in the workflow above, and updates diagnostics in
response.
In this case, the user model is that the editor's
Problems view shows LSP diagnostics for every file
that has been opened during the LSP session (?), but
they are up to date even if the file is currently
closed and has been modified elsewhere.
Any thoughts on whether a change along these lines would be desirable?
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190325/7fb04161/attachment.html>
More information about the llvm-bugs
mailing list