rust-lang / rust-lang/rust-analyzer
Updating crates.io index after every `cargo clean`
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16.9k
- Forks
- 2.2k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 72
Description
rust-analyzer version: rust-analyzer 0.3.2509-standalone
(also reproduced in later versions, including nightly)
rustc version: rustc 1.88.0 (6b00bc388 2025-06-23), rustc 1.87.0 (17067e9ac 2025-05-09)
editor or extension: neovim v0.11.2, default rust analyzer settings
code snippet to reproduce:
# Create new project
cargo init sample
cd sample
# run editor
nvim src/main.rs
Rust analyzer starts to show status "updating crates.io index". After sometime message "cargo metadata: ?" also appears. It blocks if there is no connection to the Internet.
On the other hand I can simply run cargo clean && cargo metadata without connection to the Internet.
Also I tried to set rust-analyzer.cargo.noDeps: true and rust-analyzer.cargo.autoreload: true, this does not solve the problem.
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
Reproduce the behavior with the listed cargo init, nvim, cargo clean, and cargo metadata commands, including without an Internet connection. Trace the rust-analyzer cargo metadata flow that reports "updating crates.io index" after startup or cleanup; done means opening the project no longer unnecessarily blocks on index updates when offline.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100