Hacker News new | ask | show | jobs
by actionfromafar 73 days ago
Not sure it was meant as sarcasm really. I just think so many build (and other) problems could have been avoided it a file hash was available on every file by default.
1 comments

That hash would be expensive to maintain, and the end result would still be racy since the file could be modified after the hash was read .
In the current POSIX paradigm yes, it would be expensive. But if the hash was defined as the hash of fixed blocks, it wouldn't be expensive. The raciness depends, a lot, on the semantics we would define. (In the context of a build system, it's no different than that the file could get a new mtime after we read the mtime.)