-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
cargo check should be able to run in parallel to cargo build/run #5169
Comments
I believe one solution to this is to set the environment variable Edit: This is essentially the same as #5148. |
Thanks. Just to clarify, isn't it compiling everything twice already, once for |
Compiling twice is a downside, my machine burns CPU a lot. But I can live with it for a while. Intelij uses a lot more anyway. |
@ehuss So I just have to create a "env":
{
"Windows":
{
"CARGO_TARGET_DIR": "target-check"
},
"Darwin":
{
"CARGO_TARGET_DIR": "target-check"
},
"Linux":
{
"CARGO_TARGET_DIR": "target-check"
}
} @avkonst So you are also running into this issue? watchexec/cargo-watch#82 |
Err, if "the |
If you want persistent per-project settings, you'll need to run Project > Save Project to create a I'd recommend running the {
"folders": [ { "path": "." } ],
"settings": {
"cargo_build": {
"variants": {
"check": {
"env": {
"CARGO_TARGET_DIR": "target-check"
}
}
}
}
}
} |
We have #3501 for reusing information between Even without that, one area they can't run in parallel is for build scripts in the dependency tree. #4001 requests distinct build scripts between check/build so that could change. Handling the locking for running these in parallel would be messy but maybe the target directory changes we want for #5931 could help. Overall, I lean more towards people using distinct |
My usual workflow is to use Ctrl-B in Sublime to do
cargo check
and in a separate cmd window havecargo watch -x run
running so that it always runs the latest version of my application.But the problem is, both commands demand exclusive access to the build, and often, when I press Ctrl-B,
cargo watch -x run
is faster in acquiring the lock than thecargo check
spawned by Sublime, and then I have to wait for a minute before the check runs and another minute before I can get the errors highlighted inside my source..This is very frustrating, it should be possible to run both in parallel.
The text was updated successfully, but these errors were encountered: