Subject: bug#32580: closed (Setting variables %load-should-autocompile and GUILE_AUTO_COMPILE in ~/.guile doesn't prevent compiling)

From: [email-masked] (GNU bug Tracking System)
Date: Tue, 18 May 2021 16:31:02 +0000

Your bug report

#32580: Setting variables %load-should-autocompile and GUILE_AUTO_COMPILE in ~/.guile doesn't prevent compiling

which was filed against the guile package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
32580: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=32580
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Setting variables %load-should-autocompile and GUILE_AUTO_COMPILE in ~/.guile doesn't prevent compiling
From: Taylan Kammer <[email-masked]>
To: [email-masked]
Date: Tue, 18 May 2021 18:30:30 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Closing as this was not a bug.

Exporting GUILE_AUTO_COMPILE=0 works as intended; must be done before start.

The variable %load-should-autocompile is for internal use by Guile only.

-- 
Taylan

Subject: Setting variables %load-should-autocompile and GUILE_AUTO_COMPILE in ~/.guile doesn't prevent compiling
From: seamus phenetols <[email-masked]>
To: [email-masked]
Date: Wed, 29 Aug 2018 18:49:00 -0400
List-Id: <debbugs-submit.debbugs.gnu.org>

I'm new to guile and scheme.  I compiled 2.2.4 from source yesterday.
I wish to silence the auto-compile chatter, other than real warnings and errors
while testing my programs.  There seems to be no way to do it, so I looked
for a way to disable auto-compile in ~/.guile configuration file.  No luck so far,
but the variables %load-should-autocompile and GUILE_AUTO_COMPILE
seem promising.  Sadly, they don't seem to prevent auto-compile when
set within ~/.guile.

Below is an excerpt of my shell session to demonstrate.  In case it may be
poorly formatted, I could make  a web paste for easy viewing.

$ rm -R $XDG_CACHE_HOME/guile/ccache
rm: cannot remove '/home/me/.cache/guile/ccache': No such file or directory
$ rm ~/.guile
rm: cannot remove '/home/me/.guile': No such file or directory
$
$ printf %s\\n '(display "Hello world!")' '(newline)' | tee ~/scheme/hello.scm
(display "Hello world!")
(newline)
$
$ guile ~/scheme/hello.scm
;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0
;;;       or pass the --no-auto-compile argument to disable.
;;; compiling /home/me/scheme/hello.scm
;;; compiled /home/me/.cache/guile/ccache/2.2-LE-8-3.A/media/data/me/scheme/hello.scm.go
Hello world!
$
$ rm -R $XDG_CACHE_HOME/guile/ccache
$
$ printf %s\\n '(setenv "GUILE_AUTO_COMPILE" "0")' '(set! %load-should-autocompile #f)' | tee ~/.guile
(setenv "GUILE_AUTO_COMPILE" "0")
(set! %load-should-autocompile #f)
$
$ guile ~/scheme/hello.scm
;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0
;;;       or pass the --no-auto-compile argument to disable.
;;; compiling /home/me/scheme/hello.scm
;;; compiled /home/me/.cache/guile/ccache/2.2-LE-8-3.A/media/data/me/scheme/hello.scm.go
Hello world!
$
$ guile --version
guile (GNU Guile) 2.2.4
Copyright (C) 2018 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.
$ ls --full-time -gGh ~/Downloads/src/guile-2.2.4.tar.gz
-rw-r--r-- 1 18M 2018-08-24 17:37:08.405232060 -0400 /home/me/Downloads/src/guile-2.2.4.tar.gz
$