From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Received: by 2002:a5e:c10a:: with SMTP id v10-v6mr608752iol.12.1542701333157; Tue, 20 Nov 2018 00:08:53 -0800 (PST) X-Received: by 2002:a9d:da3:: with SMTP id 32mr19416ots.3.1542701332799; Tue, 20 Nov 2018 00:08:52 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!news.mixmin.net!proxad.net!feeder1-2.proxad.net!209.85.166.215.MISMATCH!z5-v6no176840ite.0!news-out.google.com!v141ni245ita.0!nntp.google.com!z5-v6no176838ite.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Tue, 20 Nov 2018 00:08:52 -0800 (PST) In-Reply-To: <0577e947-d691-4b81-aca6-b2e86bbef634@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=89.20.165.59; posting-account=6yLzewoAAABoisbSsCJH1SPMc9UrfXBH NNTP-Posting-Host: 89.20.165.59 References: <0577e947-d691-4b81-aca6-b2e86bbef634@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <04221674-95d8-4d4a-8743-42877b13eead@googlegroups.com> Subject: Re: GNAT Modification_Time limitation From: briot.emmanuel@gmail.com Injection-Date: Tue, 20 Nov 2018 08:08:53 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader01.eternal-september.org comp.lang.ada:54847 Date: 2018-11-20T00:08:52-08:00 List-Id: > I am coding a kind of make application, that depends on file's time tag (= thanks to Ada.Directories.Modification_Time), and on Ada.Calendar.Clock, bo= th returning Ada.Calendar.Time. Interesting. I am in the middle of a discussion with AdaCore about gprbuild= , which fails to recompile when using an alternative body that happens to h= ave the same time stamp (to the second). gprbuild sees that the modificatio= n time appears to be the same, and thus doesn't recompile. Two points: - AdaCore mentioned they made progress recently on timestamp precision a= nd it would likely fix the scenario. I think this is similar to what you re= ported, so it is likely your issue has been fixed now. - I am arguing with AdaCore that checking timestamps is not enough (migh= t not even be useful at all), as Shark8 mentioned. The scenario I have is t= he following: Create a project with one scenario variable. Depending on that varia= ble, chose src1 or src2 for source dirs. In each of these directories, have= a file utils.adb with a different content. "touch" these two files so that= they have the same timestamp. If you build your application once with one = value of the variable, then rebuild with another value, gprbuild does nothi= ng the second time. I had a similar real case because git created two files with the same times= tamp. And then it took me days to understand why some of my tests appeared = to be linked with both versions of utils.adb, since I could see in the log = file traces from both src1/utils.adb and src2/utils.adb. Very very confusing. So I would indeed recommend that you don't bother with timestamps, and only= look at file contents (or use timestamp+file path at the very least, or pe= rhaps inodes). I am interested in hearing more why you want to code a new 'make-like' ? Now trying to persuade AdaCore that gprbuild's behavior is incorrect... Emmanuel