rust-lang / rust-lang/rust-analyzer
.flatpak-builder directory makes rust-analyzer take all the RAM
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16.9k
- Forks
- 2.2k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 72
Description
flatpak-builder generates a cache directory .flatpak-builder (see flatpak-builder reference) which causes rust-analyzer to take all the memory of your PC. When rust-analyzer begins to take all the memory, the server doesn't get killed when you close VSCode. Emacs lsp-mode also didn't do it.
Adding the .flatpak-builder directory to the exclude vector in /workspaces/rust-analyzer/crates/project-model/src/workspace.rs would be a solution, but I think that rust-analyzer should detect and exclude a directory like this in the first place.
Ignoring everything in a .gitignore file would be perfect!
rust-analyzer version: 0.3.1463
rustc version: 1.68.2
relevant settings: default
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 in crates/project-model/src/workspace.rs and inspect how the exclude vector and project directories are discovered. Compare the handling of .flatpak-builder with the issue's suggestion to honor .gitignore files. Done means flatpak-builder-generated files are excluded from workspace analysis without requiring manual configuration, while rust-analyzer remains usable.
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
- 35/100