unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* Guile 3.0.7 compile cache messages
@ 2021-05-31 19:46 Zelphir Kaltstahl
  2021-06-01 12:14 ` Olivier Dion via General Guile related discussions
  0 siblings, 1 reply; 13+ messages in thread
From: Zelphir Kaltstahl @ 2021-05-31 19:46 UTC (permalink / raw)
  To: Guile User

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:

~~~~
$ 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
~~~~

This is displayed every single time I run the same program, without making any
changes to the program.

Is this intentional?

I think it used to not display this info all the time. It could become quite
annoying with a bigger program consisting of hundreds of files / modules and
then Guile displaying a note for every single file.

Even with `--no-auto-compile` as in `guile -L . --no-auto-compile main.scm` it
keeps displaying that message.

Is there something I can do, to only make it display a note about caches, when
it finds, that a file needs recompiling, because the cache is not up to date any
longer?

Here is some more detailed information about my versions:

~~~~
$ guix --version
guix (GNU Guix) 4092813037f9fadb2c1da805dc9117277efc7910
Copyright (C) 2021 the Guix authors
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

$ guile --version
guile (GNU Guile) 3.0.7
Copyright (C) 2021 Free Software Foundation, Inc.

License LGPLv3+: GNU LGPL 3 or later <http://gnu.org/licenses/lgpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
~~~~

Best regards,
Zelphir

-- 
repositories: https://notabug.org/ZelphirKaltstahl




^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Guile 3.0.7 compile cache messages
  2021-05-31 19:46 Guile 3.0.7 compile cache messages Zelphir Kaltstahl
@ 2021-06-01 12:14 ` Olivier Dion via General Guile related discussions
  2021-06-02  6:00   ` Adriano Peluso
  0 siblings, 1 reply; 13+ messages in thread
From: Olivier Dion via General Guile related discussions @ 2021-06-01 12:14 UTC (permalink / raw)
  To: Zelphir Kaltstahl, Guile User

On Mon, 31 May 2021, Zelphir Kaltstahl <zelphirkaltstahl@posteo.de> 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 >:-)


>
> ~~~~
> $ 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
> ~~~~
>
> This is displayed every single time I run the same program, without making any
> changes to the program.
>
> Is this intentional?
>
> I think it used to not display this info all the time. It could become quite
> annoying with a bigger program consisting of hundreds of files / modules and
> then Guile displaying a note for every single file.
>
> Even with `--no-auto-compile` as in `guile -L . --no-auto-compile main.scm` it
> keeps displaying that message.
>
> Is there something I can do, to only make it display a note about caches, when
> it finds, that a file needs recompiling, because the cache is not up to date any
> longer?
>
> Here is some more detailed information about my versions:
>
> ~~~~
> $ guix --version
> guix (GNU Guix) 4092813037f9fadb2c1da805dc9117277efc7910
> Copyright (C) 2021 the Guix authors
> License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.
>
> $ guile --version
> guile (GNU Guile) 3.0.7
> Copyright (C) 2021 Free Software Foundation, Inc.
>
> License LGPLv3+: GNU LGPL 3 or later <http://gnu.org/licenses/lgpl.html>.
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.
> ~~~~
>
> Best regards,
> Zelphir
>
> -- 
> repositories: https://notabug.org/ZelphirKaltstahl
>
>
-- 
Olivier Dion
PolyMtl



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Guile 3.0.7 compile cache messages
  2021-06-01 12:14 ` Olivier Dion via General Guile related discussions
@ 2021-06-02  6:00   ` Adriano Peluso
  2021-06-02  8:52     ` Zelphir Kaltstahl
  0 siblings, 1 reply; 13+ messages in thread
From: Adriano Peluso @ 2021-06-02  6:00 UTC (permalink / raw)
  To: Olivier Dion, Zelphir Kaltstahl, Guile User

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 <zelphirkaltstahl@posteo.de>
> 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









^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Guile 3.0.7 compile cache messages
  2021-06-02  6:00   ` Adriano Peluso
@ 2021-06-02  8:52     ` Zelphir Kaltstahl
  2021-06-02 10:30       ` Chris Vine
  0 siblings, 1 reply; 13+ messages in thread
From: Zelphir Kaltstahl @ 2021-06-02  8:52 UTC (permalink / raw)
  To: randomlooser, Olivier Dion; +Cc: Guile User

Hi Adriano!

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 <zelphirkaltstahl@posteo.de>
>> 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.

Best regards,
Zelphir

-- 
repositories: https://notabug.org/ZelphirKaltstahl




^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Guile 3.0.7 compile cache messages
  2021-06-02  8:52     ` Zelphir Kaltstahl
