GNU bug report logs - #32160
auto compile fails to recompile when included source files change

Previous Next

Package: guile;

Reported by: Arun Isaac <arunisaac <at> systemreboot.net>

Date: Sun, 15 Jul 2018 02:52:01 UTC

Severity: normal

To reply to this bug, email your comments to 32160 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guile <at> gnu.org:
bug#32160; Package guile. (Sun, 15 Jul 2018 02:52:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Arun Isaac <arunisaac <at> systemreboot.net>:
New bug report received and forwarded. Copy sent to bug-guile <at> gnu.org. (Sun, 15 Jul 2018 02:52:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Arun Isaac <arunisaac <at> systemreboot.net>
To: bug-guile <at> gnu.org
Subject: auto compile fails to recompile when included source files change
Date: Sun, 15 Jul 2018 07:49:58 +0530
Guile's auto compile fails to recompile when included source files
change.

For example, I have two source files -- foo.scm and bar.scm. foo.scm
includes bar.scm using `include'. When I run foo.scm for the first time,
it is auto compiled and run correctly. But, if I modify bar.scm and run
foo.scm again, foo.scm is not rebuilt and the old version is run.

Here is a concrete example of what I mean.

$ cat foo.scm
(include "bar.scm")

$ cat bar.scm
(display "old")
(newline)

$ guile -s foo.scm
;;; note: source file /tmp/test/foo.scm
;;;       newer than compiled /home/arun/.cache/guile/ccache/2.2-LE-8-3.A/tmp/test/foo.scm.go
;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0
;;;       or pass the --no-auto-compile argument to disable.
;;; compiling /tmp/test/foo.scm
;;; compiled /home/arun/.cache/guile/ccache/2.2-LE-8-3.A/tmp/test/foo.scm.go
old

$ sed -i 's/old/new/' bar.scm

$ cat bar.scm
(display "new")
(newline)

$ guile -s foo.scm
old

In the last step, guile still printed "old" without recompiling. It
should have recompiled and printed "new".




Information forwarded to bug-guile <at> gnu.org:
bug#32160; Package guile. (Thu, 02 Aug 2018 18:04:01 GMT) Full text and rfc822 format available.

Message #8 received at 32160 <at> debbugs.gnu.org (full text, mbox):

From: Mark H Weaver <mhw <at> netris.org>
To: Arun Isaac <arunisaac <at> systemreboot.net>
Cc: 32160 <at> debbugs.gnu.org
Subject: Re: bug#32160: auto compile fails to recompile when included source
 files change
Date: Thu, 02 Aug 2018 14:01:29 -0400
Hi Arun,

Arun Isaac <arunisaac <at> systemreboot.net> writes:

> Guile's auto compile fails to recompile when included source files
> change.
>
> For example, I have two source files -- foo.scm and bar.scm. foo.scm
> includes bar.scm using `include'. When I run foo.scm for the first time,
> it is auto compiled and run correctly. But, if I modify bar.scm and run
> foo.scm again, foo.scm is not rebuilt and the old version is run.

Yes, this is a known limitation in Guile's auto-compilation support.
Unfortunately, we don't have any system in place to track these
dependencies between modules.  Years ago, I spent some time thinking
about how to do it, but it's nontrivial given the unstructured and
imperative model by which modules load themselves and their
dependencies.  The .go file format would also need to be extended to
embed the dependency information.

There's also the question of how to fingerprint the dependencies.  If
timestamps are used, it would defeat deterministic builds, but if hashes
are used, it might dramatically slow down module loading, especially
given that it would not be sufficient to check the immediate
dependencies: the full transitive closure of the module dependency graph
would need to be traversed.

And then there's the unfortunate fact that although circular module
dependencies are (sensibly) prohibited by standard Scheme and most other
languages, in Guile they are not prohibited, and although they cause a
great many headaches, they sort-of-work if you are lucky, and Guix now
depends heavily on them.  Last I checked, Guix has a large number of
package modules (well over 50, and possibly more than 100 at this point)
that form a strongly connected component in the module dependency graph.

I'm sorry that I don't have a better answer for you.  If you'd like to
investigate further, I'd be glad to give you pointers and advice, but
it's not a project for the faint-hearted :-/

      Regards,
        Mark




Information forwarded to bug-guile <at> gnu.org:
bug#32160; Package guile. (Thu, 02 Aug 2018 18:55:02 GMT) Full text and rfc822 format available.

Message #11 received at 32160 <at> debbugs.gnu.org (full text, mbox):

From: Mark H Weaver <mhw <at> netris.org>
To: 32160 <at> debbugs.gnu.org
Subject: Re: bug#32160: auto compile fails to recompile when included source
 files change
Date: Thu, 02 Aug 2018 14:52:32 -0400
My response to Arun Isaac <arunisaac <at> systemreboot.net> was rejected
by his mail server:

  SMTP error from remote mail server after RCPT TO:<arunisaac <at> systemreboot.net>:
  550 Sender Policy Framework (SPF) verification failed

I do not have DNS records supporting SPF for my domain netris.org, and
apparently his mail server is configured to reject all mail that is not
authenticated by SPF.  So, I'm unable to send him email.  Oh well.  This
is the first time I've run into this problem.

If someone could let him know about this issue, I would be grateful.

      Mark




Information forwarded to bug-guile <at> gnu.org:
bug#32160; Package guile. (Thu, 02 Aug 2018 21:03:02 GMT) Full text and rfc822 format available.

Message #14 received at 32160 <at> debbugs.gnu.org (full text, mbox):

From: Mark H Weaver <mhw <at> netris.org>
To: 32160 <at> debbugs.gnu.org
Subject: Re: bug#32160: auto compile fails to recompile when included source
 files change
Date: Thu, 02 Aug 2018 17:01:20 -0400
Mark H Weaver <mhw <at> netris.org> writes:

> My response to Arun Isaac <arunisaac <at> systemreboot.net> was rejected
> by his mail server:
[...]
> If someone could let him know about this issue, I would be grateful.

tomas <at> tuxteam.de kindly forwarded my messages to Arun, so there's no
need for anyone else to do it now.  Thanks, Tomas!

      Mark




Information forwarded to bug-guile <at> gnu.org:
bug#32160; Package guile. (Fri, 03 Aug 2018 08:36:01 GMT) Full text and rfc822 format available.

Message #17 received at 32160 <at> debbugs.gnu.org (full text, mbox):

From: Arun Isaac <arunisaac <at> systemreboot.net>
To: Mark H Weaver <mhw <at> netris.org>
Cc: tomas <at> tuxteam.de, 32160 <at> debbugs.gnu.org
Subject: Re: bug#32160: auto compile fails to recompile when included source
 files change
Date: Fri, 03 Aug 2018 14:04:48 +0530
>> If you'd like to investigate further, I'd be glad to give you
>> pointers and advice, but it's not a project for the faint-hearted :-/

I am faint-hearted and do not wish to pursue this further. :-P I just
thought it might be useful to report. Should I close this bug report, or
leave it open for someone to fix in the future?




Information forwarded to bug-guile <at> gnu.org:
bug#32160; Package guile. (Fri, 03 Aug 2018 16:37:02 GMT) Full text and rfc822 format available.

Message #20 received at 32160 <at> debbugs.gnu.org (full text, mbox):

From: Mark H Weaver <mhw <at> netris.org>
To: Arun Isaac <arunisaac <at> systemreboot.net>
Cc: tomas <at> tuxteam.de, 32160 <at> debbugs.gnu.org
Subject: Re: bug#32160: auto compile fails to recompile when included source
 files change
Date: Fri, 03 Aug 2018 12:34:40 -0400
Hi Arun,

Arun Isaac <arunisaac <at> systemreboot.net> writes:

>>> If you'd like to investigate further, I'd be glad to give you
>>> pointers and advice, but it's not a project for the faint-hearted :-/
>
> I am faint-hearted and do not wish to pursue this further. :-P I just
> thought it might be useful to report. Should I close this bug report, or
> leave it open for someone to fix in the future?

I'd prefer to leave it open, because it is indeed an important issue
that would be good to fix eventually.

      Thanks!
        Mark




This bug report was last modified 6 years and 315 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.