From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Chris Vine Newsgroups: gmane.lisp.guile.user Subject: Re: Guile 3.0.7 compile cache messages Date: Wed, 2 Jun 2021 17:53:33 +0100 Message-ID: <20210602175333.2978e3a6cec90709768cb470@gmail.com> References: <87im2xzsrk.fsf@clara> <25606725-6560-ef09-dcf5-2505cda16781@posteo.de> <20210602113017.ed9cae3bef68ff28e39c9172@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7147"; mail-complaints-to="usenet@ciao.gmane.io" To: Guile User Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Wed Jun 02 18:53:37 2021 Return-path: Envelope-to: guile-user@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1loU7d-0001dX-DF for guile-user@m.gmane-mx.org; Wed, 02 Jun 2021 18:53:37 +0200 Original-Received: from localhost ([::1]:60484 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1loU7c-00024z-GR for guile-user@m.gmane-mx.org; Wed, 02 Jun 2021 12:53:36 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38682) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1loU7R-00024Y-Gr for guile-user@gnu.org; Wed, 02 Jun 2021 12:53:25 -0400 Original-Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]:46056) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1loU7P-0008HY-4z for guile-user@gnu.org; Wed, 02 Jun 2021 12:53:25 -0400 Original-Received: by mail-wr1-x434.google.com with SMTP id z8so2972151wrp.12 for ; Wed, 02 Jun 2021 09:53:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=DtzNp/w78pYVjMsQRBISnmXde2rt+GgcsGbnxazxKc4=; b=HA3eUAE3/+G036XTURa56IAVqHfiziQvphHU4bDZDfyWumMD4uFETv+07qpnhOL7YI ZzAdIjLe1iF7qdnBk/02cGJYNRYm3yov0upI/pQHi99r7pcdRcOISj72Pl9n2n6eZ3bu 1TD0S/mLcIL8+C5H/AbM+/53smtzt+g6UGhy1oIfCtp6T/NSZMhTbX0yR/2JM+S7VFjL qzEzNh+WgGjqCG2dO3S+4sMFAr7/Urrpqa1XCznE95w9BbHf5meaosb7OLvFESnCk5Dt esAvvcM/lEHpzU6FLzOB+wogASQWy5vplnjBVlAxANoJjWTPvvuTOVXTs9+5M3NgB1+e r1fQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=DtzNp/w78pYVjMsQRBISnmXde2rt+GgcsGbnxazxKc4=; b=Xf3q58S5Un0xQnannoa1zsEk/8QcDQEzbTZtDatnxi9lOCJU3GTihhkZ7fJ4HTwP43 GFbdA07DS3yYcq2DjFkwl87SFG2o0IXGsjJawGo2f0Wh7T2wHCILeI/ESdReDJ4JySPp 6FpTnBsJeVkkb6vSYYVuHSAzT+sHavgU3rw2X8C+wm/DpdoTMMzJpOe7FXzVjX2cH5mR lCeYk80IQzkmH99HUMHWrYrRJHj0abNze56VVnFewTz/LKAhgi+d0kp6GsdXPYYrK0Ec i4892isChEw/ddo3uct03Unr5pKoz5wSFlv2M9VBUveWEUFmBEREbXtPLQlED6cMDA6l yh3g== X-Gm-Message-State: AOAM533pUojDZ3c3E3ImxdzC7Rc/EdxVPJo9+LfEC1gbu+FfvugL5pw5 XfFIvKOwPYyFCrnx+fYrUTpLy0YVaNA= X-Google-Smtp-Source: ABdhPJzqvDfsr08NIxIUxTrEIC7UJpnhtlA1Bl+hBmc+bP8wWxcPzPOglH/Lpzm41pQTdqcO4PLIiA== X-Received: by 2002:a5d:684b:: with SMTP id o11mr18449347wrw.382.1622652801026; Wed, 02 Jun 2021 09:53:21 -0700 (PDT) Original-Received: from bother.homenet ([2.24.141.102]) by smtp.gmail.com with ESMTPSA id j18sm545286wrw.30.2021.06.02.09.53.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Jun 2021 09:53:20 -0700 (PDT) Original-Received: from bother.homenet (localhost [127.0.0.1]) by bother.homenet (Postfix) with SMTP id 8531A263C57 for ; Wed, 2 Jun 2021 17:53:33 +0100 (BST) In-Reply-To: X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-unknown-linux-gnu) Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=vine35792468@gmail.com; helo=mail-wr1-x434.google.com X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, NICE_REPLY_A=-0.613, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.io gmane.lisp.guile.user:17565 Archived-At: On Wed, 2 Jun 2021 12:20:48 +0000 Zelphir Kaltstahl wrote: > Hi Chris! > On 6/2/21 12:30 PM, Chris Vine wrote: > > On Wed, 2 Jun 2021 08:52:54 +0000 > > Zelphir Kaltstahl wrote: > >> On 6/2/21 8:00 AM, Adriano Peluso wrote: > >>> Il giorno mar, 01/06/2021 alle 08.14 -0400, Olivier Dion via General > >>> Guile related discussions ha scritto: > >>>> On Mon, 31 May 2021, Zelphir Kaltstahl > >>>> wrote: > >>>>> Hello Guile Users! > >>>>> > >>>>> It seems my Guile (version 3.0.7, installed via GNU Guile, updated > >>>>> today) is > >>>>> doing something weird, or perhaps something correct but unexpected > >>>>> with regard > >>>>> to informing about it finding compile caches. When I run a program > >>>>> with `guile > >>>>> -L . main.scm`, it displays the following: > >>>> I also find it annoying.=A0 I use Guile as a script language for a > >>>> video game engine in C.=A0 This interferes with the logging system a= nd it > >>>> annoys the hell out of me >:-) > >>> Does this bug help anyone of you ? > >>> > >>> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D16364 > >> To be honest my need is not as urgent as something failing because of = the > >> messages, but rather a visual annoyance, that did not happen before. W= hen I do > >> not expect a recompilation, because I did not change any code, then it= is > >> surprising to see the cache messages appearing, even with auto compila= tion > >> switched off. For a moment I think: "Huh? Did something change?" and t= hen "Ah, > >> it is only those always shown messages.". It did not use to do that. > >> > >> I am not sure what changed in my setting or with GNU Guile. My theory = is, that > >> it is something introduced between 3.0.5 (or 4?) and 3.0.7 perhaps. Or= that > >> something was changed in the way that GNU Guix installs GNU Guile and = that > >> affects the caching messages somehow. > > You reported that when running a program file of yours named 'main.scm' > > which is in your project's source directory, you get this message: > > > > $ guile -L . main.scm=20 > > ;;; note: source file ./logging.scm > > ;;; newer than compiled=20 > > /home/user/.guix-profile/lib/guile/3.0/site-ccache/logging.go > > ;;; found fresh local cache at=20 > > /home/user/.cache/guile/ccache/3.0-LE-8-4.5/home/user/dev/guile/lf2-dat= a-files/logging.scm.go > > ;;; note: source file ./file-reader.scm > > ;;; newer than compiled=20 > > /home/user/.guix-profile/lib/guile/3.0/site-ccache/file-reader.go > > ;;; found fresh local cache at=20 > > /home/user/.cache/guile/ccache/3.0-LE-8-4.5/home/user/dev/guile/lf2-dat= a-files/file-reader.scm.go > > 160 > > > > On the face of it the warnings look reasonable and I would be surprised > > if they were something new. You appear to have two module files > > logging.scm and file-reader.scm in your project's source directory > > /home/user/dev/guile/lf2-data-files which are newer than > > pre-compiled .go files for them which you (or guix on your behalf) have > > installed at some time in the past in guile-3.0's site-ccache, > > presumably by some kind of 'make install' operation carried out for > > your project. When you updated logging.scm and file-reader.scm in your > > project, guile noticed this, recompiled the modules for you > > automatically and put the generated code in your local cache > > directory. It now emits helpful warnings in consequence. > > Yes, the warnings would look reasonable, if they only were shown once eve= ry > change. However, what confuses me about them is, that no matter how often= I run > the same program without changing any code (!), the same messages are sho= wn, as > if there was constantly a newer version than the cache. If I understand t= he > messages correctly, that is. >=20 > (I do not doubt, that the messages can be helpful, in cases, where there = really > is a newer version than the cache.) =20 If you have (i) stale compiled bytecode files installed by guix in site-ccache, and (ii) up-to-date bytecode files installed by guile in local cache, then you will necessarily get the warning each time, and I wouldn't want it to behave in any other way. You need to resolve the matter either by (i) removing the stale bytecode files in site-ccache, or (ii) removing the bytecode files in local cache, recompiling your project and reinstalling up-to-day bytecode files in site-ccache. > In this project I do not have any makefile yet and it is a pure GNU Guile > project. Link: https://notabug.org/ZelphirKaltstahl/lf2-data-decrypt > . Presumably guix is doing this then. What presumably guix has done is to install the bytecode files in site-ccache when first building and installing your project but then failed to update them when you change some of your source code files. Is there a guix support group, or some kind of documentation about this? This is pretty basic stuff so there must be some way of getting guix to behave correctly. Is there some simple command like "guix rebuild" that you are supposed to use? > > The question is how did you get into this position? More particulaly, > > what installed logging.go and file-reader.go in site-ccache (presumably > > 'make install') and, when logging.scm and file-reader.scm were updated, > > why didn't you recompile and reinstall your modules? > > I am not sure. I am merely calling `guile -L . main` in the project root > directory and have not had any other call to it, when I noticed this beha= vior. I > basically did not do anything special before. See above. Running 'guile -L . main' will not install anything in site-ccache, so something else (most likely guix) has done that. Instead, guile run as 'guile -L . main' will cause it to save its compiled bytecode in local cache. I suppose one other point to address is why you are using guix at all. If all you want to do is run your program with 'guile -L . main' then that is all you need to do. What are you trying to achieve with guix? Aren't you supposed to run your program within the guix environment instead of outside it? > > The most immediate solution is to delete your local cache and reinstall > > your program modules. Alternatively, I suspect from your comments that > > your normal work methods may be better served by not pre-compiling/ > > installing the modules at all, and instead rely on their automatic > > compilation and installation into the local cache by guile on need. >=20 > How do I go about it? Simply removing the cache folder the messages point= to? >=20 > And what commands would that alternative workflow entail? Dunno. See above.