-
Notifications
You must be signed in to change notification settings - Fork 379
Document fixes / workarounds for rust-analyzer breaking incremental recompiles #778
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
Comments
Presumably this is a problem for other Language Server Protocols (LSPs) as well. rust-analyzer is the one I'm most concerned about though, as new programmers tend to use VSCode and have less capacity for troubleshooting this sort of thing on their own. |
I think |
Thats me! Ended up trying option 1 in settings.json
and everything seems to be working fine now |
You can also tell rust analyzer to use the same features you are using with cargo run. (Usually bevy/dynamic_linking) that way it's able to reuse build artifacts between them. That has the advantage of not doubling the size of the target directories on disk, but the drawback of sometimes locking the build until it finishes, the build will be faster when it does run though. I personally started using the separate build directory, but I have seen people complain about the size of the target directory before so I'm not sure doubling it is ideal for everyone. |
So I'm seeing two approaches here:
|
Sscache doesn't cache incrementally compiled crates, which for debug builds by default means your project crate and any path dependencies. It also doesn't work for dynlib crates, so not bevy if you use dynamic_linking. So imo sscache is not really a good solution to this problem, just might make the conflict resolution happen quicker and is limited at doing that. The other two approaches prevent the conflict. |
A user ran into this problem after following the linked advice on fast compiles.
I'm not entirely sure on the best solution.
We could:
rust-analyzer
specific target dir rust-lang/rust-analyzer#15681The text was updated successfully, but these errors were encountered: