From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp16.mail.ru (smtp16.mail.ru [94.100.176.153]) (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 C282E430408 for ; Wed, 12 Aug 2020 16:03:51 +0300 (MSK) References: <1f495519687c8e037c638ccabab28e23882a41df.1595943364.git.sergeyb@tarantool.org> From: Oleg Babin Message-ID: <0f75a16f-c1a7-992b-29fb-54358861cd70@tarantool.org> Date: Wed, 12 Aug 2020 16:03:50 +0300 MIME-Version: 1.0 In-Reply-To: <1f495519687c8e037c638ccabab28e23882a41df.1595943364.git.sergeyb@tarantool.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-GB Subject: Re: [Tarantool-patches] [PATCH 1/2] src: return back import of table.clear() method List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: sergeyb@tarantool.org, tarantool-patches@dev.tarantool.org, v.shpilevoy@tarantool.org, alexander.turenko@tarantool.org Hi! Thanks for your patch! I think it shouldn't be placed in "src/lua/trigger.lua". I believe "src/lua/table.lua" is more appropriate place. Of course with comment why it should be done e.g. "This require modifies global "table" module and adds "clear" function to it". On 28/07/2020 16:52, sergeyb@tarantool.org wrote: > From: Sergey Bronnikov > > Import of 'table.clear' module has been removed > to fix luacheck warning about unused variable in > commit 3af79e70b5e1e9b1d69b97f3031a299132a02d2f > and method table.clear() became unavailable in Tarantool. > > Part of #5210 > --- > src/lua/trigger.lua | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/src/lua/trigger.lua b/src/lua/trigger.lua > index 1330ecdd4..066329ea6 100644 > --- a/src/lua/trigger.lua > +++ b/src/lua/trigger.lua > @@ -1,4 +1,5 @@ > local fun = require('fun') > +local _ = require('table.clear') BTW, "require('table.clear')" should be enough without "local _ =" > > -- > -- Checks that argument is a callable, i.e. a function or a table