GNU bug report logs - #36511
extraneous recompiles of scm files while editing gnu/packages/

Previous Next

Package: guix;

Reported by: Robert Vollmert <rob <at> vllmrt.net>

Date: Fri, 5 Jul 2019 14:24:02 UTC

Severity: normal

Full log


View this message in rfc822 format

From: Robert Vollmert <rob <at> vllmrt.net>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 36511 <at> debbugs.gnu.org
Subject: bug#36511: extraneous recompiles of scm files while editing gnu/packages/
Date: Tue, 9 Jul 2019 17:45:18 +0200
Hi Ludo’,

thanks for looking into this!

On 9. Jul 2019, at 00:15, Ludovic Courtès <ludo <at> gnu.org> wrote:
> Robert Vollmert <rob <at> vllmrt.net> skribis:
>> Here’s another example, while working on a local checkout of a channel.
>> Calling `guild compile` just makes things worse.
>> 
>> $ rm -rf ~/.cache/guile
>> $ guix build -L . -L ../guix-postgrest puzzledb-frontend
>> ;;; note: source file ../guix-postgrest/bytestring.scm
>> ;;;       newer than compiled /gnu/store/sk1j6fkh855cm6ypp6799pgf8wvnlk76-postgrest/lib/guile/2.2/site-ccache/bytestring.go
>> ;;; note: source file ../guix-postgrest/check.scm
>> ;;;       newer than compiled /gnu/store/sk1j6fkh855cm6ypp6799pgf8wvnlk76-postgrest/lib/guile/2.2/site-ccache/check.go
> 
> That’s bad (it’s even worse than having to type ‘make’ in the
> development environment IMO because it’s a “user-facing” interface.)
> 
> How about the patch below?  That turns on auto-compilation, which is
> probably a good thing in this context; as a side-effect, messages like
> those above should disappear.
> 
> The only downside is ABI breakage: if we change the ABI of the <package>
> record type (which is quite rare), then your channel code will no longer
> run; you’ll get a message like:
> 
>  "<package>: record ABI mismatch; recompilation needed"
> 
> and you’ll have to “rm -rf ~/.cache/guile”.
> 
> Actually we could probably catch ‘record-abi-mismatch-error’ and
> auto-compile when that happens.


I’ve applied your patch and am testing it now. At first glance it doesn’t
improve the situation, compare the output below of running `guix build -L .`
similar to before, after having edited check.scm.

$ guix build -L . postgrest
;;; note: source file ./bytestring.scm
;;;       newer than compiled /gnu/store/v5a8qdcpp32ymfdasfql6n0g13zjkrb9-postgrest/lib/guile/2.2/site-ccache/bytestring.go
;;; found fresh local cache at /home/rob/.cache/guile/ccache/2.2-LE-8-3.A/home/rob/guix-postgrest/bytestring.scm.go
;;; note: source file ./check.scm
;;;       newer than compiled /gnu/store/v5a8qdcpp32ymfdasfql6n0g13zjkrb9-postgrest/lib/guile/2.2/site-ccache/check.go
;;; note: source file ./check.scm
;;;       newer than compiled /home/rob/.cache/guile/ccache/2.2-LE-8-3.A/home/rob/guix-postgrest/check.scm.go
;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0
;;;       or pass the --no-auto-compile argument to disable.
;;; compiling ./check.scm
;;; note: source file ./control.scm
;;;       newer than compiled /gnu/store/v5a8qdcpp32ymfdasfql6n0g13zjkrb9-postgrest/lib/guile/2.2/site-ccache/control.go
;;; found fresh local cache at /home/rob/.cache/guile/ccache/2.2-LE-8-3.A/home/rob/guix-postgrest/control.scm.go
;;; note: source file ./text.scm
[…]

Cheers
Robert






This bug report was last modified 5 years and 336 days ago.

Previous Next


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