ZIm/crates/project/src
Antonio Scandurra ca1d0a6e59 Ignore tokens that were not created via WorkDoneProgressCreate
With the new version of rust-analyzer, we were seeing stray `WorkDoneProgress::End`
messages that create an imbalance in the `pending_diagnostic_updates` that never
resolves. This was causing the diagnostic status bar item to never update because
we wouldn't emit `DiskBasedDiagnosticsStarted` nor `DiskBasedDiagnosticsFinished`.

This commit fixes the above situation by only acknowledging progress report for tokens
that have explicitly been created via the `WorkDoneProgressCreate` request, as stated
by the protocol.

In addition to that, we are replacing the `pending_diagnostic_updates: isize` with
a `has_pending_diagnostic_updates: bool`. We added it at some point to prevent a similar
issue where we would observe begin/end reports in a seemingly random order, which would cause
us to permanently display a `checking...` message in the status bar. I believe this commit
fixes that as well because the `isize` was just a less general solution for the same
underlying issue. As the protocol states: "the token provided in the create request should
only be used once (e.g. only one begin, many report and one end notification should be sent
to it)."
2022-06-28 10:08:43 +02:00
..
db.rs Use rocksdb to store project paths' public/private state 2022-06-02 17:38:33 -07:00
fs.rs Don't eagerly populate copied subdirectory 2022-05-31 08:11:07 +02:00
ignore.rs Rename worktree crate to project, pull in Project 2021-10-04 16:45:05 -07:00
lsp_command.rs Address hover panic and add hint to install go when language server failed to install 2022-06-27 15:48:15 -07:00
project.rs Ignore tokens that were not created via WorkDoneProgressCreate 2022-06-28 10:08:43 +02:00
search.rs Remove carriage returns 2022-02-27 07:47:46 -07:00
worktree.rs Don't stop scanning directory if reading one of the children errors 2022-06-27 08:40:37 +02:00