[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug #46242] Race condition when input file is updated while compili
From: |
David Boyce |
Subject: |
Re: [bug #46242] Race condition when input file is updated while compiling |
Date: |
Wed, 21 Oct 2015 06:08:56 -0700 |
On Tue, Oct 20, 2015 at 2:07 PM, Mike Shal <address@hidden> wrote:
> I would clarify that the benefit from using the technique in that article is
> really because the rebuild algorithm is essentially changed from:
>
> if timestamp(foo.o) < timestamp(foo.c) {rebuild foo.o}
>
> to:
>
> if checksum(foo.c) != last_checksum(foo.c) {rebuild things that depend on
> foo.c}
>
> But you can get pretty much all the same benefits without having to hash
> everything just by doing:
>
> if timestamp(foo.c) != last_timestamp(foo.c) {rebuild things that depend on
> foo.c}
Yes, that’s a good point and it would be somewhat cheaper than
hashing. However, the main concern with either approach doesn’t
involve the cost of hashing source files but the complexity of
preserving state between builds. As you know make is currently
“stateless”, or maybe it’s better to say the only state required is
already held in file inodes without any special intervention required
from make. Adding either feature would require metadata describing the
prior state (whether checksums or timestamps) to be saved from build
to build which opens up many complications and corner cases, some as
noted by Reiner Post.
- [bug #46242] Race condition when input file is updated while compiling, (continued)
- [bug #46242] Race condition when input file is updated while compiling, Egmont Koblinger, 2015/10/18
- Re: [bug #46242] Race condition when input file is updated while compiling, Edward Welbourne, 2015/10/18
- Re: [bug #46242] Race condition when input file is updated while compiling, Egmont Koblinger, 2015/10/20
- Re: [bug #46242] Race condition when input file is updated while compiling, Mike Shal, 2015/10/20
- Re: [bug #46242] Race condition when input file is updated while compiling, Egmont Koblinger, 2015/10/21
- Re: [bug #46242] Race condition when input file is updated while compiling, David Boyce, 2015/10/22
- Re: [bug #46242] Race condition when input file is updated while compiling, Egmont Koblinger, 2015/10/22
- Re: [bug #46242] Race condition when input file is updated while compiling,
David Boyce <=
- Re: [bug #46242] Race condition when input file is updated while compiling, Reinier Post, 2015/10/20