guile-devel
[Top][All Lists]
Advanced

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

Re: GUILE_QUIET: need help with redirection


From: Matt Wette
Subject: Re: GUILE_QUIET: need help with redirection
Date: Sun, 6 Oct 2024 10:37:38 -0700
User-agent: Mozilla Thunderbird

On 10/6/24 10:29 AM, tomas@tuxteam.de wrote:
On Sun, Oct 06, 2024 at 07:13:02AM -0700, Matt Wette wrote:
Hi All,

I'm working on an update to guile to output some messages (e.g.,
auto-compile) to a new
`current-info-port', which is set to stderr by default.   I also added
update to output the
welcome message, ending in "Enter `,help' for help.".   However, this breaks
the
`00-repl-server' test which is looking for that message.  The test forks
guile and closes stderr,
so it won't see the message ordinarily.   I tried to fix by setting
`current-info-port' to
`current-output-port'.   But that does not work.    I now see the welcome
message printed to
the screen during the test.   I guess the message is sitting in the stderr
output buffer before
the fork happens.   So, options are:
1) Leave welcome message as is, going to stdout.
2) Find a way to make 00-repl-server.test work.
3) Initialize current-info-port to stdout (ugly)
4) Add some other hook in system/repl/common.scm(repl-welcome) to deal with
it (ugly)

Any ideas?
Hm. Tough question. I think what the test reminds us of is that
your default above (stderr) is a backward-incompatible change,
so I'd be very coutious about that. Who knows whose's code this
might break (besides the test).

So leaving `current-info-port' at stdout as default seems the
safest bet.

Perhaps a command-line option to set `current-info-port' to one
of several useful values (i.e. stderr, but also a void port)
might be helpful.

Thanks.  All the other internal redirections  to info-port in guile
are formerly to stderr.  This is the one case where the
redirection is formerly stdout.  So, I don't like using stdout for
the exact reason you state above: it is not backward compatible.

Matt




reply via email to

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