unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* How can I tell guile to shut up? ;)
@ 2011-03-02  8:22 "Juhani Viheräkoski"
  2011-03-31 11:11 ` Andy Wingo
  0 siblings, 1 reply; 2+ messages in thread
From: "Juhani Viheräkoski" @ 2011-03-02  8:22 UTC (permalink / raw)
  To: guile-user

It seems there is no option to disable these annoying messages in guile
2.0. I do scripts using guile and I would appreciate not getting these
messages that interfere with other output. It is possible to use
2>/dev/null but what would I do if my script would output error messages
(as it will probably do at some point)? I don't want to do precompilation
when scripting.

My suggestion is to add option --quiet to guile.

$ ./test-script
;;; note: source file /home/misty/moonshine/yarg/scripts/./race
;;;       newer than compiled
/home/misty/.cache/guile/ccache/2.0-LE-4-2.0/home/misty/moonshine/yarg/scripts/test-script.go
;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0
;;;       or pass the --no-auto-compile argument to disable.
;;; compiling /home/misty/moonshine/yarg/scripts/./test-script
;;; compiled
/home/misty/.cache/guile/ccache/2.0-LE-4-2.0/home/misty/moonshine/yarg/scripts/test-script.go


Best Regards,
-- 
Juhani Viheräkoski





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

* Re: How can I tell guile to shut up? ;)
  2011-03-02  8:22 How can I tell guile to shut up? ;) "Juhani Viheräkoski"
@ 2011-03-31 11:11 ` Andy Wingo
  0 siblings, 0 replies; 2+ messages in thread
From: Andy Wingo @ 2011-03-31 11:11 UTC (permalink / raw)
  To: Juhani Viheräkoski; +Cc: guile-user, guile-devel

Hi Juhani,

Sorry for the delay in the response!

On Wed 02 Mar 2011 09:22, "Juhani Viheräkoski" <moonshine@kapsi.fi> writes:

> $ ./test-script
> ;;; note: source file /home/misty/moonshine/yarg/scripts/./race
> ;;;       newer than compiled
> /home/misty/.cache/guile/ccache/2.0-LE-4-2.0/home/misty/moonshine/yarg/scripts/test-script.go
> ;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0
> ;;;       or pass the --no-auto-compile argument to disable.
> ;;; compiling /home/misty/moonshine/yarg/scripts/./test-script
> ;;; compiled
> /home/misty/.cache/guile/ccache/2.0-LE-4-2.0/home/misty/moonshine/yarg/scripts/test-script.go

> It seems there is no option to disable these annoying messages in guile
> 2.0. I do scripts using guile and I would appreciate not getting these
> messages that interfere with other output. It is possible to use
> 2>/dev/null but what would I do if my script would output error messages
> (as it will probably do at some point)?

I entirely agree that it's a problem.  By default, running a Guile
script should not cause Guile itself to print anything, to any port.

These messages are useful at times, but they were more useful last year
when compilation didn't work as well as it does now, and they could
probably be pared down a bit.

In addition there are actual compilation warnings:

   $ cat /tmp/foo.scm
   #!/opt/guile/env guile
   !#
   (+ 23 foo)
   $ /tmp/foo.scm
   ;;; note: source file /tmp/foo.scm
   ;;;       newer than compiled /home/wingo/.cache/guile/ccache/2.0-LE-8-2.0/tmp/foo.scm.go
   ;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0
   ;;;       or pass the --no-auto-compile argument to disable.
   ;;; compiling /tmp/foo.scm
   ;;; /tmp/foo.scm:3:0: warning: possibly unbound variable `foo'
   ;;; compiled /home/wingo/.cache/guile/ccache/2.0-LE-8-2.0/tmp/foo.scm.go

See that warning is useful!  And perhaps you'd want to see it, even when
you don't see some or all of the other lines.  Unlike the
autocompilation debugging, the unbound variable warning will probably go
away before you distribute your script to users, because you'll fix the
bug.

Anyway, I just mean to say that the problem is a bit complicated.

> My suggestion is to add option --quiet to guile.

Hmm.  I think prefer adding -Wfoo, for warnings, like GCC does.  It's
not getopt-long compatible, but we already have -ds.  For other
informational messages, it does seem that we need something like
--quiet, or --verbosity=..., or something.  Not quite sure what that
is.  I've copied guile-devel on this mail to see if anyone else has
opinions on this.

Thanks for the reminder!

Andy
-- 
http://wingolog.org/



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

end of thread, other threads:[~2011-03-31 11:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-02  8:22 How can I tell guile to shut up? ;) "Juhani Viheräkoski"
2011-03-31 11:11 ` Andy Wingo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).