Tarantool development patches archive
 help / color / mirror / Atom feed
From: Alexander Turenko via Tarantool-patches <tarantool-patches@dev.tarantool.org>
To: Sergey Bronnikov <sergeyb@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH] tools: fix luacheck invocation in different cases
Date: Thu, 18 Feb 2021 19:11:08 +0300	[thread overview]
Message-ID: <20210218161108.x54d2fxe7ig7bgxq@tkn_work_nb> (raw)
In-Reply-To: <872de52f-3250-a673-9161-77d5e0543795@tarantool.org>

> On 01.12.2020 15:32, Alexander Turenko wrote:
> > Now `make luacheck` gracefully handles different cases: in-source and
> > out-of-source build (within the source tree or outside), current working
> > directory as a real path or with symlink components.
> 
> 1. We already discussed it verbally and personally I don't like suggested
> solution with wrapper
> 
> because it makes the code more complex.
> 
> From side I have another solution that much more simple:

Out of source build would not work this way if the build directory is
outside of the source directory. I don't think that it is acceptable.

I'll rewrite my solution to CMake to don't spread logic across files.

<..stripped code and testing results..>

> > diff --git a/tools/run-luacheck.sh b/tools/run-luacheck.sh
> > new file mode 100755
> > index 000000000..e6ebb78b3
> > --- /dev/null
> > +++ b/tools/run-luacheck.sh
> > @@ -0,0 +1,71 @@
> > +#!/bin/sh
> > +
> > +set -eux
> > +
> > +SOURCE_DIR="${1:-}"
> > +BUILD_DIR="${2:-}"
> 
> 2. I don't like such approach. I think wrapper should be transparent for
> user
> 
> so that it allow to pass any luacheck option and it will be passed to a real
> luacheck.
> 
> Otherwise you need to modify wrapper when you need to pass any other
> luacheck option.

It would be nice in theory, but it would require quite accurate handling
of paths that contain spaces. Likely IFS redefinition and so on. I would
not step into this until there will be a real need, but rather provide a
simple wrapper that works always.

Anyway, now everything in CMake (see patch v2).

      reply	other threads:[~2021-02-18 16:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-01 12:32 Alexander Turenko
2020-12-16 16:47 ` Sergey Bronnikov
2021-02-18 16:11   ` Alexander Turenko via Tarantool-patches [this message]

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=20210218161108.x54d2fxe7ig7bgxq@tkn_work_nb \
    --to=tarantool-patches@dev.tarantool.org \
    --cc=alexander.turenko@tarantool.org \
    --cc=sergeyb@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH] tools: fix luacheck invocation in different cases' \
    /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