From: Alexander Turenko <alexander.turenko@tarantool.org> To: sergeyb@tarantool.org Cc: tarantool-patches@dev.tarantool.org, v.shpilevoy@tarantool.org Subject: Re: [Tarantool-patches] [PATCH 1/2] src: return back import of table.clear() method Date: Tue, 28 Jul 2020 19:41:28 +0300 [thread overview] Message-ID: <20200728164128.7sbgbjw3qiayuouc@tkn_work_nb> (raw) In-Reply-To: <1f495519687c8e037c638ccabab28e23882a41df.1595943364.git.sergeyb@tarantool.org> > src: return back import of table.clear() method We usually mark a subsystem using a prefix: 'app' or 'lua' would fit good here. BTW, why you splitted the code and test changes? I know, there are cons and pros, but we usually include tests into the same commit as a source change. Upside: It works as the documentation of changes; a formal description of the change in addition to informal one within a commit message. Downside: A bit more work is required to verify the test on different tarantool version. > Import of 'table.clear' module has been removed > to fix luacheck warning about unused variable in > commit 3af79e70b5e1e9b1d69b97f3031a299132a02d2f Nit: We usually use form git_commit_hash ('header of the commit') when mention a commit. > and method table.clear() became unavailable in Tarantool. I would clarify that `table.clear` is not available until an explicit `require('table.clear')` call. > --- a/src/lua/trigger.lua > +++ b/src/lua/trigger.lua > @@ -1,4 +1,5 @@ > local fun = require('fun') > +local _ = require('table.clear') I would add a comment that would explain why it is necessary. Just to don't confuse a reader of the code. It seems it was added non-intentionally in 8a3dae66f6f2c8dffac39bbda1b38d1e17dfcc63 ('On schema reload callback for net.box module') (not used anywhere in sources). However now we see that the membership module leans on the fact that it is available without explicit 'require'. I would look for more appropriate place for it: there is nothing special in trigger.lua. Maybe src/lua/table.lua or src/lua/init.lua. The former looks better for me. WBR, Alexander Turenko.
next prev parent reply other threads:[~2020-07-28 16:42 UTC|newest] Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-07-28 13:52 [Tarantool-patches] [PATCH 0/2] Recover " sergeyb 2020-07-28 13:52 ` [Tarantool-patches] [PATCH 1/2] src: return back import " sergeyb 2020-07-28 16:41 ` Alexander Turenko [this message] 2020-08-31 11:14 ` Sergey Bronnikov 2020-09-01 13:57 ` Alexander Turenko 2020-08-12 13:03 ` Oleg Babin 2020-08-31 11:18 ` Sergey Bronnikov 2020-07-28 13:52 ` [Tarantool-patches] [PATCH 2/2] test: add regression test for table.clear() sergeyb 2020-07-28 16:41 ` Alexander Turenko 2020-08-31 11:20 ` Sergey Bronnikov 2020-07-28 16:41 ` [Tarantool-patches] [PATCH 0/2] Recover of table.clear() method Alexander Turenko 2020-09-02 9:49 ` Sergey Bronnikov 2020-09-08 13:25 ` Kirill Yukhin
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=20200728164128.7sbgbjw3qiayuouc@tkn_work_nb \ --to=alexander.turenko@tarantool.org \ --cc=sergeyb@tarantool.org \ --cc=tarantool-patches@dev.tarantool.org \ --cc=v.shpilevoy@tarantool.org \ --subject='Re: [Tarantool-patches] [PATCH 1/2] src: return back import of table.clear() method' \ /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