feat/bug: slow check times -> perhaps add dependency aware version of check.workspace=false #17255
Labels
A-diagnostics
diagnostics / error reporting
A-perf
performance issues
C-feature
Category: feature request
Today, in our company workspace, when I save a file in a binary leaf crate - e.g. an alteration to
main.rs
, it takes:Depending on what check-on-save command I am using and the value of check.workspace.
With just cargo at the command line,
Changing a mid-layer crate, and clippy --workspace takes ~ 4 seconds or so.
Which is fine, but the times from RA itself are not.
With
check.workspace = True
, every crate in a workspace - we're at 90 - has the check command run when a file is saved.This takes some time but when a public interface is changed and causes another crate to fail, that is picked up immediately.
With
check.workspace = False
, only the package the file belongs to is rechecked, but changes that alter public interfaces go unnoticed until those other crates are saved.What I would love is a version that runs check on the closure of the reverse dependencies of the package the saved file was in.
For example, imagine that we have a proc macro crate, a library that works in concert with that proc macro crate - including re-exporting it, and a binary:
binary
saving a file in binary would check binary
saving a file in library would check binary and library
saving a file in proc-macro would check binary and library and proc-macro
Alternatively, if RA would literally run 'clippy --workspace' or 'check --workspace' that would also solve things.
The text was updated successfully, but these errors were encountered: