-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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 always rebuilds the project even when no changes made on WSL #13119
Comments
Looks like pretty similar or probably the same as #12060? Sorry I am not familiar with WSL. Is it WSL that does not support filesystem in nanosecond precision, or you have a special fs or NFS? BTW, I believe tokio supports Windows. |
If possible, could you include a minimal reproduce to help debug? Either uploading the repo as a zip file here, or a GitHub repo link works :) |
Hi @weihanglo, |
WSL or WSL 2? |
it looks your project was placed in the windows file system, i recomment you create a new project on the linux side, like in |
@weihanglo, @sanmai-NL @linyihai |
I experience same problem recently.
somehow cargo rebuild every crate. |
I'm having a similar issue, with WSL2 on top of Windows 10. It doesn't seem to depend at all on what particular dependency I add; it has nothing in particular to do with tokio. Occasionally I can even manage to reproduce it with an empty crate with no dependencies at all. Here's a transcript reproducing the issue in an empty directory. Shouldn't require any other code to reproduce it.
BUT ALSO. @linyihai is right. It only happens when the code is actually stored on the Windows file system, accessed through WSL (usually on /mnt/c/...). And it does appear to have something to do with nanoseconds... |
I am running ubuntu on vmware, and I still have this issue. |
Can you guys log information about the clock under the VM? And all Cargo logs related to caching? And then the actual filesystem timestamps. |
Are you using a shared filesystem? |
@ChrisDenton No. |
any progress on this issue,I still have this problem. |
#13955 might help |
I've also experienced a similar issue and moving the repo from the windows fs ( |
Problem
My project depends on
tokio
which doesn't support Windows. I run all build activities on WSL1. Cargo always recompiles the sources even if I have no changes.Following the docs I run build with
CARGO_LOG
and there are logs (some info omitted):As you can see, nanoseconds are stripped by filesystem for files created by WSL.
Steps
cargo build
cargo build
cargo build
Possible Solution(s)
Ignore nanoseconds for file timestamps on WSL.
Notes
No response
Version
Footnotes
WSL is a Linux VM hosted by Windows which uses a shared filesystem. ↩
The text was updated successfully, but these errors were encountered: