rust-lang / rust-lang/rust-analyzer
Handle request retrying better
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16.9k
- Forks
- 2.2k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 72
Description
Currently a bunch of request handles may panic if we retry them after document changes have come in. This is obviously quite annoying for users, we should fix this. There are two ways I can see to go forward here
- Attach the current mem doc version of a file to requests that have files in them and bail if the versions dont line up when processing the request
- Replay any document changes that have happened since accepting the and processing the request and attempt to adjusting the offsets in the request before processing it.
- Replay any document changes that have happened since accepting the and processing the request and bail out if the offsets in the request may be affected.
All of these options are pretty bad, but we need to do something here unfortunately.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files, tests, or entry points are named. Start by locating request retry handling and document-change processing, then compare the three proposed strategies. Done means retries no longer panic when document changes arrive and affected request offsets are handled consistently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100