Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] sound incremental builds

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] sound incremental builds


Chronological Thread 
  • From: David Holland <dholland-coq AT netbsd.org>
  • To: coq-club AT inria.fr
  • Subject: Re: [Coq-Club] sound incremental builds
  • Date: Sun, 19 Jul 2020 00:31:52 +0000
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=dholland-coq AT netbsd.org; spf=Pass smtp.mailfrom=dholland AT netbsd.org; spf=None smtp.helo=postmaster AT mail.netbsd.org
  • Ironport-phdr: 9a23:UnFdeh/J+zZOpv9uRHKM819IXTAuvvDOBiVQ1KB42uwcTK2v8tzYMVDF4r011RmVBNudt6oP0LWempujcFRI2YyGvnEGfc4EfD4+ouJSoTYdBtWYA1bwNv/gYn9yNs1DUFh44yPzahANS47xaFLIv3K98yMZFAnhOgppPOT1HZPZg9iq2+yo9JDffgRFiCCybL9uIxm7owfcvdQKjIV/Lao81gHHqWZSdeRMwmNoK1OTnxLi6cq14ZVu7Sdete8/+sBZSan1cLg2QrJeDDQ9LmA6/9brugXZTQuO/XQTTGMbmQdVDgff7RH6WpDxsjbmtud4xSKXM9H6QawyVD+/6apgVR3mhzodNzMh/m/ZitJ+gr9YrhKvqBNw35Pbb4ObO/dlYqPRYckXSXZdUstLSSBMBJ63YYsVD+oGOOZVt4fzqEEQrRu/GAanGeHhyjhMhn/yx6I61fkuGhzB0QM9H9IOt3DUrNHvO6cUTO+51bXHzTLab/5N3zfy9pTIfQs6of6RR75wdtDRyUY2Gg7Dk16fppDrMSmP2eQRr2iU8fBgVeS3hmMjpQx8oyaiytkoh4THgo8Y117J+yV6zYg6ONC2SFB2bcCkHpZStyyWKZd7T98iTm11uSs3xaEKtJ2ncSUU1JgqwQPUZf+fc4WQ/x7uUOKcLS1miH9rdr+znQi+/VWix+HmSMW4zEpGoyxYmdfWrH8NzQbc6s2fR/t94Eih3TGP2hjW6u5eIEA0kbDXK5g/zb4sjZUTqlnMEjXxmEXsg6+abkQk+u625OT7erjqu5uROotuhg3gPKkjlNazDfolPgUMRWSX5/iw2KH78U38WrpKj/k2kqfDsJDdIMQWvrO2Aw9S0oYn7xawFTGm38kDkHkBMl1FZAmIj5P0NF3UJ/D4F/i/j0y2kDh33/DGIqHhApLVI3ffl7fhZK9x5FJYyAou1t9S/IlUC7EEIPLrQED9rt3YDhkjMwy12enrEtt91plNEV6IV6SeKebZtUKCzuMpOeiFIoEP6xjnLP1wy/fwjHNxuVgZeaCv0dNDZHC/GvBvJUncan31qtEMDW0Rskw5VuO82w7KaiJae3vnB/F03To8Eo/zVd6fFLDou6SI2WKAJrMTfnpPUwreF3r0fZ6IHfAWZ3DKe54zonk/TbGkDrQZ+1SrvQ7+xaBgK7OOqCsVqZj42J5y/eKBzEhvpwwxNNyU1iS2d08xnm4MQGZpjqV2oEg7zFqf27N0xftCGo4L6g==

On Fri, Jul 17, 2020 at 06:24:31PM -0700, Abhishek Anand wrote:
> I want to avoid ever having to do clean builds (`make clean`) and still
> ensure soundness of the build.
> [...]
> Below is an approach that I think works. I'd appreciate counterexamples or
> arguments why this is correct:
> 1) delete every .vo, .vio, .vos, .glob file that does not correspond to a
> .v file in X/_CoqProject.
> 2) reinvoke coq_makefile on X/_CoqProject to regenerate X/Makefile
> 3) `make`.

Don't forget to also delete leftover .foo.aux files.

That said, there are always cases where you have to make clean,
because make relies on timestamps to detect when files have been
changed and timestamps can get screwed up. For example, if you
accidentally set your clock forward a week and work for a while before
fixing it, you'll likely be left with build products dated in the
future that won't be rebuilt properly.

Timestamps also don't (normally) cover all the possible things that
might change your build; e.g. when you update Coq you need to make
clean, and you generally want or need to if you change build settings.

And if the storage you're working from runs over a network (including
most cases of being shared inside and outside a VM) you can get
various problems arising from clock skew, and if you access such
storage from two or more places, sometimes cache (in)consistency as
well. (The latter is particularly bad with NFS because there are no
consistency guarantees at all, just some ad hoc timeouts, and
timestamp changes don't necessarily propagate at the same time as file
contents changes.)

Other than things like that though... make is supposed to give you
consistent builds, and coq_makefile is supposed to produce correct
makefiles, so if it doesn't work it's a bug in (most likely)
coq_makefile or (quite unlikely) make or the OS.

--
David A. Holland
dholland AT netbsd.org



Archive powered by MHonArc 2.6.19+.

Top of Page