From: Yaroslav Dynnikov via Tarantool-patches <tarantool-patches@dev.tarantool.org>
To: Vladimir Davydov <vdavydov@tarantool.org>
Cc: tml <tarantool-patches@dev.tarantool.org>,
Vladislav Shpilevoy <v.shpilevoy@tarantool.org>,
Yaroslav Dynnikov <yaroslav.dynnikov@tarantool.org>
Subject: Re: [Tarantool-patches] [PATCH] net.box: add __serialize and __tostring methods for future objects
Date: Fri, 13 Aug 2021 20:41:28 +0300 [thread overview]
Message-ID: <CAK0MaD0AZd6z08sPf2rr55pp4KtTr2cyDiL2nk1YJn09fM+vbA@mail.gmail.com> (raw)
In-Reply-To: <02d9fe40f3b007f351d873e9cc880e41d8cfacad.1628859463.git.vdavydov@tarantool.org>
[-- Attachment #1: Type: text/plain, Size: 1524 bytes --]
Hi! Thank you for the patch. Find my comments below.
Best regards
Yaroslav Dynnikov
On Fri, 13 Aug 2021 at 15:58, Vladimir Davydov <vdavydov@tarantool.org>
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
>
>
[-- Attachment #2: Type: text/html, Size: 3072 bytes --]
next prev parent reply other threads:[~2021-08-13 17:41 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-13 12:58 Vladimir Davydov via Tarantool-patches
2021-08-13 17:41 ` Yaroslav Dynnikov via Tarantool-patches [this message]
2021-08-17 7:58 ` Vladimir Davydov via Tarantool-patches
2021-08-17 8:00 ` [Tarantool-patches] [PATCH v2] " Vladimir Davydov via Tarantool-patches
2021-08-24 22:39 ` Vladislav Shpilevoy via Tarantool-patches
2021-08-25 13:35 ` Vladimir Davydov via Tarantool-patches
2021-08-25 20:08 ` Vladislav Shpilevoy via Tarantool-patches
2021-08-26 14:56 ` Yaroslav Dynnikov via Tarantool-patches
2021-08-26 15:05 ` Vladimir Davydov via Tarantool-patches
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAK0MaD0AZd6z08sPf2rr55pp4KtTr2cyDiL2nk1YJn09fM+vbA@mail.gmail.com \
--to=tarantool-patches@dev.tarantool.org \
--cc=v.shpilevoy@tarantool.org \
--cc=vdavydov@tarantool.org \
--cc=yaroslav.dynnikov@tarantool.org \
--subject='Re: [Tarantool-patches] [PATCH] net.box: add __serialize and __tostring methods for future objects' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox