rust-lang / rust-lang/rust-analyzer

check-on-save: print what is currently being built, not what has finished building

Open
#19,953 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-cargo C-feature
Dominant language
Rust
Stars
16.9k
Forks
2.2k
Avg merge
1d 12h
Merged PRs (30d)
72

Description

During check-on-save, RA shows the names of crates that have just finished building in the toolbar. However, that can be quite confusing: if crate A is right before crate B in the dependency chain, and B takes a long time, it'll show "A" for a long time, making it look like that's what's taking the time.

It'd be great if the display could be more like that of cargo, where it shows the crates currently being built instead of the ones that have just finished building. Assuming cargo emits a JSON message when a crate starts the build and when it ends, that should be possible by keeping around the state of which crates have started but not yet ended.

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 locating the check-on-save build-status handling in rust-analyzer and the code that consumes Cargo JSON messages. Trace how completed crates are currently retained for the toolbar, then verify how start and end messages can represent crates still building. Done means the display reports currently building crates rather than the most recently completed crate; no file or test is named in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
developer-experience, tooling
Issue type
Feature
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.