Skip to content
Snippets Groups Projects
Unverified Commit b53cb2ae authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Alexander Turenko
Browse files

console: drop unused serpent module


Since the commit ae7e2103 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: default avatarCyrill Gorcunov <gorcunov@gmail.com>
parent 33b0dd58
No related branches found
No related tags found
No related merge requests found
...@@ -34,9 +34,6 @@ ...@@ -34,9 +34,6 @@
[submodule "third_party/decNumber"] [submodule "third_party/decNumber"]
path = third_party/decNumber path = third_party/decNumber
url = https://github.com/tarantool/decNumber.git 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"] [submodule "third_party/curl"]
path = third_party/curl path = third_party/curl
url = https://github.com/tarantool/curl.git url = https://github.com/tarantool/curl.git
......
...@@ -29,7 +29,6 @@ include_files = { ...@@ -29,7 +29,6 @@ include_files = {
exclude_files = { exclude_files = {
"build/**/*.lua", "build/**/*.lua",
-- Third-party source code. -- Third-party source code.
"src/box/lua/serpent.lua",
"test-run/**/*.lua", "test-run/**/*.lua",
"test/**/*.lua", "test/**/*.lua",
"third_party/**/*.lua", "third_party/**/*.lua",
......
...@@ -17,7 +17,6 @@ endif() ...@@ -17,7 +17,6 @@ endif()
lua_source(lua_sources lua/net_box.lua) lua_source(lua_sources lua/net_box.lua)
lua_source(lua_sources lua/upgrade.lua) lua_source(lua_sources lua/upgrade.lua)
lua_source(lua_sources lua/console.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/xlog.lua)
lua_source(lua_sources lua/key_def.lua) lua_source(lua_sources lua/key_def.lua)
lua_source(lua_sources lua/merger.lua) lua_source(lua_sources lua/merger.lua)
......
...@@ -48,8 +48,6 @@ ...@@ -48,8 +48,6 @@
#include <stdlib.h> #include <stdlib.h>
#include <ctype.h> #include <ctype.h>
extern char serpent_lua[];
static struct luaL_serializer *serializer_yaml; static struct luaL_serializer *serializer_yaml;
static struct luaL_serializer *serializer_lua; static struct luaL_serializer *serializer_lua;
...@@ -578,24 +576,6 @@ console_session_push(struct session *session, struct port *port) ...@@ -578,24 +576,6 @@ console_session_push(struct session *session, struct port *port)
TIMEOUT_INFINITY); 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 void
tarantool_lua_console_init(struct lua_State *L) tarantool_lua_console_init(struct lua_State *L)
{ {
...@@ -663,12 +643,6 @@ 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_CONSOLE] = console_session_vtab;
session_vtab_registry[SESSION_TYPE_REPL] = 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);
} }
/* /*
......
../../../third_party/serpent/src/serpent.lua
\ No newline at end of file
Subproject commit 879580fb21933f63eb23ece7d60ba2349a8d2848
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment