monotone-devel
[Top][All Lists]
Advanced

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

Re: [Monotone-devel] RFC: lua output redirection


From: Pasi Parviainen
Subject: Re: [Monotone-devel] RFC: lua output redirection
Date: Fri, 07 May 2010 22:22:30 +0300
User-agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4

On 7.5.2010 2:50, Thomas Keller wrote:

Hi all!

I'd like to hear your comments on a small hack which I added to our lua
hooks code: output redirection for print() and io.write().

The rationale behind this is that lua code (be it hooks or even custom
commands), which likes to "talk" to the user, most likely use the above
mentioned built-ins. These however work directly on STDOUT and this
imposes at least three problems:

1) users cannot distinguish lua output from the application's normal output

2) like 1), but even worse for (remote) stdio: for remote_stdio the
problem is that the user does not even see it (while he maybe wants to),
while for normal stdio the output possibly leads to parsing errors

This would really be an issue for a user written commands. I would prefer to have old behavior for local interactive and scripting use cases, at least in user registered commands context.

The rationale here is that, when user registered commands are used, user must be aware of those commands in the first place and the output generated must be from those user registered commands.

Use cases in the context of hooks and remote stdio are different. Is it even possible to invoke user written commands thru remote stdio or are possibly those messages generated by print from the hooks?

Pasi.




reply via email to

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