@ 2021-06-02 10:30       ` Chris Vine
  2021-06-02 12:20         ` Zelphir Kaltstahl
  0 siblings, 1 reply; 13+ messages in thread
From: Chris Vine @ 2021-06-02 10:30 UTC (permalink / raw)
  To: guile-user

On Wed,  2 Jun 2021 08:52:54 +0000
Zelphir Kaltstahl <zelphirkaltstahl@posteo.de> 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 <zelphirkaltstahl@posteo.de>
> >> 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.

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?

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.

Possibly there is a guix issue involved but it looks more
straightforward than that. I don't use guix.



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Guile 3.0.7 compile cache messages
  2021-06-02 10:30       ` Chris Vine
@ 2021-06-02 12:20         ` Zelphir Kaltstahl
  2021-06-02 12:38           ` Matt Wette
                             ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Zelphir Kaltstahl @ 2021-06-02 12:20 UTC (permalink / raw)
  To: Chris Vine; +Cc: Guile User

Hi Chris!

On 6/2/21 12:30 PM, Chris Vine wrote:
> On Wed,  2 Jun 2021 08:52:54 +0000
> Zelphir Kaltstahl <zelphirkaltstahl@posteo.de> 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 <zelphirkaltstahl@posteo.de>
>>>> 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.)

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
<https://notabug.org/ZelphirKaltstahl/lf2-data-decrypt>.

> 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.
> 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?

> Possibly there is a guix issue involved but it looks more
> straightforward than that. I don't use guix.

OK : ) Thanks nevertheless!

Best regards,
Zelphir

-- 
repositories: https://notabug.org/ZelphirKaltstahl




^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Guile 3.0.7 compile cache messages
  2021-06-02 12:20         ` Zelphir Kaltstahl
@ 2021-06-02 12:38           ` Matt Wette
  2021-06-02 16:53           ` Chris Vine
  2021-06-02 20:51           ` Adriano Peluso
  2 siblings, 0 replies; 13+ messages in thread
From: Matt Wette @ 2021-06-02 12:38 UTC (permalink / raw)
  To: guile-user


I believe there was an issue on one of the releases
where a shared object library was misnamed.  Check
the installed .so's.

I'd try deleting your cache (~/.cache/guile/...) and
checking your environment variables.   It looks to
me like maybe Guile is checking in one place and
installing in another.






^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Guile 3.0.7 compile cache messages
  2021-06-02 12:20         ` Zelphir Kaltstahl
  2021-06-02 12:38           ` Matt Wette
@ 2021-06-02 16:53           ` Chris Vine
  2021-06-02 21:52             ` Zelphir Kaltstahl
  2021-06-02 20:51           ` Adriano Peluso
  2 siblings, 1 reply; 13+ messages in thread
From: Chris Vine @ 2021-06-02 16:53 UTC (permalink / raw)
  To: Guile User

On Wed,  2 Jun 2021 12:20:48 +0000
Zelphir Kaltstahl <zelphirkaltstahl@posteo.de> wrote:
> Hi Chris!
> On 6/2/21 12:30 PM, Chris Vine wrote:
> > On Wed,  2 Jun 2021 08:52:54 +0000
> > Zelphir Kaltstahl <zelphirkaltstahl@posteo.de> 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 <zelphirkaltstahl@posteo.de>
> >>>> 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
> <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 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?

> > 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.



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Guile 3.0.7 compile cache messages
  2021-06-02 12:20         ` Zelphir Kaltstahl
  2021-06-02 12:38           ` Matt Wette
  2021-06-02 16:53           ` Chris Vine
@ 2021-06-02 20:51           ` Adriano Peluso
  2021-06-02 21:45             ` Zelphir Kaltstahl
  2 siblings, 1 reply; 13+ messages in thread
From: Adriano Peluso @ 2021-06-02 20:51 UTC (permalink / raw)
  To: Zelphir Kaltstahl, Chris Vine; +Cc: Guile User

Il giorno mer, 02/06/2021 alle 12.20 +0000, Zelphir Kaltstahl ha
scritto:
> > > > 
> 



> How do I go about it? Simply removing the cache folder the messages
> point to?
> 
> And what commands would that alternative workflow entail?

I skimmed your project and I see that there's only one dependency:
Guile

In fact, being the needs of your project so minimal, using a Guix
environment is a bit of an overkill

The way to deal with developing a project that is distrubuted throug
Guix would be to have and environment (or a profile) based on your
project 

In such environment you would have a shell with all your project
dependencies in it BUT your project itself

So you would git checkout your project within such environment and you
could build it, run the tests (if there are any) and generally work
with it in such a shell

as far as I understand (I stil don't know how channels work) you have
installed your project with Guix AND you are working on it

That's why the compiled code is in 2 different places

One of them was installed by Guix and another one has been put there by
Guile when it has autocompiled it

You can

1) cancel the cache in your home folder
2) remove the package installed by Guix (maybe also garbage collect the
store)

3) create a guix environment for your project

The Guix cookbook has a paragraph on the difference between Guix
profiles and Guix environments and also the Guix blog has something
about this

I'd also discuss this on the guix mailing list as people there are more
immediately ready to discuss scenarios involving Guix

Hope this helps




^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Guile 3.0.7 compile cache messages
  2021-06-02 20:51           ` Adriano Peluso
@ 2021-06-02 21:45             ` Zelphir Kaltstahl
  2021-06-02 22:15               ` Zelphir Kaltstahl
  0 siblings, 1 reply; 13+ messages in thread
From: Zelphir Kaltstahl @ 2021-06-02 21:45 UTC (permalink / raw)
  To: randomlooser; +Cc: Guile User, Matt Wette

Hi Adriano!

On 6/2/21 10:51 PM, Adriano Peluso wrote:
> Il giorno mer, 02/06/2021 alle 12.20 +0000, Zelphir Kaltstahl ha
> scritto:
>> > How do I go about it? Simply removing the cache folder the messages
>> point to?
>>
>> > And what commands would that alternative workflow entail?
>>
>> I skimmed your project and I see that there's only one dependency:
>> Guile
>>
>> In fact, being the needs of your project so minimal, using a Guix
>> environment is a bit of an overkill
>>
>> The way to deal with developing a project that is distrubuted throug
>> Guix would be to have and environment (or a profile) based on your
>> project 
>>
>> In such environment you would have a shell with all your project
>> dependencies in it BUT your project itself
>>
>> So you would git checkout your project within such environment and you
>> could build it, run the tests (if there are any) and generally work
>> with it in such a shell
>>
>> as far as I understand (I stil don't know how channels work) you have
>> installed your project with Guix AND you are working on it
>>
>> That's why the compiled code is in 2 different places
>>
>> One of them was installed by Guix and another one has been put there by
>> Guile when it has autocompiled it
>>
>> You can
>>
>> 1) cancel the cache in your home folder
>> 2) remove the package installed by Guix (maybe also garbage collect the
>> store)
>>
>> 3) create a guix environment for your project
>>
>> The Guix cookbook has a paragraph on the difference between Guix
>> profiles and Guix environments and also the Guix blog has something
>> about this
>>
>> I'd also discuss this on the guix mailing list as people there are more
>> immediately ready to discuss scenarios involving Guix
>>
>> Hope this helps

I feel like I should clear up what I am doing with Guix a little.

Currently there is only Guile as a dependency, as stated in the readme of the
project.

I usually put a script for activating a Guix environment into my projects, so
that I can later add Guile libraries mostly without any difficulty to the
accompanying manifest.scm file, making them available in the created environment.

The project is in its beginning stage, so right now there is no dependency.
Later there might be guile-json to read in some config file. Or I define
configuration directly in a Scheme file. Not sure about it yet.

I do not plan to distribute the project via Guix, nor have I installed the
project as a Guix package locally in the environment or have it in a channel
somewhere. (Side note: As far as I know a channel is merely a separate Guix
repo, where you only add the packages you want to have separately and then you
can list that repo and the commit id in your channels.scm file.) I merely use
Guix to have a reproducible environment to run the project in. As I understand
it, an environment is recreated each time it is "activated", unless Guix has it
cached somewhere in its magic folders, which is different from how profiles
work. I do not need a Guix profile for this project.

What I like about this approach is, that I can come back to a project and simply
activate the environment and run the project, without having to worry about
dependencies being missing, not installed in my current system, or anything like
that, assuming, that no one messes around with commit ids in the git repo of
Guix. Another example is here:
https://notabug.org/ZelphirKaltstahl/fantasy-vacation-planner/src/master/guix-env/manifest.scm
<https://notabug.org/ZelphirKaltstahl/fantasy-vacation-planner/src/master/guix-env/manifest.scm>
(also using guile-json to read a config, while the specific Guix commit is
defined in channels.scm)

