Tarantool development patches archive
 help / color / mirror / Atom feed
From: "Alexander V. Tikhonov" <avtikhon@tarantool.org>
To: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH] console: drop unused serpent module
Date: Tue, 1 Dec 2020 12:29:47 +0300	[thread overview]
Message-ID: <20201201092947.GA128132@hpalx> (raw)
In-Reply-To: <20201113145648.268768-1-gorcunov@gmail.com>

Hi Cyrill, , thanks for the patch, as I see no new degradation found in
gitlab-ci testing commit criteria pipeline [1], patch LGTM.

[1] - https://gitlab.com/tarantool/tarantool/-/pipelines/215793322

On Fri, Nov 13, 2020 at 05:56:48PM +0300, Cyrill Gorcunov wrote:
> 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
> 

  parent reply	other threads:[~2020-12-01  9:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-13 14:56 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 [this message]
2020-12-01 12:20 ` Alexander Turenko
2020-12-01 12:22   ` Cyrill Gorcunov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201201092947.GA128132@hpalx \
    --to=avtikhon@tarantool.org \
    --cc=gorcunov@gmail.com \
    --cc=tarantool-patches@dev.tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH] console: drop unused serpent module' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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