-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Rebuild thrashing when using Rust Analyzer in VSCode with fast build config #14271
Comments
Actually, I was able to get this workaround working, but only after commenting out the |
I believe this is an alternative report of BLAKE3-team/BLAKE3#324 |
Ah, interesting. I did notice that blake3 was the first package that was being recompiled, so I believe it |
I was about to close this issue, but since this has come up time and again, I think it would be good if we documented it somewhere. |
@janhohenheim Has this come up in any other Bevy issues to date? I'm trying to get more info |
@hintron not sure about GitHub issues, but this has definitely come up on Discord a lot. |
Not directly bevy related, but this totally wrecks hot reloading in https://github.com/DGriffin91/ridiculous_bevy_hot_reloading |
I believe I was able to fix the issue upstream in BLAKE3 with this PR: BLAKE3-team/BLAKE3#413. For anyone else having this issue, can you try my bug fix to see if it works? Simply add this to your [patch.crates-io]
# For testing fix for blake3 env change rebuild thrashing issue
blake3 = { git = "https://github.com/hintron/BLAKE3", branch = "hintron/fix-blake-rebuild-issue"} |
Ping @MiniaczQ, you just had this issue |
@hintron Works for me, thanks! |
I confirmed that the issue does not happen on Linux. It seems to be a Windows-only issue. |
Since blake3 just release version 1.5.2 which includes your changes, I'll close it as complete. |
It was fun to debug! Glad to be of help. For anyone else with this issue on Windows with Bevy 0.13 or 0.14, just do |
My problem is that VSCode's Rust Analyzer extension seems to get confused when fingerprinting, marking things as dirty and forcing some crates to rebuild. Perhaps Rust Analyzer isn't respecting the rust flags, or perhaps the envs are different. So Rust Analyzer rebuilds, then I call
cargo check
orcargo build
in the terminal to rebuild, and this repeats, back and forth...Has anyone else run into this issue? I've only just noticed this on Windows + Git Bash after wondering why my rebuilds were so slow.
My
Cargo.toml
contains:and my
.cargo/config.toml
comprises ofThe workaround is probably just to make sure the VSCode Rust Analyzer has its own target directory, but that seems brittle since it's per-IDE and isn't versioned to my repo. I tried
"rust-analyzer.cargo.targetDir": true
, but it still thrashes for me.While I don't think this is Bevy's fault, I do think that this "foot gun" and possible workaround should be warned about in the fast build config docs, since Rust Analyzer hasn't addressed the issue. Also, I'm curious if others can reproduce this.
The text was updated successfully, but these errors were encountered: