rust-analyzer icon indicating copy to clipboard operation
rust-analyzer copied to clipboard

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

Open RalfJung opened this issue 7 months ago • 3 comments

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.

RalfJung avatar Jun 09 '25 10:06 RalfJung

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.

I believe it doesn't, otherwise yes we should do that

Veykril avatar Jun 09 '25 13:06 Veykril

Ah, if it does not then that would be a cargo feature request I guess. :) Cc @weihanglo @epage

RalfJung avatar Jun 09 '25 14:06 RalfJung

Sounds good. I have no objection to extending Cargo's JSON message, though probably better looking at all timings related options in both rustc and cargo, and see if we can unify the schema

weihanglo avatar Jun 09 '25 15:06 weihanglo