[tarantool-patches] Re: [PATCH] tarantoolctl: remove metatable assumptions in start()
Alexander Turenko
alexander.turenko at tarantool.org
Mon Apr 15 01:41:52 MSK 2019
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.
More information about the Tarantool-patches
mailing list