From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp29.i.mail.ru (smtp29.i.mail.ru [94.100.177.89]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 36577469710 for ; Fri, 8 May 2020 19:04:28 +0300 (MSK) From: Oleg Babin References: <20200508114714.426908-1-gorcunov@gmail.com> Message-ID: <7d39ce8a-3c12-a814-9bb3-8d43bfc6f782@tarantool.org> Date: Fri, 8 May 2020 19:04:26 +0300 MIME-Version: 1.0 In-Reply-To: <20200508114714.426908-1-gorcunov@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit Subject: Re: [Tarantool-patches] [PATCH 0/7] box/console: add support for internal types List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Cyrill Gorcunov , tml 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"}; ``` 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; ``` And I've met strange output: ``` tarantool> box.space.test.index {[0] = {unique = true, parts = {{type = "integer", is_nullable = "false", fieldno = "3"}, {type = "unsigned", is_nullable = "false", fieldno = "5"}}, type = "TREE", id = "0", space_id = "520", name = "id"}, [1] = {unique = false, parts = {{type = "unsigned", is_nullable = "false", fieldno = "1"}}, id = 1, space_id = 520, type = "TREE", name = "bucket_id"}, [bucket_id]1 = !!!*anchor[id]0 = !!!*anchor}; ``` "!!!*anchor" looks strange. Seems it occurs when you mix map and array. On 08/05/2020 14:47, Cyrill Gorcunov wrote: > In the series we implement support for internal taranool types > such as ULL. To be able to do so we implement own serializer > thus the output is simiar to encodings in yaml mode. > > Once things settle down we will drop serpent module. I guess > I need to explain why serpent didn't fit: there is no interface > inside serpent to fetch internal tarantool types and adding it > means more work to do than implement an own serializer. > > issue https://github.com/tarantool/tarantool/issues/4682 > branch gorcunov/gh-4682-console-numbers > > Cyrill Gorcunov (7): > box/console: console_session_vtab -- use designated initialization > box/console: use tabs instead of spaces in consolelib > box/console: rename format to format_yaml > box/console: rename luaL_yaml_default to serializer_yaml > box/console: implement lua serializer > box/console: switch to new lua serializer > test: extend console lua test > > src/box/CMakeLists.txt | 1 + > src/box/lua/console.c | 111 +++- > src/box/lua/console.lua | 75 +-- > src/box/lua/serialize_lua.c | 1021 +++++++++++++++++++++++++++++ > src/box/lua/serialize_lua.h | 67 ++ > test/app-tap/console_lua.test.lua | 28 +- > 6 files changed, 1238 insertions(+), 65 deletions(-) > create mode 100644 src/box/lua/serialize_lua.c > create mode 100644 src/box/lua/serialize_lua.h >