comp.lang.ada
 help / color / mirror / Atom feed
From: briot.emmanuel@gmail.com
Subject: Re: GNAT Modification_Time limitation
Date: Tue, 20 Nov 2018 00:08:52 -0800 (PST)
Date: 2018-11-20T00:08:52-08:00	[thread overview]
Message-ID: <04221674-95d8-4d4a-8743-42877b13eead@googlegroups.com> (raw)
In-Reply-To: <0577e947-d691-4b81-aca6-b2e86bbef634@googlegroups.com>

> 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, both 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 have the same time stamp (to the second). gprbuild sees that the modification time appears to be the same, and thus doesn't recompile.

Two points:
   - AdaCore mentioned they made progress recently on timestamp precision and it would likely fix the scenario. I think this is similar to what you reported, so it is likely your issue has been fixed now.

   - I am arguing with AdaCore that checking timestamps is not enough (might not even be useful at all), as Shark8 mentioned. The scenario I have is the following:

       Create a project with one scenario variable. Depending on that variable, 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 nothing the second time.

I had a similar real case because git created two files with the same timestamp. 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 perhaps 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


  parent reply	other threads:[~2018-11-20  8:08 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-19 22:56 GNAT Modification_Time limitation Lionel Draghi
2018-11-20  0:47 ` Shark8
2018-11-20  1:33   ` Keith Thompson
2018-11-20  1:33 ` Keith Thompson
2018-11-20 23:32   ` Randy Brukardt
2018-11-21  8:23     ` Dmitry A. Kazakov
2018-11-20  8:08 ` briot.emmanuel [this message]
2018-11-20 11:57   ` Lionel Draghi
2018-11-21  7:40     ` briot.emmanuel
2018-11-21 11:16       ` briot.emmanuel
2018-11-21 19:13         ` Lionel Draghi
2018-11-21 19:02       ` Lionel Draghi
2018-11-21 19:48         ` Simon Wright
2018-11-21 22:14           ` Lionel Draghi
2018-11-20 23:53   ` Randy Brukardt
2018-11-21  7:31     ` briot.emmanuel
2018-11-21 14:38       ` Shark8
2018-11-21 17:32       ` Simon Wright
2018-11-21 17:43         ` briot.emmanuel
2018-11-21 23:34       ` Randy Brukardt
2018-11-22  8:15         ` briot.emmanuel
2018-11-26 23:45           ` Randy Brukardt
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox