-
Notifications
You must be signed in to change notification settings - Fork 415
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
Excessive rebuilding when nothing changed #3346
Comments
That's unfortunate. I suspected it might be the case, but was hoping it's just some easy to fix bug in a build script. |
@guilload suggested running |
I think we might be also affected by bytecodealliance/rustix#562 I see this all the time while running tests in VSCode on both 1.68 and 1.69
|
Could you try adding |
@sunfishcode with
That in turn triggers rebuild of the rest of quickwit codebase that depends on quickwit-common. |
@sunfishcode one additional observation that might be important here. We also pull rustix v0.37.19 as part of another dependency and it doesn't have the same issue. |
Thanks! Looking into it, this is likely to be due to an issue which was fixed in rustix 0.37, so I've now backported the fix to 0.36 and released it in 0.36.14. |
@sunfishcode wow, that was fast! Thanks a lot, that really helps. While it doesn't solve the original issue (it seems that we have a somewhat similar problem with proc-macro2) the new version resolved many issues that I had in VS Code interactions while switching between building and running tests. |
I think I figured it out. It looks like a regression in rust. Unfortunately, I cannot reproduce it using a small project with a manageable size, but I know the mechanism that is causing the issue and know how to fix it. I suspect the issue is triggered by this change in 1.69.0 that is producing different command lines for building crates with
When it is built using
The lines are basically identical with a very small inclusion. The first line has
with
fixes the issue. |
This version of rustix no longer causes recompilation during tests runs while using VSCode. This commit also works around a bug introduced in rust 1.69.0 that was causing rebuilding between cargo build and cargo run. Fixes quickwit-oss#3346
This version of rustix no longer causes recompilation during tests runs while using VSCode. This commit also works around a bug introduced in rust 1.69.0 that was causing rebuilding between cargo build and cargo run. Fixes #3346
I opened rust-lang/cargo#12163 |
Based on the description of the issue in the previous comment, we might need to circle back to this. The workaround that I proposed is currently not working in nightly. |
Describe the bug
In the last 3 weeks (between 36051bd and the current main branch) something changed that causes cargo to do partial rebuild when it is not really necessary. This is especially noticeable in VSCode on slow machines or while working with containers and trying to execute something on command line.
Steps to reproduce (if applicable)
Steps to reproduce the behavior:
Expected behavior
3 weeks ago the
run
command started the service immediately. Now it goes through a partial rebuild process that takes minutes on some machine.The text was updated successfully, but these errors were encountered: