Tarantool development patches archive
 help / color / mirror / Atom feed
* [Tarantool-patches] [PATCH] console: drop unused serpent module
@ 2020-11-13 14:56 Cyrill Gorcunov
  2020-11-19 11:55 ` Sergey Bronnikov
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Cyrill Gorcunov @ 2020-11-13 14:56 UTC (permalink / raw)
  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 <gorcunov@gmail.com>
---
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 <stdlib.h>
 #include <ctype.h>
 
-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

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-12-01 12:22 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-13 14:56 [Tarantool-patches] [PATCH] console: drop unused serpent module Cyrill Gorcunov
2020-11-19 11:55 ` Sergey Bronnikov
2020-11-19 12:05   ` Cyrill Gorcunov
2020-11-19 20:52     ` Cyrill Gorcunov
2020-11-25  9:27       ` Sergey Bronnikov
2020-12-01  9:29 ` Alexander V. Tikhonov
2020-12-01 12:20 ` Alexander Turenko
2020-12-01 12:22   ` Cyrill Gorcunov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox