[Tarantool-patches] [PATCH 0/7] box/console: add support for internal types

Mons Anderson v.perepelitsa at corp.mail.ru
Tue May 12 20:06:07 MSK 2020


> On 8 May 2020, at 19:19, Cyrill Gorcunov <gorcunov at gmail.com> wrote:
> 
> On Fri, May 08, 2020 at 07:04:26PM +0300, Oleg Babin wrote:
>> Hi! Thanks for patchset! I have a few comments.
>> 
>> I'm not sure that we should return errors in such way:
>> ```
>> tarantool> x
>> {error = "[string \"return x\"]:1: variable \'x\' is not declared"};
>> ```
> 
> Yes. This allows to paste the result back to the console.
> This is change in behaviour but while we're not claiming
> that th lua mode is stable I think we can do so.

Then it would be great to return it as

error “[string \"return x\"]:1: variable \'x\' is not declared"

or even better

error [[[string "return x"]:1: variable 'x' is not declared]]

> 
>> 
>> Or is it expected behaviour?
>> 
>> Also `nil` value is ignored in some cases.
>> ```
>> tarantool> nil
>> ;
>> tarantool> nil, 2, 3
>> ;
>> tarantool> 1, nil, 3
>> 1, nil, 3;
>> ```
> 
> Thanks! I'll take a look.


There is a possibility to take a length or result (select(‘#’,...))




More information about the Tarantool-patches mailing list