From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id 897366EC40; Fri, 13 Aug 2021 20:41:51 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 897366EC40 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1628876511; bh=7bh+vnaoN6LslYc9LF48Qrx6XRxZ1/kfghmRAdqKojA=; h=References:In-Reply-To:Date:To:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=RaLswpW10tq1GkPOVS9D0OvmoJ8m/Q7Zz8nHLpbpfU3yH3DvYGvcuuGEzUhqwsuOb 64zP8dH9WoD0SGJ5KAvh89+SsRQx+3xqnVAiuRp3p+hI2hpQKnu5Km9VCOnhOtayms qbxq59wtfw49oNmrVpPpfWW7fAAEK2Jn/07ATr5Y= Received: from smtp39.i.mail.ru (smtp39.i.mail.ru [94.100.177.99]) (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 18B906EC40 for ; Fri, 13 Aug 2021 20:41:50 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 18B906EC40 Received: by smtp39.i.mail.ru with esmtpa (envelope-from ) id 1mEbBl-0004sd-AP for tarantool-patches@dev.tarantool.org; Fri, 13 Aug 2021 20:41:49 +0300 Received: by mail-lf1-f48.google.com with SMTP id g30so21206791lfv.4 for ; Fri, 13 Aug 2021 10:41:49 -0700 (PDT) X-Gm-Message-State: AOAM5324QsVcx1r85i9MUU8ey8YKlh6zO+CJBMcDt5EKdjAMZvkINykf NkZ9qomzn8QGdpUjiUZs5p7HjQZZTY5JOZu/mw== X-Google-Smtp-Source: ABdhPJwUD52svopACXifIv2/N6GiBtrxyjPS7aJO4xaKQd3fbc8BWsTAXC/CWWviVJoWAZtE5BlBgNavI1l90SX9djM= X-Received: by 2002:ac2:4839:: with SMTP id 25mr2161973lft.455.1628876508930; Fri, 13 Aug 2021 10:41:48 -0700 (PDT) MIME-Version: 1.0 References: <02d9fe40f3b007f351d873e9cc880e41d8cfacad.1628859463.git.vdavydov@tarantool.org> In-Reply-To: <02d9fe40f3b007f351d873e9cc880e41d8cfacad.1628859463.git.vdavydov@tarantool.org> Date: Fri, 13 Aug 2021 20:41:28 +0300 X-Gmail-Original-Message-ID: Message-ID: To: Vladimir Davydov Cc: tml , Vladislav Shpilevoy , Yaroslav Dynnikov Content-Type: multipart/alternative; boundary="000000000000b2a6d005c9745d4f" X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD92087353F0EC44DD972FF4A7D76DB5E242D14FEF1BD8BF4AC182A05F5380850405F249EF543B89E8D77F5E80AA6EADC37774EFE600CFEC7B37B9FDE57B095CD2E X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE73F94C36969B178B8EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006374C960BD2D03BF0BDEA1F7E6F0F101C6723150C8DA25C47586E58E00D9D99D84E1BDDB23E98D2D38BBCA57AF85F7723F22BAFCF856E2CD6DF132F92591E992626CC7F00164DA146DAFE8445B8C89999728AA50765F7900637F6B57BC7E64490618DEB871D839B7333395957E7521B51C2DFABB839C843B9C08941B15DA834481F8AA50765F7900637D0FEED2715E18529389733CBF5DBD5E9B5C8C57E37DE458BD9DD9810294C998ED8FC6C240DEA76428AA50765F79006378B0BF166B3F91441D81D268191BDAD3DBD4B6F7A4D31EC0BEA7A3FFF5B025636D81D268191BDAD3D78DA827A17800CE70EDBFD64D0B88650EC76A7562686271EEC990983EF5C03292E808ACE2090B5E14AD6D5ED66289B5259CC434672EE63711DD303D21008E298D5E8D9A59859A8B6B372FE9A2E580EFC725E5C173C3A84C3727597FF642BA4D735872C767BF85DA2F004C90652538430E4A6367B16DE6309 X-C1DE0DAB: 0D63561A33F958A5901CBBF56411E2900D688977D47A0EDE8FDE90E0DDDFF6FED59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA750E14360347543F58410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D3447DF5779098ECEE9F6443F9B481A39B4709AF635EA93A8D0494F5BD4138976D8A84C8F36FFA22A9B1D7E09C32AA3244C35B937B5FE6B99E3B174CE06407B070C51E887DA02A9F7BF3EB3F6AD6EA9203E X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2bioj0dLV0c3jbkwL2dTrCY1YXw== X-Mailru-Sender: 4C235FE2E5D2D8909BFF31224E395B76535B3C137BB297EA54DC6234CC0D53A68BE8AA01AB21533953E6F1E4007818E061AB7FC983AAE23E992E2169F9161B8DDAB93E5CC8760AFE9437F6177E88F7363CDA0F3B3F5B9367 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH] net.box: add __serialize and __tostring methods for future objects X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Yaroslav Dynnikov via Tarantool-patches Reply-To: Yaroslav Dynnikov Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" --000000000000b2a6d005c9745d4f Content-Type: text/plain; charset="UTF-8" Hi! Thank you for the patch. Find my comments below. Best regards Yaroslav Dynnikov On Fri, 13 Aug 2021 at 15:58, Vladimir Davydov wrote: > Example output (for more examples see the test output): > > tarantool> f = c:eval('return 123', {}, {is_async = true}) > --- > ... > > tarantool> tostring(f) > --- > - 'net.box.request: 7' > ... > I think sync has no sense here. It's useless without other info (peer, function). Also, it complicates the tests and makes them less reliable. IMHO simple 'net.box.request' is enough. > tarantool> f > --- > - method: eval > on_push_ctx: [] > result: [123] > on_push: 'function: builtin#91' > sync: 7 > ... > This is also weird: tarantool> f --- - on_push_ctx: [] method: call sync: 4 on_push: 'function: builtin#91' ... tarantool> f.sync --- - null ... tarantool> f.method --- - null ... Why displaying inaccessible fields? You leave a developer no choice: tarantool> debug.getmetatable(f).__serialize(f).method --- - call ... Of course, I miss that fields, but please, there should be another way to access them. Also, speaking of https://github.com/tarantool/tarantool/commit/b996502b403c1698c4b0886de636faa0a63cfb70 , which of them are you going to merge first? Whichever it is, I guess the second one is destined to be refactored afterward. Closes #6314 > --- > https://github.com/tarantool/tarantool/issues/6314 > > https://github.com/tarantool/tarantool/tree/vdavydov/netbox-future-serialize > > --000000000000b2a6d005c9745d4f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi! Thank you for the patch. Find my= comments below.

