diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-08-09 23:39:10 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-08-09 23:39:10 +0100 |
commit | b1cb4ac13d5b625dd497692b6396287a30ff12e2 (patch) | |
tree | 6a3465bc8ef80890503c39945f2cfddb49044dae /crates/ra_hir_expand/src/hygiene.rs | |
parent | 9995e79cce548d43505d91653e2a1fdde8729134 (diff) | |
parent | dbe7ede2eebc1301a40f0e1a3a408e11a86a0e84 (diff) |
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 <[email protected]>
Diffstat (limited to 'crates/ra_hir_expand/src/hygiene.rs')
0 files changed, 0 insertions, 0 deletions