unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Andy Wingo <wingo@pobox.com>
To: ludo@gnu.org (Ludovic Courtès)
Cc: guile-devel@gnu.org
Subject: Re: mtime of fresh .go
Date: Mon, 19 Jul 2010 21:10:20 +0200	[thread overview]
Message-ID: <m3oce31e5f.fsf@unquote.localdomain> (raw)
In-Reply-To: <87vd8cv2v7.fsf@gnu.org> ("Ludovic Courtès"'s message of "Mon, 19 Jul 2010 00:31:24 +0200")

Greets,

On Mon 19 Jul 2010 00:31, ludo@gnu.org (Ludovic Courtès) writes:

> Andy Wingo <wingo@pobox.com> writes:
>
>> On Fri 16 Jul 2010 10:07, ludo@gnu.org (Ludovic Courtès) writes:
>>
>>>   commit 535fb833b34dfc3cc11a679d39390b06fd7e9180
>>>   Author: Andy Wingo <wingo@pobox.com>
>>>   Date:   Fri Jun 5 10:51:21 2009 +0200
>>>
>>>       stamp .go with timestamp of .scm; a fresh go has same mtime of .scm
>>>
>>>       * libguile/load.c (compiled_is_fresh): Rename from compiled_is_newer.
>>>         Check that the mtines of the .go and .scm match exactly, so we don't
>>>         get fooled by rsync-like modifications of the filesystem.
>>>
>>> When packaging things “normally”, the .go has an mtime strictly greater
>>> than that of the source file, so checking for equality doesn’t work.
>>
>> But when reinstalling code from a binary packaging system, sometimes the
>> mtime can go backwards.
>
> Please forgive my ignorance, but can you give an example of how this can
> happen?

Well there are two cases really:

 * RPM or Deb systems typically timestamp their files based on the times
   they were built, not installed, and we don't have guarantees that
   upgrading a package won't actually move the mtime into the past.

 * When installing source code (via _SOURCES / _DATA), you don't have
   any guarantees about the relations between the times of the SOURCE
   and DATA files, *as installed*.

I think, anyway.

> Besides, what do you think packages that install scm and go files should
> do?

Preserve the timestamps as built, as Guile does.

> A package of mine basically lists .go’s in ‘nodist_foobar_DATA’ and
> .scm’s in ‘foobar_SOURCES’ (or similar).  Having to change the mtime of
> .go’s in ‘install-hook’ seems inconvenient and fragile to me.

I agree, FWIW. I don't know of a better option right now, though. We
should look to see what PLT/Racket does, as our current system has a
number of other disadvantages -- if a macro used by a module changes,
the module should be recompiled. Same goes for procedures called by a
macro used by a module, etc. They do it by linking to openssl (gross)
and doing SHA sums of various files, AFAIK, but I don't know all the
details.

Andy
-- 
http://wingolog.org/



  reply	other threads:[~2010-07-19 19:10 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-16  8:07 mtime of fresh .go Ludovic Courtès
2010-07-18 13:03 ` Andy Wingo
2010-07-18 22:31   ` Ludovic Courtès
2010-07-19 19:10     ` Andy Wingo [this message]
2010-07-19 22:17       ` Ludovic Courtès
2010-07-20  7:46         ` Andy Wingo
2010-07-20 16:13           ` Ludovic Courtès
2010-07-20 19:19             ` Andy Wingo
2010-07-21 15:57               ` Ludovic Courtès
2010-07-20  7:46         ` Andy Wingo
2010-07-20 16:30           ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3oce31e5f.fsf@unquote.localdomain \
    --to=wingo@pobox.com \
    --cc=guile-devel@gnu.org \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).