rust-lang / rust-lang/rust-analyzer
vs-code doesn't update problems after git stash / git stash pop
Nobody has claimed this yet.
- 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
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
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