Tarantool development patches archive
 help / color / mirror / Atom feed
From: Vladimir Davydov <vdavydov.dev@gmail.com>
To: Kirill Shcherbatov <kshcherbatov@tarantool.org>
Cc: tarantool-patches@freelists.org
Subject: Re: [PATCH v3 4/6] box: export registered functions in box.func folder
Date: Tue, 18 Jun 2019 19:11:52 +0300	[thread overview]
Message-ID: <20190618161152.gdy2vbl76lzliokc@esperanza> (raw)
In-Reply-To: <81d7293c993369d7d4e984391c8854bdf5b16818.1560433806.git.kshcherbatov@tarantool.org>

On Thu, Jun 13, 2019 at 05:08:24PM +0300, Kirill Shcherbatov wrote:
> diff --git a/test/box/function1.result b/test/box/function1.result
> index cadeb0467..331bd466a 100644
> --- a/test/box/function1.result
> +++ b/test/box/function1.result
> @@ -57,6 +57,25 @@ c:call('function1.args', { 15 })
>  ---
>  - [[15, 'hello']]
>  ...
> +box.func["function1.args"]
> +---
> +- language: C
> +  setuid: false
> +  name: function1.args
> +  id: 2
> +...
> +box.func["function1.args"]:call()
> +---
> +- error: Use func:call(...)
> +...
> +box.func["function1.args"]:call({ "xx" })
> +---
> +- error: first tuple field must be uint
> +...
> +box.func["function1.args"]:call({ 15 })
> +---
> +- [15, 'hello']
> +...
>  box.schema.func.drop("function1.args")
>  ---
>  ...
> @@ -299,3 +318,189 @@ test_run:cmd("setopt delimiter ''");
>  c:close()
>  ---
>  ...
> +-- Test registered functions interface.
> +function divide(a, b) return a / b end
> +---
> +...
> +box.schema.func.create("divide")
> +---
> +...
> +func = box.func.divide
> +---
> +...
> +func.call({4, 2})
> +---
> +- error: 'builtin/box/schema.lua:2197: Use func:call(...) instead of func.call(...)'
> +...
> +func:call(4, 2)
> +---
> +- error: 'builtin/box/schema.lua:2212: Use func:call(table)'
> +...

We'll have to patch this result file every time we update schema.lua.
Let's please add a filter. Take a look at how engine/savepoint.test.lua
handles it.

  parent reply	other threads:[~2019-06-18 16:11 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-13 14:08 [PATCH v3 0/6] box: rework functions machinery Kirill Shcherbatov
2019-06-13 14:08 ` [PATCH v3 1/6] box: rework func cache update machinery Kirill Shcherbatov
2019-06-18 10:52   ` Vladimir Davydov
2019-06-19 15:51     ` [tarantool-patches] " Kirill Shcherbatov
2019-06-13 14:08 ` [PATCH v3 2/6] box: rework box_lua_{call, eval} to use input port Kirill Shcherbatov
2019-06-17  9:35   ` [tarantool-patches] " Konstantin Osipov
2019-06-17 10:27     ` [tarantool-patches] " Kirill Shcherbatov
2019-06-18 12:12   ` Vladimir Davydov
2019-06-19 15:51     ` [tarantool-patches] " Kirill Shcherbatov
2019-06-19 16:11       ` Vladimir Davydov
2019-06-18 13:58   ` Vladimir Davydov
2019-06-19 18:28   ` [tarantool-patches] " Konstantin Osipov
2019-06-20  7:53     ` Kirill Shcherbatov
2019-06-20  8:09       ` Konstantin Osipov
2019-06-20  8:44         ` [tarantool-patches] " Kirill Shcherbatov
2019-06-19 18:30   ` [tarantool-patches] " Konstantin Osipov
2019-06-13 14:08 ` [PATCH v3 3/6] box: rework func object as a function frontend Kirill Shcherbatov
2019-06-18 13:23   ` Vladimir Davydov
2019-06-19 15:51     ` [tarantool-patches] " Kirill Shcherbatov
2019-06-13 14:08 ` [PATCH v3 4/6] box: export registered functions in box.func folder Kirill Shcherbatov
2019-06-18 14:06   ` Vladimir Davydov
2019-06-19 15:51     ` [tarantool-patches] " Kirill Shcherbatov
2019-06-18 16:11   ` Vladimir Davydov [this message]
2019-06-13 14:08 ` [PATCH v3 5/6] box: refactor box_lua_find helper Kirill Shcherbatov
2019-06-18 14:22   ` Vladimir Davydov
2019-06-19 15:51     ` [tarantool-patches] " Kirill Shcherbatov
2019-06-13 14:08 ` [PATCH v3 6/6] box: introduce Lua persistent functions Kirill Shcherbatov
2019-06-18 16:23   ` Vladimir Davydov
2019-06-19 15:51     ` [tarantool-patches] " Kirill Shcherbatov

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=20190618161152.gdy2vbl76lzliokc@esperanza \
    --to=vdavydov.dev@gmail.com \
    --cc=kshcherbatov@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --subject='Re: [PATCH v3 4/6] box: export registered functions in box.func folder' \
    /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