And yes, it might be a bit overkill at this point in time ; ) I guess a bit
paranoid as well.

I think what I take from this is, that I will run garbage collect of Guix and
remove Guile caches (~/.cache/guile/ as Matt mentioned, thanks!) and then check
again, whether the messages keep coming. If Guile has a cache outside of the
project directory and outside of the Guix environment's files in the /gnu/store
thingy, then it might well be, that deleting that cache will get rid of the
messages.

Best regards,
Zelphir

-- 
repositories: https://notabug.org/ZelphirKaltstahl




^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Guile 3.0.7 compile cache messages
  2021-06-02 16:53           ` Chris Vine
@ 2021-06-02 21:52             ` Zelphir Kaltstahl
  2021-06-02 23:09               ` Chris Vine
  0 siblings, 1 reply; 13+ messages in thread
From: Zelphir Kaltstahl @ 2021-06-02 21:52 UTC (permalink / raw)
  To: Chris Vine; +Cc: Guile User


On 6/2/21 6:53 PM, Chris Vine wrote:
> On Wed,  2 Jun 2021 12:20:48 +0000
> Zelphir Kaltstahl <zelphirkaltstahl@posteo.de> wrote:
>> Hi Chris!
>> On 6/2/21 12:30 PM, Chris Vine wrote:
>>> On Wed,  2 Jun 2021 08:52:54 +0000
>>> Zelphir Kaltstahl <zelphirkaltstahl@posteo.de> 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 <zelphirkaltstahl@posteo.de>
>>>>>> 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
>> <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




^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Guile 3.0.7 compile cache messages
  2021-06-02 21:45             ` Zelphir Kaltstahl
