-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add a new config that limits workspace checks to single crates #13336
Conversation
Allow RA to ignore checking workspaces when single subcrates are open. When the workspace is open, RA will still check the entire workspace. But, now when a single crate is open, RA won't check those.
I'll hold off with reviewing this for a bit as I am currently thinking about config interpolation which might make an extra config for this unnecessary (we'd basically allow setting the overrideCommand to something that uses |
This PR kinda-sorta adds this interpolation, but only when using the flag enabled. Essentially it checks if the root Cargo.toml is the same as the workspace, and if it is, then it uses the workspace Cargo.toml. Otherwise, it tries to check if the root cargo.toml is a single crate, and if it is, then it uses the single crate cargo check. |
☔ The latest upstream changes (presumably #13128) made this pull request unmergeable. Please resolve the merge conflicts. |
@rustbot claim |
@rustbot release-assignment oops, clicked into wrong issue, apologies. |
What is missing for this to be finalized/merged? I've run into this issue more than once on even small workspaces where I just want to possibly share dependency targets and have a semantic grouping of the crates, but where I only want to check one crate at a time (since only one is open in the editor!) and would love to have this not be super slow. |
Seconding what @mikkelens says. If there's any further work to get this over the finish line I'd be willing to put some time in to make it happen. |
I've since changed my mind on the interpolation. We might end up having it, but it should not be valid / used for the non-override cargo commands. I'll close this and re-implement the feature in a way that makes use of the |
Allow RA to ignore checking workspaces when single subcrates are open.
When the workspace is open, RA will still check the entire workspace.
But, now when a single crate is open, RA won't check those.
When working in subcrates on large workspaces, my checks go from:
Screen.Recording.2022-10-02.at.3.27.30.PM.mov
To:
Screen.Recording.2022-10-02.at.4.20.19.PM.mov
Solves #12882, #10669
Adds the config flag
checkSingleCrate.enable
which is passed to flycheck