From mboxrd@z Thu Jan 1 00:00:00 1970 From: Robert Vollmert Subject: bug#36511: extraneous recompiles of scm files while editing gnu/packages/ Date: Tue, 9 Jul 2019 17:45:18 +0200 Message-ID: <3B72FD49-5C2D-40FA-885E-4D3380CB084A@vllmrt.net> References: <87k1cwjjul.fsf@gnu.org> <878st8g7w0.fsf@gnu.org> <87k1csb2bx.fsf@gnu.org> Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:50153) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hksJj-0000L6-Tk for bug-guix@gnu.org; Tue, 09 Jul 2019 11:46:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hksJd-00050F-VQ for bug-guix@gnu.org; Tue, 09 Jul 2019 11:46:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:53258) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hksJd-000505-Qa for bug-guix@gnu.org; Tue, 09 Jul 2019 11:46:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hksJd-0003iK-Nm for bug-guix@gnu.org; Tue, 09 Jul 2019 11:46:01 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <87k1csb2bx.fsf@gnu.org> List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 36511@debbugs.gnu.org Hi Ludo=E2=80=99, thanks for looking into this! On 9. Jul 2019, at 00:15, Ludovic Court=C3=A8s wrote: > Robert Vollmert skribis: >> Here=E2=80=99s another example, while working on a local checkout of = a channel. >> Calling `guild compile` just makes things worse. >>=20 >> $ 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-c= cache/bytestring.go >> ;;; note: source file ../guix-postgrest/check.scm >> ;;; newer than compiled = /gnu/store/sk1j6fkh855cm6ypp6799pgf8wvnlk76-postgrest/lib/guile/2.2/site-c= cache/check.go >=20 > That=E2=80=99s bad (it=E2=80=99s even worse than having to type = =E2=80=98make=E2=80=99 in the > development environment IMO because it=E2=80=99s a =E2=80=9Cuser-facing=E2= =80=9D interface.) >=20 > 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. >=20 > The only downside is ABI breakage: if we change the ABI of the = > record type (which is quite rare), then your channel code will no = longer > run; you=E2=80=99ll get a message like: >=20 > ": record ABI mismatch; recompilation needed" >=20 > and you=E2=80=99ll have to =E2=80=9Crm -rf ~/.cache/guile=E2=80=9D. >=20 > Actually we could probably catch =E2=80=98record-abi-mismatch-error=E2=80= =99 and > auto-compile when that happens. I=E2=80=99ve applied your patch and am testing it now. At first glance = it doesn=E2=80=99t 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-c= cache/bytestring.go ;;; found fresh local cache at = /home/rob/.cache/guile/ccache/2.2-LE-8-3.A/home/rob/guix-postgrest/bytestr= ing.scm.go ;;; note: source file ./check.scm ;;; newer than compiled = /gnu/store/v5a8qdcpp32ymfdasfql6n0g13zjkrb9-postgrest/lib/guile/2.2/site-c= cache/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.s= cm.go ;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=3D0 ;;; 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-c= cache/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 [=E2=80=A6] Cheers Robert