@ 2021-06-02 22:15               ` Zelphir Kaltstahl
  0 siblings, 0 replies; 13+ messages in thread
From: Zelphir Kaltstahl @ 2021-06-02 22:15 UTC (permalink / raw)
  To: Guile User

On 6/2/21 11:45 PM, Zelphir Kaltstahl wrote:
> Hi Adriano!
>
> On 6/2/21 10:51 PM, Adriano Peluso wrote:
>> Il giorno mer, 02/06/2021 alle 12.20 +0000, Zelphir Kaltstahl ha
>> scritto:
>>>> How do I go about it? Simply removing the cache folder the messages
>>> point to?
>>>
>>>> And what commands would that alternative workflow entail?
>>> I skimmed your project and I see that there's only one dependency:
>>> Guile
>>>
>>> In fact, being the needs of your project so minimal, using a Guix
>>> environment is a bit of an overkill
>>>
>>> The way to deal with developing a project that is distrubuted throug
>>> Guix would be to have and environment (or a profile) based on your
>>> project 
>>>
>>> In such environment you would have a shell with all your project
>>> dependencies in it BUT your project itself
>>>
>>> So you would git checkout your project within such environment and you
>>> could build it, run the tests (if there are any) and generally work
>>> with it in such a shell
>>>
>>> as far as I understand (I stil don't know how channels work) you have
>>> installed your project with Guix AND you are working on it
>>>
>>> That's why the compiled code is in 2 different places
>>>
>>> One of them was installed by Guix and another one has been put there by
>>> Guile when it has autocompiled it
>>>
>>> You can
>>>
>>> 1) cancel the cache in your home folder
>>> 2) remove the package installed by Guix (maybe also garbage collect the
>>> store)
>>>
>>> 3) create a guix environment for your project
>>>
>>> The Guix cookbook has a paragraph on the difference between Guix
>>> profiles and Guix environments and also the Guix blog has something
>>> about this
>>>
>>> I'd also discuss this on the guix mailing list as people there are more
>>> immediately ready to discuss scenarios involving Guix
>>>
>>> Hope this helps
> I feel like I should clear up what I am doing with Guix a little.
>
> Currently there is only Guile as a dependency, as stated in the readme of the
> project.
>
> I usually put a script for activating a Guix environment into my projects, so
> that I can later add Guile libraries mostly without any difficulty to the
> accompanying manifest.scm file, making them available in the created environment.
>
> The project is in its beginning stage, so right now there is no dependency.
> Later there might be guile-json to read in some config file. Or I define
> configuration directly in a Scheme file. Not sure about it yet.
>
> I do not plan to distribute the project via Guix, nor have I installed the
> project as a Guix package locally in the environment or have it in a channel
> somewhere. (Side note: As far as I know a channel is merely a separate Guix
> repo, where you only add the packages you want to have separately and then you
> can list that repo and the commit id in your channels.scm file.) I merely use
> Guix to have a reproducible environment to run the project in. As I understand
> it, an environment is recreated each time it is "activated", unless Guix has it
> cached somewhere in its magic folders, which is different from how profiles
> work. I do not need a Guix profile for this project.
>
> What I like about this approach is, that I can come back to a project and simply
> activate the environment and run the project, without having to worry about
> dependencies being missing, not installed in my current system, or anything like
> that, assuming, that no one messes around with commit ids in the git repo of
> Guix. Another example is here:
> https://notabug.org/ZelphirKaltstahl/fantasy-vacation-planner/src/master/guix-env/manifest.scm
> <https://notabug.org/ZelphirKaltstahl/fantasy-vacation-planner/src/master/guix-env/manifest.scm>
> (also using guile-json to read a config, while the specific Guix commit is
> defined in channels.scm)
>
> And yes, it might be a bit overkill at this point in time ; ) I guess a bit
> paranoid as well.
>
> I think what I take from this is, that I will run garbage collect of Guix and
> remove Guile caches (~/.cache/guile/ as Matt mentioned, thanks!) and then check
> again, whether the messages keep coming. If Guile has a cache outside of the
> project directory and outside of the Guix environment's files in the /gnu/store
> thingy, then it might well be, that deleting that cache will get rid of the
> messages.
>
> Best regards,
> Zelphir

Mystery solved:

After deleting `~/.cache/guile` and
`/home/user/.guix-profile/lib/guile/3.0/site-ccache/*`, Guile does not display
the messages any longer.

Thanks!

-- 
repositories: https://notabug.org/ZelphirKaltstahl




^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Guile 3.0.7 compile cache messages
  2021-06-02 21:52             ` Zelphir Kaltstahl
@ 2021-06-02 23:09               ` Chris Vine
  0 siblings, 0 replies; 13+ messages in thread
From: Chris Vine @ 2021-06-02 23:09 UTC (permalink / raw)
  To: Guile User

On Wed,  2 Jun 2021 21:52:15 +0000
Zelphir Kaltstahl <zelphirkaltstahl@posteo.de> wrote:
[snip]
> 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.

I still think you may be misunderstanding what I and/or others have
said.

If bytecode files are installed in site-ccache then you have "installed
your project".  From your README, maybe your running of 'bash
guix-env/env.sh' has done that.  As I have said, I do not use guix so I
can't say for sure.  As I also said, it cannot be the case that "I am
merely running its Guile code, without installing it anywhere in Guix
or my system", because guile will not install any files in site-ccache
upon auto-compiling.

Anyway, this has gone far enough and I think the various responses you
have received have explained the problem: it is up to you how you take
it forward as you will.  You have reported elsewhere that you have
deleted the files in site-ccache (in other words, undone the
"installation"), which obviously will stop the warnings and is one of
the approaches I recommended.  You will have to make sure they aren't
"installed" again (and note that your bytecode files in local cache are
no longer managed by guix).

Let's leave it there.



^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2021-06-02 23:09 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-31 19:46 Guile 3.0.7 compile cache messages Zelphir Kaltstahl
2021-06-01 12:14 ` Olivier Dion via General Guile related discussions
2021-06-02  6:00   ` Adriano Peluso
2021-06-02  8:52     ` Zelphir Kaltstahl
2021-06-02 10:30       ` Chris Vine
2021-06-02 12:20         ` Zelphir Kaltstahl
2021-06-02 12:38           ` Matt Wette
2021-06-02 16:53           ` Chris Vine
2021-06-02 21:52             ` Zelphir Kaltstahl
2021-06-02 23:09               ` Chris Vine
2021-06-02 20:51           ` Adriano Peluso
2021-06-02 21:45             ` Zelphir Kaltstahl
2021-06-02 22:15               ` Zelphir Kaltstahl

unofficial mirror of guile-user@gnu.org 

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://yhetil.org/guile-user/0 guile-user/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 guile-user guile-user/ https://yhetil.org/guile-user \
		guile-user@gnu.org
	public-inbox-index guile-user

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.lisp.guile.user
	nntp://news.gmane.io/gmane.lisp.guile.user


AGPL code for this site: git clone http://ou63pmih66umazou.onion/public-inbox.git