zed/crates/rpc
Antonio Scandurra ef784cf21e Remove summaries that don't contain any errors or warnings
When opening a buffer, some language servers might start reporting
diagnostics. When closing a buffer, they might report that no diagnostics
are present for that buffer. Previously, we would keep an empty summary entry
which would cause us to open a buffer in the project diagnostics view, only to
drop it because it contained no diagnostics. However, the act of opening it
caused the language server to asynchronously report non-empty diagnostics.
We would therefore handle this as an update, but the previous closing of the
buffer would cause the language server to report empty diagnostics again. This
would cause the project diagnostics view to thrash infinitely between these two
states, pegging the CPU and constantly refreshing the UI.

With this commit we won't maintain empty summary entries for files that contain
no diagnostics, which fixes the above issue.

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-04-19 15:30:46 +02:00
..
proto Remove summaries that don't contain any errors or warnings 2022-04-19 15:30:46 +02:00
src Remove summaries that don't contain any errors or warnings 2022-04-19 15:30:46 +02:00
build.rs
Cargo.toml Merge pull request #781 from zed-industries/structured-logging 2022-04-09 07:40:24 -06:00