ZIm/crates/collab/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
..
bin Fix failing seed bin build and add bin builds to ci pipeline 2022-05-26 15:41:24 -07:00
rpc Use BTreeMap in Server so we release memory when maps are cleared 2022-06-23 18:02:17 +02:00
api.rs Allow users with no invites to be fetched from the API 2022-06-24 09:57:52 -06:00
auth.rs Enable descriptive HTTP errors to be returned from DB layer 2022-05-19 11:55:55 -06:00
db.rs Allow users with no invites to be fetched from the API 2022-06-24 09:57:52 -06:00
env.rs Rename zed-server to collab 2022-04-09 08:30:42 -06:00
errors.rs Remove more unused code related to GitHub auth and errors 2022-04-21 08:57:49 -06:00
integration_tests.rs Ignore tokens that were not created via WorkDoneProgressCreate 2022-06-28 10:08:43 +02:00
lib.rs Fix failing seed bin build and add bin builds to ci pipeline 2022-05-26 15:41:24 -07:00
main.rs Add an API that returns the most active users and the projects where they've been active 2022-06-20 19:46:37 -07:00
rpc.rs Gather metrics only when /metrics endpoint is retrieved 2022-06-24 09:28:52 +02:00