From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 6BF7E23A08 for ; Fri, 4 May 2018 08:05:17 -0400 (EDT) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Llsmc7mjXFYA for ; Fri, 4 May 2018 08:05:17 -0400 (EDT) Received: from smtp20.mail.ru (smtp20.mail.ru [94.100.179.251]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id 27B54236CC for ; Fri, 4 May 2018 08:05:16 -0400 (EDT) Subject: [tarantool-patches] Re: [PATCH v2 3/5] Merge box_error, stat and collations into core library References: <25b2b52bc741e5c6587a144e000860ef900edab2.1524955403.git.v.shpilevoy@tarantool.org> <20180504113656.s7ctowewwzrvfg7x@tkn_work_nb> From: Vladislav Shpilevoy Message-ID: <7c4ef15d-b69d-9f21-998f-8f0852448934@tarantool.org> Date: Fri, 4 May 2018 15:05:14 +0300 MIME-Version: 1.0 In-Reply-To: <20180504113656.s7ctowewwzrvfg7x@tkn_work_nb> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-subscribe: List-owner: List-post: List-archive: To: Alexander Turenko Cc: tarantool-patches@freelists.org Hello. Thanks for review! On 04/05/2018 14:36, Alexander Turenko wrote: > Vlad, > > One comment is below. > > WBR, Alexander Turenko. > > On Sun, Apr 29, 2018 at 01:45:11AM +0300, Vladislav Shpilevoy wrote: >> The goal is to expose collations into Lua with no dependencies on >> box library. But collations merge into core requires box_error >> and stat libraries too. > >> diff --git a/src/box/lua/call.c b/src/box/lua/call.c >> index be13812aa..b60c6c397 100644 >> --- a/src/box/lua/call.c >> +++ b/src/box/lua/call.c >> @@ -30,7 +30,7 @@ >> */ >> #include "box/lua/call.h" >> #include "box/call.h" >> -#include "box/error.h" >> +#include >> #include "fiber.h" >> >> #include "lua/utils.h" >> diff --git a/src/box/lua/error.cc b/src/box/lua/error.cc >> index 314907421..960ea2aa9 100644 >> --- a/src/box/lua/error.cc >> +++ b/src/box/lua/error.cc >> @@ -40,7 +40,7 @@ extern "C" { >> #include >> >> #include "lua/utils.h" >> -#include "box/error.h" >> +#include "src/error.h" >> >> static int >> luaT_error_raise(lua_State *L) > > Don't know what policy is in use in Tarantool. The diff above shows two > different approaches to include the same header within the one commit. > > It seems that we don't use relative includes (with ..) and prefer either > <> or "src/..." w/o any particular system. Right? Right. We do not use relative ways. But "src/error.h" looks ugly, I replaced it with : diff --git a/src/box/lua/error.cc b/src/box/lua/error.cc index 960ea2aa9..bf9e5bac4 100644 --- a/src/box/lua/error.cc +++ b/src/box/lua/error.cc @@ -38,9 +38,9 @@ extern "C" { #include #include +#include #include "lua/utils.h" -#include "src/error.h" static int luaT_error_raise(lua_State *L) For more examples about <> and "" difference you can look at the same file src/box/lua/error.cc: #include #include these files are in <> in lua/ dir, but in "" in box/ dir.