From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Zelphir Kaltstahl Newsgroups: gmane.lisp.guile.user Subject: Re: Guile 3.0.7 compile cache messages Date: Wed, 2 Jun 2021 21:52:15 +0000 Message-ID: References: <87im2xzsrk.fsf@clara> <25606725-6560-ef09-dcf5-2505cda16781@posteo.de> <20210602113017.ed9cae3bef68ff28e39c9172@gmail.com> <20210602175333.2978e3a6cec90709768cb470@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24050"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Guile User To: Chris Vine Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Wed Jun 02 23:52:36 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 1loYmy-00065S-1X for guile-user@m.gmane-mx.org; Wed, 02 Jun 2021 23:52:36 +0200 Original-Received: from localhost ([::1]:60994 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1loYmx-0005F1-3N for guile-user@m.gmane-mx.org; Wed, 02 Jun 2021 17:52:35 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33562) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1loYmn-0005Em-Nc for guile-user@gnu.org; Wed, 02 Jun 2021 17:52:25 -0400 Original-Received: from mout01.posteo.de ([185.67.36.65]:55991) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1loYmi-0004gV-5F for guile-user@gnu.org; Wed, 02 Jun 2021 17:52:25 -0400 Original-Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id 70124240026 for ; Wed, 2 Jun 2021 23:52:17 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1622670737; bh=TLJeSGhK6Jfsx5p+MP6dRaymlx+/VY13u26tpPgJ1eo=; h=Subject:To:Cc:From:Date:From; b=MDt4Zo6gpcFIWl4zyWoWCBp7LJCsdbK01AI9f9Wqkx1LITKg+oxLmVNH1pmY7fCYi Krya/EEw7GPYiPvyCWNjoMM/DE+Vl7JWYi4DyawEVkisAlD1DrFCk/MUwCsvXSYUTq k0nBUelsy0yKaB0XMQlzDiawS57j25g0OCaYtbnu//2q+GbSYFpV9M2rxYXlGgLZvr 4FS+79s4nVbZl/FAaOJw9MwegEwNiHoAWPddJgOLPu6XXimVku6azmYkF0TLjK9rxM MfX5ny7n9Tgd+6EdYv6BSdABJbhQ9X5Ao5QvEUgrW02VSnZNQbx4kFDML/lFWs6l/T HOdUqW4ncQEQA== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4FwN6S562Fz6tmG; Wed, 2 Jun 2021 23:52:16 +0200 (CEST) In-Reply-To: <20210602175333.2978e3a6cec90709768cb470@gmail.com> Content-Language: en-US Received-SPF: pass client-ip=185.67.36.65; envelope-from=zelphirkaltstahl@posteo.de; helo=mout01.posteo.de X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, 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:17568 Archived-At: On 6/2/21 6:53 PM, Chris Vine wrote: > 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.  I use Guile as a script language for a >>>>>> video game engine in C.  This interferes with the logging system and it >>>>>> annoys the hell out of me >:-) >>>>> Does this bug help anyone of you ? >>>>> >>>>> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=16364 >>>> 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. When 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 compilation >>>> switched off. For a moment I think: "Huh? Did something change?" and then "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 >>> ;;; note: source file ./logging.scm >>> ;;; newer than compiled >>> /home/user/.guix-profile/lib/guile/3.0/site-ccache/logging.go >>> ;;; found fresh local cache at >>> /home/user/.cache/guile/ccache/3.0-LE-8-4.5/home/user/dev/guile/lf2-data-files/logging.scm.go >>> ;;; note: source file ./file-reader.scm >>> ;;; newer than compiled >>> /home/user/.guix-profile/lib/guile/3.0/site-ccache/file-reader.go >>> ;;; found fresh local cache at >>> /home/user/.cache/guile/ccache/3.0-LE-8-4.5/home/user/dev/guile/lf2-data-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 every >> 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 shown, as >> if there was constantly a newer version than the cache. If I understand the >> messages correctly, that is. >> >> (I do not doubt, that the messages can be helpful, in cases, where there really >> is a newer version than the cache.) > > 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? As far as I know, the environment is recreated every time it is activated by calling the env.sh script I have in guix-env/, unless there is a change in dependencies specified in the manifest.scm or channels.scm file. It should not be necessary to do any cleanup, unless I am mistaken and my ideas about how it works are actually wrong. (I thought (think?) I had finally found the way to perfectly isolate my projects and make their environments reproducible across machines.) >>> 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 behavior. 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? Yes, I am supposed to be running the program inside that environment and I think that is what I did. Unless I was silly and somehow managed to forget to activate the environment. >>> 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. >> How do I go about it? Simply removing the cache folder the messages point to? >> >> And what commands would that alternative workflow entail? > Dunno. See above. I think the assumption is that I was installing my project in any way. However, I am merely running its Guile code, without installing it anywhere in Guix or my system. Thank you for the idea with the caches, I will try that. Best regards, Zelphir -- repositories: https://notabug.org/ZelphirKaltstahl