From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-f68.google.com (mail-lf1-f68.google.com [209.85.167.68]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id CE49D469719 for ; Fri, 13 Nov 2020 17:56:52 +0300 (MSK) Received: by mail-lf1-f68.google.com with SMTP id j205so14226249lfj.6 for ; Fri, 13 Nov 2020 06:56:52 -0800 (PST) From: Cyrill Gorcunov Date: Fri, 13 Nov 2020 17:56:48 +0300 Message-Id: <20201113145648.268768-1-gorcunov@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH] console: drop unused serpent module List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: tml Cc: Alexander Turenko Since the commit ae7e210 we use internal serializer thus we no longer need serpent code. The patch removes the references from the source code and .gitmodules file, still one might need to run | git submodule deinit -f third_party/serpent manually to clean up the working tree depending on local git version. Closes #5517 Signed-off-by: Cyrill Gorcunov --- issue https://github.com/tarantool/tarantool/issues/5517 branch gorcunov/gh-5517-drop-serpent Sasha, please take a very close look. While the commit works just fine locally we need to double check if submodule removed without any clash. .gitmodules | 3 --- .luacheckrc | 1 - src/box/CMakeLists.txt | 1 - src/box/lua/console.c | 26 -------------------------- src/box/lua/serpent.lua | 1 - third_party/serpent | 1 - 6 files changed, 33 deletions(-) delete mode 120000 src/box/lua/serpent.lua delete mode 160000 third_party/serpent diff --git a/.gitmodules b/.gitmodules index d45e9ce8b..8e3a17a63 100644 --- a/.gitmodules +++ b/.gitmodules @@ -34,9 +34,6 @@ [submodule "third_party/decNumber"] path = third_party/decNumber url = https://github.com/tarantool/decNumber.git -[submodule "third_party/serpent"] - path = third_party/serpent - url = https://github.com/tarantool/serpent.git [submodule "third_party/curl"] path = third_party/curl url = https://github.com/tarantool/curl.git diff --git a/.luacheckrc b/.luacheckrc index 2a652cd06..6fe34c2e1 100644 --- a/.luacheckrc +++ b/.luacheckrc @@ -29,7 +29,6 @@ include_files = { exclude_files = { "build/**/*.lua", -- Third-party source code. - "src/box/lua/serpent.lua", "test-run/**/*.lua", "test/**/*.lua", "third_party/**/*.lua", diff --git a/src/box/CMakeLists.txt b/src/box/CMakeLists.txt index d1667796a..04d53f740 100644 --- a/src/box/CMakeLists.txt +++ b/src/box/CMakeLists.txt @@ -17,7 +17,6 @@ endif() lua_source(lua_sources lua/net_box.lua) lua_source(lua_sources lua/upgrade.lua) lua_source(lua_sources lua/console.lua) -lua_source(lua_sources lua/serpent.lua) lua_source(lua_sources lua/xlog.lua) lua_source(lua_sources lua/key_def.lua) lua_source(lua_sources lua/merger.lua) diff --git a/src/box/lua/console.c b/src/box/lua/console.c index ea5385c74..2e8204db6 100644 --- a/src/box/lua/console.c +++ b/src/box/lua/console.c @@ -48,8 +48,6 @@ #include #include -extern char serpent_lua[]; - static struct luaL_serializer *serializer_yaml; static struct luaL_serializer *serializer_lua; @@ -578,24 +576,6 @@ console_session_push(struct session *session, struct port *port) TIMEOUT_INFINITY); } -static void -lua_serpent_init(struct lua_State *L) -{ - static const char modname[] = "serpent"; - const char *modfile; - - lua_getfield(L, LUA_REGISTRYINDEX, "_LOADED"); - modfile = lua_pushfstring(L, "@builtin/%s.lua", modname); - if (luaL_loadbuffer(L, serpent_lua, strlen(serpent_lua), modfile)) { - panic("Error loading Lua module %s...: %s", - modname, lua_tostring(L, -1)); - } - - lua_call(L, 0, 1); - lua_setfield(L, -3, modname); /* _LOADED[modname] = new table */ - lua_pop(L, 2); -} - void tarantool_lua_console_init(struct lua_State *L) { @@ -663,12 +643,6 @@ tarantool_lua_console_init(struct lua_State *L) }; session_vtab_registry[SESSION_TYPE_CONSOLE] = console_session_vtab; session_vtab_registry[SESSION_TYPE_REPL] = console_session_vtab; - - /* - * Register serpent serializer as we - * need it inside console REPL mode. - */ - lua_serpent_init(L); } /* diff --git a/src/box/lua/serpent.lua b/src/box/lua/serpent.lua deleted file mode 120000 index 816be0875..000000000 --- a/src/box/lua/serpent.lua +++ /dev/null @@ -1 +0,0 @@ -../../../third_party/serpent/src/serpent.lua \ No newline at end of file diff --git a/third_party/serpent b/third_party/serpent deleted file mode 160000 index 879580fb2..000000000 --- a/third_party/serpent +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 879580fb21933f63eb23ece7d60ba2349a8d2848 -- 2.26.2