Best regards
Yaroslav Dynnikov


On Fri, 13 Aug 2021 at 15:58, Vla= dimir Davydov <vdavydov@tarant= ool.org> wrote:
Example output (for more examples see the test output):

=C2=A0 tarantool> f =3D c:eval('return 123', {}, {is_async =3D t= rue})
=C2=A0 ---
=C2=A0 ...

=C2=A0 tarantool> tostring(f)
=C2=A0 ---
=C2=A0 - 'net.box.request: 7'
=C2=A0 ...

I think sync has no sense he= re. It's useless without other info (peer, function).
Also, i= t complicates the tests and makes them less reliable.
IMHO simple= 'net.box.request' is enough.


=C2=A0 tarantool> f
=C2=A0 ---
=C2=A0 - method: eval
=C2=A0 =C2=A0 on_push_ctx: []
=C2=A0 =C2=A0 result: [123]
=C2=A0 =C2=A0 on_push: 'function: builtin#91'
=C2=A0 =C2=A0 sync: 7
=C2=A0 ...

This is also weird:

tarantool> f
---
- on_push_ctx: []
=C2=A0 meth= od: call
=C2=A0 sync: 4
=C2=A0 on_push: 'function: builtin#91'= ;
...

tarantool> f.sync
---
- null
...

taranto= ol> f.method
---
- null
...

Why displa= ying inaccessible fields? You leave a developer no choice:

tarantool> debug.getmetatable(f).__serialize(f).method
---- call
...

Of course, I miss that fields, but please= , there should be another way to access them.

which of t= hem are you going to merge first? Whichever it is, I guess the second one i= s destined to be refactored afterward.

Closes #6314
---
https://github.com/tarantool/tarantool/issues/6314=
https://github.com/taran= tool/tarantool/tree/vdavydov/netbox-future-serialize

--000000000000b2a6d005c9745d4f--