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 26EE26EC55; Wed, 21 Jul 2021 10:48:35 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 26EE26EC55 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1626853715; bh=Qy17eDT2JE5tc6DiacBUaieIK00DuCECZG4qOaRhCPA=; h=Date:To:Cc:References:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=fUV77CobZti7GlijwTIGjULP34mAUvWYp0L78FuCorm9zplBOZ+tNAWSGeqABaLcZ YhClzTfC0KWjmnZgShhpc7Zjb21R2gIPMuzGnF1Pugm1QWPGllDHmJMWDy7Xu/pCDj fYxMdd7kru+4rUvIUuXxHvdwc/iofALDqLARfOoo= Received: from smtpng1.i.mail.ru (smtpng1.i.mail.ru [94.100.181.251]) (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 C71646EC55 for ; Wed, 21 Jul 2021 10:48:33 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org C71646EC55 Received: by smtpng1.m.smailru.net with esmtpa (envelope-from ) id 1m66y0-0002iP-3K; Wed, 21 Jul 2021 10:48:32 +0300 Date: Wed, 21 Jul 2021 10:24:57 +0300 To: Timur Safin Cc: alexander.turenko@tarantool.org, tarantool-patches@dev.tarantool.org Message-ID: <20210721072457.GI11494@tarantool.org> References: <20210620185759.GC10212@tarantool.org> <151601d76baa$6d360c70$47a22550$@tarantool.org> <20210629162105.GD10212@tarantool.org> <015801d76d7c$15754c20$405fe460$@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <015801d76d7c$15754c20$405fe460$@tarantool.org> X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/1.10.1 (2018-07-13) X-4EC0790: 10 X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD941C43E597735A9C30288BCF456A452EC92BAB6D044D5CCDE182A05F538085040EF24C97D09798FEDC1D0D58546CA37800EEF4101BBB1B0931C8C08CEB74FA7DF X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7EED5D2FAB4CEB1EDEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F790063770995E888C5C26978638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D879E9F1A84D872DB57F87058540FCBA79117882F4460429724CE54428C33FAD305F5C1EE8F4F765FC3A703B70628EAD7BA471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F446042972877693876707352033AC447995A7AD186FD1C55BDD38FC3FD2E47CDBA5A96583BA9C0B312567BB231DD303D21008E29813377AFFFEAFD269A417C69337E82CC2E827F84554CEF50127C277FBC8AE2E8BA83251EDC214901ED5E8D9A59859A8B6753C3A5E0A5AB5B7089D37D7C0E48F6C5571747095F342E88FB05168BE4CE3AF X-C1DE0DAB: 0D63561A33F958A568434E7BE6EA14D735A1A2A253076A10B235B24B3E7031F3D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA7501A9DF589746230F410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34F6CC1FD336696336837B80F30A7487FB6801B82A209EFF884DA921DBE4BF681BCF9CDA3540FA450A1D7E09C32AA3244C27A56FC84D7040BC73789A8026160BE355E75C8D0ED9F6EE927AC6DF5659F194 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojJX8TSRcb/Shi2Rx93ASwPw== X-Mailru-Sender: 689FA8AB762F7393C37E3C1AEC41BA5D72DE00B9E52576CF43FF6B0585F92A8AA7C8D0F45F857DBFE9F1EFEE2F478337FB559BB5D741EB964C8C2C849690F8E70A04DAD6CC59E33667EA787935ED9F1B X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v2 1/3] test: corrected reported error lines 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: Igor Munkin via Tarantool-patches Reply-To: Igor Munkin Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Timur, On 30.06.21, Timur Safin wrote: > : From: Igor Munkin > : Subject: Re: [Tarantool-patches] [PATCH v2 1/3] test: corrected reported > : error lines > : > : Timur, > : > > : > : > : > : Minor: Strictly saying :123 part is also broken. > : > > : > O_o, why? Could you please clarify? We report it as line number in the > : > source file, in this case tkt-9a8b09f8e6.test.lua:123 was exactly the > : > caller location? > : > : Do you need the location of definition (:123) or location where the > : function execution is stopped at the moment (:142)? If I got your point, > : you prefer the latter, right? > > FWIW, currentline is pointing _exactly_ to the line number in the file > Which was calling this error, not to the start of function definition. Yes, this is written in Lua Reference Manual[1]. > At least in our cases, when we not introduce any extra do scopes. What is wrong with extra do scopes? > > [Now I start to worry with the question when .linedefined is not 0 > and whether we would need to sum .currentline and .linedefined to > get actual source line in the file?] > > : > if currentline may be missing in the traceback object for any reason. > : > : It may not, considering the flags used for obtaining debug info. > : > : > If it's impossible for the set of requested flags, then I'll get rid > : > of linedefined here. > : > : Yes, field is provided by 'l' flag[1]. Please, get rid of > : and the default 0 and drop a few sentences regarding this > : change in commit message. > > Please see my worries about .linedefined above. Currently it's in main scope, > when it will be not main scope, do any extra do create separate scope? Lexical blocks are described here[2]. > Could .currentline be .linedefined related or it's guaranteed to be > Counted from start of file? I see nothing about such odd behaviour in Reference Manual[1], but you can check manually whether LuaJIT works fine in this case. > > : > : [1]: https://www.lua.org/manual/5.1/manual.html#lua_getinfo > : > : -- > : Best regards, > : IM > [1]: https://www.lua.org/manual/5.1/manual.html#3.8 [2]: https://www.lua.org/manual/5.1/manual.html#2.4.2 -- Best regards, IM