From: Alexander Turenko <alexander.turenko@tarantool.org> To: Roman Khabibov <roman.habibov@tarantool.org> Cc: tarantool-patches@freelists.org Subject: [tarantool-patches] Re: [PATCH] tarantoolctl: remove metatable assumptions in start() Date: Mon, 15 Apr 2019 01:41:52 +0300 [thread overview] Message-ID: <20190414224150.gcv2hbmazhri7o5w@tkn_work_nb> (raw) In-Reply-To: <80D84297-4781-41C1-9E70-14712A77BA40@tarantool.org> The code is okay, but I would clarify the commit message a bit. > >> > >> There was assumpted uninitialized metamethods of box.cfg{} if user > >> did't call it in his instance. > > > > This sentence raises more questions then give answers. What is > > 'uninitialized metamethods'? Whether 'of box.cfg{}' means result of the > > call or a new value of the 'cfg' field of the 'box' table? > > > > Also I doubt 'There was assumpted' is valid phrase. > > tarantoolctl: raise error when box.cfg isn't called > > There was no check whether box.cfg{} was initialized in an > instance. If so, an error should be raised. 'box' can be initialized (it is a module), 'box.cfg' can be called, but we usually use parentheses to mark a name as a function, so 'box.cfg()' can be called. Technically 'box.cfg{} was initialized' is not correct. 'If so' here point to the positive case (when called). Let me propose wording that will satisfy me: > Added a check whether box.cfg() is called within an instance file. If > box.cfg() is missed, point a user the reason of a fail explicitly. > > Before this commit the error was look so: > > /usr/bin/tarantoolctl:541: attempt to index a nil value Also don't forget to add 'Fixes #xxxx' clause to the end of the commit message.
next prev parent reply other threads:[~2019-04-14 22:42 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-03-27 13:40 [tarantool-patches] " Roman Khabibov 2019-03-28 8:59 ` [tarantool-patches] " Konstantin Osipov 2019-04-01 5:43 ` Alexander Turenko 2019-04-05 23:26 ` Roman Khabibov 2019-04-11 14:57 ` Alexander Turenko 2019-04-12 9:29 ` Roman Khabibov 2019-04-14 22:41 ` Alexander Turenko [this message] 2019-04-15 10:59 ` Roman Khabibov 2019-04-15 12:55 ` Alexander Turenko 2019-04-16 12:01 ` 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=20190414224150.gcv2hbmazhri7o5w@tkn_work_nb \ --to=alexander.turenko@tarantool.org \ --cc=roman.habibov@tarantool.org \ --cc=tarantool-patches@freelists.org \ --subject='[tarantool-patches] Re: [PATCH] tarantoolctl: remove metatable assumptions in start()' \ /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