From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id 742936EC58; Thu, 18 Feb 2021 19:11:10 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 742936EC58 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1613664670; bh=eVG0+NZKpLFoLKIa6w7/wT/3N1+BbqlYJwdK6Hg/2qw=; h=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=TeoD2RqVvV+vf23ro3z3NlMkpGVe+CNbkNp4Yh6sQpTNGGh/Czl2/9NNgNMc3S+OH QHOQBfQef+GJD0zXP5aPYKcJPJroCeV2ViTEhYwH7OSSKQZds/Tb2A44zabErBoeIc sDjOAP044VeqjaAdfr1elk9sqj6DpmpUxCQTVqww= Received: from smtp37.i.mail.ru (smtp37.i.mail.ru [94.100.177.97]) (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 A23C36EC58 for ; Thu, 18 Feb 2021 19:11:08 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org A23C36EC58 Received: by smtp37.i.mail.ru with esmtpa (envelope-from ) id 1lCltT-0006dr-PU; Thu, 18 Feb 2021 19:11:08 +0300 Date: Thu, 18 Feb 2021 19:11:08 +0300 To: Sergey Bronnikov Message-ID: <20210218161108.x54d2fxe7ig7bgxq@tkn_work_nb> References: <872de52f-3250-a673-9161-77d5e0543795@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <872de52f-3250-a673-9161-77d5e0543795@tarantool.org> X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD975C3EC174F56692243410BA6471F0166336C1783AA96243D182A05F53808504067DB6C36B29D5FFDE8EB9E999DCEEC5AD527EC78E83830637691328448E0A35E X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7C4FDA87F74E4A9F6EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637E8D1333770DC60CDEA1F7E6F0F101C674E70A05D1297E1BBC6CDE5D1141D2B1CA8A29C4C242CC6AB8625783F366E26015E8561E6044519169FA2833FD35BB23D9E625A9149C048EE9ECD01F8117BC8BEA471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F446042972877693876707352033AC447995A7AD18F04B652EEC242312D2E47CDBA5A96583BA9C0B312567BB23089D37D7C0E48F6CA18204E546F3947C83C798A30B85E16BC6EABA9B74D0DA47C8A9BA7A39EFB7666BA297DBC24807EA089D37D7C0E48F6C8AA50765F7900637E62180BDA7F10F15EFF80C71ABB335746BA297DBC24807EA27F269C8F02392CD4DF8A859A081327B27F269C8F02392CD5571747095F342E88FB05168BE4CE3AF X-B7AD71C0: 6FEFE4C63DFE2D85469AD6E133326EAB664F5199923B286E81C2AD9CFA0FBF5C9C2BBA594F31363B5803BE1F3B17DC36E8F7B195E1C97831A7B507CC8FE82C570D9CEC0EA6A0B831 X-C1DE0DAB: 0D63561A33F958A5A0C27A9EDCBBA6827DC7146DED77C5FAEF830F5447CB01CBD59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA75448CF9D3A7B2C848410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D343F22CE0A71FDB37EA2B98299631220A60D714D2BD5A3E2CCD96913C386B6A362EEFE7475A2DCA1241D7E09C32AA3244CAF1DB01BEE9E32EB808C8EE372E31B19408A6A02710B7304927AC6DF5659F194 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojspgX6BLqznPIIfau1wRwlA== X-Mailru-Sender: 3B9A0136629DC9120A41FA45E5DF9B9D6BAC3E2D45A15BC8347EA6D43B9AE923ED4E62DB5F18DD7FE7E9AC22BF8F68B8043D6CCB234D47A84F4DA692B4D09B99EA14D4C13BB08888112434F685709FCF0DA7A0AF5A3A8387 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH] tools: fix luacheck invocation in different cases X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Alexander Turenko via Tarantool-patches Reply-To: Alexander Turenko Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" > 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).