On Fri, 15 Mar 2024, ks...@sent.com wrote: > I am in the process of rewriting in Guile a script that I use > regularly. Running Guile 3.0.9, when I execute a file containing > > #!/usr/local/bin/guile -s > !# > (display "Hello, mailing list!") > (newline) > > the following is printed to standard error: > > ;;; note: source file /Users/me/./test.scm > ;;; newer than compiled > /Users/me/.cache/guile/ccache/3.0-LE-8-4.6/Users/me/test.scm.go > ;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0 > ;;; or pass the --no-auto-compile argument to disable. > ;;; compiling /Users/me/./test.scm > ;;; compiled > /Users/me/.cache/guile/ccache/3.0-LE-8-4.6/Users/me/test.scm.go
Like the warning says, you ought to either use the GUILE_AUTO_COMPILE environment variable or use the `--no-auto-compile' switch. Unfortunately, there is no `--quiet' or `--warning=/dev/null' option. What I typically do is to compile modules and not compile scripts (program entrypoints). So in the end, I have the following prologue for portable Guile script: --8<---------------cut here---------------start------------->8--- #!/bin/sh #-*-Scheme-*- GUILE="$(command -v guile || command -v guile3.0)" if [ -z "$GUILE" ]; then echo "Missing guile executable." exit 1 fi exec $GUILE --no-auto-compile -e main -s "$0" "$@" !# --8<---------------cut here---------------end--------------->8--- Note the usage of `--no-auto-compile' which will prevent Guile from auto-compiling file, while still loading already compiled modules. [...] -- Olivier Dion oldiob.ca