I wrote:
>a command-line switch can turn off the auto-compilation,

On closer examination, it turns out that aside from the portability
concern that I described, turning off auto-compilation doesn't actually
fix the problem.  If a compiled version has previously been cached for
the filename of a script being run, guile will consider using the cached
version even if --no-auto-compile was supplied: the switch only controls
the attempt to compile for the cache.  If the cached compilation is up
to date then it is used silently, which is OK.  But if it's out of date,
because the cache was for a different script that previously existed
under the same name, then guile emits a banner saying that it's out of
date (implying that the cached compilation is therefore not being used).
So the script's visible behaviour is defiled even if it applies the
option.

Observe what happens to the second script in this sequence:

$ echo '(display "hello world\n")' >t10
$ guile-2.0 t10
;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0
;;;       or pass the --no-auto-compile argument to disable.
;;; compiling /home/zefram/usr/guile/t10
;;; compiled 
/home/zefram/.cache/guile/ccache/2.0-LE-8-2.0/home/zefram/usr/guile/t10.go
hello world
$ echo '(display "goodbye world\n")' >t10
$ guile-2.0 --no-auto-compile t10        
;;; note: source file /home/zefram/usr/guile/t10
;;;       newer than compiled 
/home/zefram/.cache/guile/ccache/2.0-LE-8-2.0/home/zefram/usr/guile/t10.go
goodbye world

-zefram


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to