sometimes I get this below message whenever I try to build my code. And it will not go away until I do something like
cargo clean or closing the codebase which is already opened in
vscode. what's the right way of getting rid of this issue
Blocking waiting for file lock on build directory
Depending on what
vscode plugin you use, it might be running some other
cargo check invocation (or similar) in the background. Are you sure it doesn't go away once you wait long enough for other jobs to finish? (I don't know how large the project is / how long e. g.
cargo check would run.)
If it's a different problem, the fact that closing
vscode makes the problem of away is still curious.
In any case, to find out more, you can/should try to check what tasks are running in the background (in particular
rustc) while the
Blocking message is visible.
Feel free to ask follow-up questions with more context / information you found.