granite-rust/crates
bors[bot] b1cb4ac13d
Merge #5693
5693: Fix no inlay hints / unresolved tokens until manual edit to refresh r=jonas-schievink a=Veetaha

Fixes https://github.com/rust-analyzer/rust-analyzer/issues/5349 

Now we return ContentModified during the workspace loading. This signifies the language
client to retry the operation (i.e. the client will
continue polling the server while it returns ContentModified).
I believe that there might be cases of overly big projects where the backoff
logic we have setup in `sendRequestWithRetry` (which we use for inlay hints)
might bail too early (currently the largest retry standby time is 10 seconds).
However, I've tried on one of my project with 500+ dependencies and it is still enough.

Here are the examples before/after the change (the gifs are quite lengthy because they show testing rather large cargo workspace).

<details>
<summary>Before</summary>

Here you can see that the client receives empty array of inlay hints and does nothing more.
Same applies to semantic tokens. The client receives unresolved tokens and does nothing more.
The user needs to do a manual edit to refresh the editor.

![prev-demo](https://user-images.githubusercontent.com/36276403/89717721-e4471280-d9c1-11ea-89ce-7dc3e83d9768.gif)

</details>

<details>
<summary>After</summary>

Here the server returns ContentModified, so the client periodically retries the requests and eventually receives the wellformed response.

![new-demo](https://user-images.githubusercontent.com/36276403/89717725-eb6e2080-d9c1-11ea-84c9-796bb2b22cec.gif)

</details>

Co-authored-by: Veetaha <veetaha2@gmail.com>
2020-08-09 22:39:10 +00:00
..
expect Add a license field to all the crates 2020-07-14 10:57:26 +09:00
flycheck flycheck: Added checkOnSave.noDefaultFeatures 2020-07-30 16:04:01 +02:00
paths Add a license field to all the crates 2020-07-14 10:57:26 +09:00
ra_arena Add a license field to all the crates 2020-07-14 10:57:26 +09:00
ra_assists align names in make 2020-08-05 19:37:26 +02:00
ra_cfg Cleanup CFG API 2020-07-23 16:53:12 +02:00
ra_db Use salsa's purge to account for all memory 2020-08-05 15:28:20 +02:00
ra_fmt Add a license field to all the crates 2020-07-14 10:57:26 +09:00
ra_hir Use salsa's purge to account for all memory 2020-08-05 15:28:20 +02:00
ra_hir_def Update grammar 2020-08-01 13:47:19 +02:00
ra_hir_expand Merge #5628 2020-08-03 11:47:56 +00:00
ra_hir_ty Merge #5684 2020-08-08 16:45:37 +00:00
ra_ide format in to_proto::markup_content 2020-08-09 21:33:14 +08:00
ra_ide_db Merge #5664 2020-08-05 16:56:39 +00:00
ra_mbe Rename BindPat -> IdentPat 2020-07-31 20:12:10 +02:00
ra_parser Update grammar 2020-08-01 13:47:19 +02:00
ra_proc_macro Add a license field to all the crates 2020-07-14 10:57:26 +09:00
ra_proc_macro_srv cargo_metadata 0.11.1 and cargo update 2020-07-29 17:06:56 -04:00
ra_prof Print errors when failing to create a perf counter 2020-07-30 14:34:11 +02:00
ra_project_model Merge #5596 2020-07-30 21:23:41 +00:00
ra_ssr Use SyntaxNode.ancestors instead of a loop 2020-08-06 07:36:03 +10:00
ra_syntax align names in make 2020-08-05 19:37:26 +02:00
ra_text_edit Add a license field to all the crates 2020-07-14 10:57:26 +09:00
ra_toolchain Add a license field to all the crates 2020-07-14 10:57:26 +09:00
ra_tt Add a license field to all the crates 2020-07-14 10:57:26 +09:00
rust-analyzer Merge #5693 2020-08-09 22:39:10 +00:00
stdx Use split_once polyfill 2020-07-30 22:23:12 +02:00
test_utils Use split_once polyfill 2020-07-30 22:23:12 +02:00
vfs Add one more test 2020-07-26 11:05:28 +02:00
vfs-notify Simplify exclusion logic 2020-07-18 16:40:10 +02:00