Skip to content
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

Cancel Clippy/Check When Running Test #18515

Open
arendjr opened this issue Nov 15, 2024 · 2 comments
Open

Cancel Clippy/Check When Running Test #18515

arendjr opened this issue Nov 15, 2024 · 2 comments
Labels
C-feature Category: feature request

Comments

@arendjr
Copy link

arendjr commented Nov 15, 2024

When using VS Code, I regularly find myself in a workflow where I'm writing tests, making adjustments, and running the tests. In this scenario I regularly find myself in a situation where my test run is temporarily blocked by Cargo because a cargo check or cargo clippy is still running.

If my understanding is correct, both the request for running the test and the request for Clippy is submitted by Rust Analyzer. Would it be possible for Rust Analyzer to prioritize the test run so I don't have to wait for Clippy to finish first? I would even be content if it means killing the Clippy request and restarting it when the test run is complete.

@arendjr arendjr added the C-feature Category: feature request label Nov 15, 2024
@Giga-Bowser
Copy link
Contributor

For what it's worth, in VS Code you can fix this by adding "rust-analyzer.server.extraEnv": { "CARGO_TARGET_DIR": "target/rust-analyzer" } to your settings.json. This will make rust-analyzer use a separate target directory, which does waste disk space, especially on larger projects, so I wouldn't be opposed to a better solution as a feature.

@arendjr
Copy link
Author

arendjr commented Nov 18, 2024

Thanks for the suggestion, but unfortunately it doesn't seem to work with the project I'm working on. There's a custom build.rs responsible for building C dependencies and it makes some assumptions about the layout for the target directory which are broken if I do this...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature Category: feature request
Projects
None yet
Development

No branches or pull requests

2 participants