rust-lang / rust-lang/rust-analyzer

vs-code doesn't update problems after git stash / git stash pop

Open
#8,642 9 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

E-unknown S-actionable
Dominant language
Rust
Stars
16.9k
Forks
2.2k
Avg merge
1d 12h
Merged PRs (30d)
72

Description

To reproduce:
Have some code with an issue that isn't committed.
run git stash in a vscode terminal.
Note that the problem list doesn't change.
Save the file with no changes.
Note the on-save check happen and the problem list update.

The converse also applies: problems changed by a git stash pop are not picked up on by the extension.

I suspect this is simply a case of not hooking into the file change events in vscode. The cross-file search results for instance are wired in and update when the results list change as a side effect of git operations.

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

Start by reproducing the issue in VS Code with an uncommitted diagnostic, then run git stash and git stash pop while observing the Problems list. Trace rust-analyzer's handling of VS Code file-change events and compare it with the existing cross-file search result updates; done means diagnostics refresh after both stash operations without saving the file.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust, vscode
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.