Skip to content
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

Build is always executed if mtimes are missing #4425

Closed
matklad opened this issue Aug 23, 2017 · 5 comments
Closed

Build is always executed if mtimes are missing #4425

matklad opened this issue Aug 23, 2017 · 5 comments
Labels
A-rebuild-detection Area: rebuild detection and fingerprinting C-bug Category: bug

Comments

@matklad
Copy link
Member

matklad commented Aug 23, 2017

Today a user handled me a rar archive (from a windows machine) with a Cargo package. When I extracted it on my linux machine, I've noticed that cargo build always rebuilds the project, instead of doing zero builds. Looks like the problem is that extracted files miss mtimes, so we always rebulid in here:

let should_rebuild = match (*on_disk_mtime, *previously_built_mtime) {
(None, None) => false,
(Some(_), None) | (None, Some(_)) => true,

Seems like a niche use case, and I am not sure how to fix it properly (touching files seems inappropriate?), but lets log the issue anyways!

@alexcrichton
Copy link
Member

Hm I'm not actually sure how an mtime can be missing... Did the archive include the target directory with fingerprints?

@matklad
Copy link
Member Author

matklad commented Aug 23, 2017

Hm, that's super weird. I've tried to reproduce it now, and I can't =/ I would say it was a hallucination, if not for the fact that I happen to have one of terminal tabs with experiments laying around, which clearly shows rebuild happening: https://gist.github.com/matklad/0fe6554ecf473b3af9e511e197921614

Did the archive include the target directory with fingerprints?

Yeah, but I think I've tried removing the target directory, and rebuilds still happened, but given that I can't reproduce even the original issue, I am not sure in anything now...

@matklad
Copy link
Member Author

matklad commented Aug 23, 2017

For the context, the upstream issue is intellij-rust/intellij-rust#1644, which also looks rather mysterious...

@carols10cents carols10cents added C-bug Category: bug A-rebuild-detection Area: rebuild detection and fingerprinting labels Aug 27, 2017
@eminence
Copy link
Contributor

Triage: This issue is quite old, and seemingly hard to reproduce. There's a lot of discussion (some even recent!) in #6529 about moving away from mtimes and to try things like checking hashes.

Given this issue here doesn't seem particularly actionable, it probably makes the most sense to just close it.

@ehuss
Copy link
Contributor

ehuss commented Nov 23, 2022

Yea, without a clear reproduction this probably isn't actionable.
Also, the fingerprint code has changed a lot since this was written, and it may be possible that it no longer behaves the same.

@ehuss ehuss closed this as not planned Won't fix, can't repro, duplicate, stale Nov 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rebuild-detection Area: rebuild detection and fingerprinting C-bug Category: bug
Projects
None yet
Development

No branches or pull requests

5 participants