lilypond-devel
[Top][All Lists]
Advanced

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

Re: Adds redirect-lilypond-output option to lilypond-book(issue4664060)


From: Phil Holmes
Subject: Re: Adds redirect-lilypond-output option to lilypond-book(issue4664060)
Date: Fri, 15 Jul 2011 13:59:35 +0100

----- Original Message ----- From: "Graham Percival" <address@hidden>
To: "Phil Holmes" <address@hidden>
Cc: <address@hidden>; "David Kastrup" <address@hidden>
Sent: Wednesday, July 13, 2011 5:57 PM
Subject: Re: Adds redirect-lilypond-output option to lilypond-book(issue4664060)


On Wed, Jul 13, 2011 at 03:26:18PM +0100, Phil Holmes wrote:
----- Original Message ----- From: "David Kastrup" <address@hidden>
To: <address@hidden>
>address@hidden writes:
>
>>in light of the growing consensus for "combined" logfiles for the build
>>system -- and given that lilypond only produces stuff on stderr and
>>apparently this isn't going to change -- I wonder if it might be better
>>to redirect both stdout and sterr to a single .log file.
>
>Redirecting two file pointers to the same file has a tendency to wreak
>havoc with buffering.
>
>So it is not something I am overly comfortable with.

ok, if/when we add this, we'd use a different way of recording
output.  I'm certain that python's subprocess module has some way
of doing this.

My understanding (which is certainly not perfect) is that one of the
stream is buffered (stdout from memory, without checking) and the
other isn't, so that the worst that happens is that the lines are
not quite in the order that might be expected.

That "worst that happens" is beyond what's acceptable.  Seeing an
error message before the command that causes the error?  That
could easily chew up 10 hours of fruitless debugging while
somebody investigates a perfectly good command.

Do you know that the order is _always_ correct when sent to terminal? If what I said about buffering is true, you could easily get the same problem to the terminal.

If it's vitally important that the order of output to stdout and stderr are in a specific fixed order then programs that use both must ensure the order, not rely on quicks of the buffering of the OS. Furthermore, if it's possible for a program to write something like "processing line z" to stdout and then "error in processing line" to stderr, then that's a bug in the error handling of the program.

TBH, it's my considered view that, since this possibility doesn't even occur in the issue we're talking about (since we're only affecting output from Lilypond, and that _only_ goes to stderr) then we're effectivly debating how many angels can fit on the head of a pin.

In light of this, let's go ahead with the separate log files for
now.

Cheers,
- Graham


Agreed.

--
Phil Holmes





reply via email to

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