rust-lang / rust-lang/rust-analyzer

Request retrying needs to update file offsets in the tried requests

Open
#13,720 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Broken Window C-bug E-hard
Dominant language
Rust
Stars
16.9k
Forks
2.2k
Avg merge
1d 12h
Merged PRs (30d)
72

Description

When a document change notification comes in, we currently cancel all outstanding requests and retry them after we changed the document, this obviously causes a problem: Offsets in those requests are now out of sync with the document which can cause a variety of odd issues (and panics). We need to fix them up before retrying again.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Trace the document change notification handling and the code that cancels and retries outstanding requests. Inspect how those requests retain file offsets, then verify that offsets are corrected after the document changes and before retrying, without causing the reported odd issues or panics.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.