guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Silent guild


From: Aleix Conchillo Flaqué
Subject: Re: Silent guild
Date: Fri, 2 Oct 2020 13:50:47 -0700

On Fri, Oct 2, 2020 at 8:49 AM Jérémy Korwin-Zmijowski <
jeremy@korwin-zmijowski.fr> wrote:

> Hello Guilers !
>
> How can I configure guild to be silent. I mean, when I run a Guile
> script for the first time I can see those lines on standard output :
>
> ;;; note: source file /home/jeko/Workspace/guile-
> handbook/numbers/numbers-test.scm
> ;;;       newer than compiled /home/jeko/.cache/guile/ccache/3.0-LE-8-
> 4.3/home/jeko/Workspace/guile-handbook/numbers/numbers-test.scm.go
> ;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0
> ;;;       or pass the --no-auto-compile argument to disable.
> ;;; compiling /home/jeko/Workspace/guile-handbook/numbers/numbers-
> test.scm
> ;;; note: source file ./numbers.scm
> ;;;       newer than compiled /home/jeko/.cache/guile/ccache/3.0-LE-8-
> 4.3/home/jeko/Workspace/guile-handbook/numbers/numbers.scm.go
> ;;; compiling ./numbers.scm
> ;;; compiled /home/jeko/.cache/guile/ccache/3.0-LE-8-
> 4.3/home/jeko/Workspace/guile-handbook/numbers/numbers.scm.go
> ;;; compiled /home/jeko/.cache/guile/ccache/3.0-LE-8-
> 4.3/home/jeko/Workspace/guile-handbook/numbers/numbers-test.scm.go
>
> Is there a way to hide them ? Or make it shorter ?
>

You can do

export GUILE_AUTO_COMPILE=0

or

guile --no-auto-compile FILE.scm

or you can make your script executable (chmod +x test.scm) and make it look
like this:

❯ cat test.scm
#!/bin/sh
# -*- scheme -*-
exec guile --no-auto-compile -l $0 -c "(apply main (cdr (command-line)))"
"$@"
!#

(define (main . args)
  (display "hello"))
❯ ./test.scm
hello

all these will stop compiling your scripts to a .go file. If your scripts
are small this is usually fine.

I hope this helps.

Best,

Aleix


reply via email to

[Prev in Thread] Current Thread [Next in Thread]