From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Mark H Weaver Newsgroups: gmane.lisp.guile.bugs Subject: bug#32160: auto compile fails to recompile when included source files change Date: Thu, 02 Aug 2018 14:01:29 -0400 Message-ID: <87muu4ve9y.fsf@netris.org> References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1533232928 5121 195.159.176.226 (2 Aug 2018 18:02:08 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 2 Aug 2018 18:02:08 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) Cc: 32160@debbugs.gnu.org To: Arun Isaac Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Thu Aug 02 20:02:04 2018 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1flHvH-0001BO-7U for guile-bugs@m.gmane.org; Thu, 02 Aug 2018 20:02:03 +0200 Original-Received: from localhost ([::1]:47244 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1flHxN-0004m9-QQ for guile-bugs@m.gmane.org; Thu, 02 Aug 2018 14:04:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39244) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1flHxI-0004m2-3P for bug-guile@gnu.org; Thu, 02 Aug 2018 14:04:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1flHxC-0003M2-Dr for bug-guile@gnu.org; Thu, 02 Aug 2018 14:04:08 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:34227) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1flHxC-0003Lo-90 for bug-guile@gnu.org; Thu, 02 Aug 2018 14:04:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1flHxB-0002Wb-Re for bug-guile@gnu.org; Thu, 02 Aug 2018 14:04:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Mark H Weaver Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Thu, 02 Aug 2018 18:04:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 32160 X-GNU-PR-Package: guile X-GNU-PR-Keywords: Original-Received: via spool by 32160-submit@debbugs.gnu.org id=B32160.15332329819625 (code B ref 32160); Thu, 02 Aug 2018 18:04:01 +0000 Original-Received: (at 32160) by debbugs.gnu.org; 2 Aug 2018 18:03:01 +0000 Original-Received: from localhost ([127.0.0.1]:39245 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1flHwD-0002V6-7O for submit@debbugs.gnu.org; Thu, 02 Aug 2018 14:03:01 -0400 Original-Received: from world.peace.net ([64.112.178.59]:52874) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1flHwB-0002Uo-Fi for 32160@debbugs.gnu.org; Thu, 02 Aug 2018 14:02:59 -0400 Original-Received: from mhw by world.peace.net with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1flHw5-0001A4-OF; Thu, 02 Aug 2018 14:02:53 -0400 In-Reply-To: (Arun Isaac's message of "Sun, 15 Jul 2018 07:49:58 +0530") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Original-Sender: "bug-guile" Xref: news.gmane.org gmane.lisp.guile.bugs:9103 Archived-At: Hi Arun, Arun Isaac 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