Tarantool development patches archive
 help / color / mirror / Atom feed
From: lvasiliev <lvasiliev@tarantool.org>
To: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH 3/3] Adapt luarocks help for the tarantoolctl
Date: Sun, 5 Apr 2020 18:15:51 +0300	[thread overview]
Message-ID: <8777b0df-f2b8-3fc5-2d9b-1d0faf66ce78@tarantool.org> (raw)
In-Reply-To: <b1895a63-3bb2-2fa0-1888-4e2d602dc01d@tarantool.org>

Hi! Thanks for the review. See PATCH v2 and comments bellow.

On 04.04.2020 22:02, Vladislav Shpilevoy wrote:
> Thanks for the patch!
> 
> It would be good to get any explanations here. My main
> question is whether luarocks is a self sufficient tool,
> or it is a library used solely by tarantoolctl? In the
> latter case lots of things can be done simpler than they
> are. In the former case it looks incorrect to use 'tarantoolct'
> name anywhere in the sources.
In my mind it is a self sufficient tool with some our patches (not only 
mine). luaroks has been changed to tarantoolctl rocks in the cases where 
it used like program name, in my mind it's user frendly and more correct.
> 
> See 3 comments below.
> 
> On 25/03/2020 22:50, Leonid Vasiliev wrote:
>> ---
>>   src/luarocks/cmd/config.lua      | 18 +++++++++---------
>>   src/luarocks/cmd/help.lua        | 10 +++-------
>>   src/luarocks/cmd/make.lua        |  4 ++--
>>   src/luarocks/cmd/new_version.lua |  2 +-
>>   src/luarocks/cmd/purge.lua       |  2 +-
>>   5 files changed, 16 insertions(+), 20 deletions(-)
>>
>> diff --git a/src/luarocks/cmd/config.lua b/src/luarocks/cmd/config.lua
>> index e9b2fef..d540dea 100644
>> --- a/src/luarocks/cmd/config.lua
>> +++ b/src/luarocks/cmd/config.lua
>> @@ -17,9 +17,9 @@ config_cmd.help = [[
>>     all config files and any command-line flags passed)
>>   
>>     Examples:
>> -     luarocks config lua_interpreter
>> -     luarocks config variables.LUA_INCDIR
>> -     luarocks config lua_version
>> +     tarantoolctl rocks config lua_interpreter
>> +     tarantoolctl rocks config variables.LUA_INCDIR
>> +     tarantoolctl rocks config lua_version
>>   
>>   * When given a configuration key and a value,
>>     it overwrites the config file (see the --scope option below to determine which)
>> @@ -31,26 +31,26 @@ config_cmd.help = [[
>>       used by LuaRocks commands (eqivalent to passing --lua-version).
>>   
>>     Examples:
>> -     luarocks config variables.OPENSSL_DIR /usr/local/openssl
>> -     luarocks config lua_dir /usr/local
>> -     luarocks config lua_version 5.3
>> +     tarantoolctl rocks config variables.OPENSSL_DIR /usr/local/openssl
>> +     tarantoolctl rocks config lua_dir /usr/local
>> +     tarantoolctl rocks config lua_version 5.3
>>   
>>   * When given a configuration key and --unset,
>>     it overwrites the config file (see the --scope option below to determine which)
>>     and deletes that key from the file.
>>   
>> -  Example: luarocks config variables.OPENSSL_DIR --unset
>> +  Example: tarantoolctl rocks config variables.OPENSSL_DIR --unset
>>   
>>   * When given no arguments, it prints the entire currently active
>>     configuration, resulting from reading the config files from
>>     all scopes.
>>   
>> -  Example: luarocks config
>> +  Example: tarantoolctl rocks config
>>   
>>   OPTIONS
>>   --scope=<scope>   The scope indicates which config file should be rewritten.
>>                     Accepted values are "system", "user" or "project".
>> -                  * Using a wrapper created with `luarocks init`,
>> +                  * Using a wrapper created with `tarantoolctl rocks init`,
>>                       the default is "project".
>>                     * Using --local (or when `local_by_default` is `true`),
>>                       the default is "user".
>> diff --git a/src/luarocks/cmd/help.lua b/src/luarocks/cmd/help.lua
>> index dcc9e35..689fd2d 100644
>> --- a/src/luarocks/cmd/help.lua
>> +++ b/src/luarocks/cmd/help.lua
>> @@ -10,7 +10,7 @@ local util = require("luarocks.util")
>>   local cfg = require("luarocks.core.cfg")
>>   local dir = require("luarocks.dir")
>>   
>> -local program = util.this_program("luarocks")
>> +local program = util.this_program("luarocks") .. " rocks"
> 
> 1. So under some circumstances it is possible to get help in
> form of 'luarocks rocks' instead of 'tarantoolctl rocks'?
'luarocks rocks'? In my mind - No.
> 
> Why does this util.this_program() even take any parameters? Can
> it just return 'tarantoolctl' constantly?
Because it can be "tarantoolctl", "./tarantoolctl" or something else.
> 
>>   help.help_summary = "Help on commands. Type '"..program.." help <command>' for more."
>>   
>> @@ -20,7 +20,8 @@ help.help = [[
>>   ]]
>>   
>>   local function print_banner()
>> -   util.printout("\nLuaRocks "..cfg.program_version..", the Lua package manager")
>> +   util.printout("\nTarantoolctl rocks, the Lua package manager"
>> +                 .. " based on LuaRocks " .. cfg.program_version)
>>   end
>>   
>>   local function print_section(section)
>> @@ -62,12 +63,7 @@ function help.command(description, commands, command)
>>   	                       (overrides any entries in the config file)
>>   	--only-sources=<url>   Restrict downloads to paths matching the
>>   	                       given URL.
>> -        --lua-dir=<prefix>     Which Lua installation to use.
>> -	--lua-version=<ver>    Which Lua version to use.
>>   	--tree=<tree>          Which tree to operate on.
>> -	--local                Use the tree in the user's home directory.
>> -	                       To enable it, see ']]..program..[[ help path'.
>> -	--global               Use the system tree when `local_by_default` is `true`.
> 
> 2. I am sure these removals should happen in the previous commit.
Moved
> 
>>   	--verbose              Display verbose output of commands executed.
>>   	--timeout=<seconds>    Timeout on network operations, in seconds.
>>   	                       0 means no timeout (wait forever).
>> diff --git a/src/luarocks/cmd/make.lua b/src/luarocks/cmd/make.lua
>> index 025ac11..dc70d49 100644
>> --- a/src/luarocks/cmd/make.lua
>> +++ b/src/luarocks/cmd/make.lua
>> @@ -32,8 +32,8 @@ This command is useful as a tool for debugging rockspecs.
>>   To install rocks, you'll normally want to use the "install" and
>>   "build" commands. See the help on those for details.
>>   
>> -NB: Use `luarocks install` with the `--only-deps` flag if you want to install
>> -only dependencies of the rockspec (see `luarocks help install`).
>> +NB: Use `tarantoolctl rocks install` with the `--only-deps` flag if you want to install
>> +only dependencies of the rockspec (see `tarantoolctl rocks help install`).
>>   
>>   --pack-binary-rock  Do not install rock. Instead, produce a .rock file
>>                       with the contents of compilation in the current
>> diff --git a/src/luarocks/cmd/new_version.lua b/src/luarocks/cmd/new_version.lua
>> index f1181d4..e0ce760 100644
>> --- a/src/luarocks/cmd/new_version.lua
>> +++ b/src/luarocks/cmd/new_version.lua
>> @@ -18,7 +18,7 @@ from a previous one.
>>   
>>   If a package name is given, it downloads the latest rockspec from the
>>   default server. If a rockspec is given, it uses it instead. If no argument
>> -is given, it looks for a rockspec same way 'luarocks make' does.
>> +is given, it looks for a rockspec same way 'tarantoolctl rocks make' does.
>>   
>>   If the version number is not given and tag is passed using --tag,
>>   it is used as the version, with 'v' removed from beginning.
>> diff --git a/src/luarocks/cmd/purge.lua b/src/luarocks/cmd/purge.lua
>> index 98b76a0..31b09e3 100644
>> --- a/src/luarocks/cmd/purge.lua
>> +++ b/src/luarocks/cmd/purge.lua
>> @@ -21,7 +21,7 @@ purge.help = [[
>>   This command removes rocks en masse from a given tree.
>>   By default, it removes all rocks from a tree.
>>   
>> -The --tree argument is mandatory: luarocks purge does not
>> +The --tree argument is mandatory: tarantoolctl rocks purge does not
>>   assume a default tree.
>>   
>>   --old-versions  Keep the highest-numbered version of each
> 
> 3. If this commmit is indended to fully replace luarocks with tarantoolctl
> in all comments and help texts, then it does not finish this task. I grepped
> 'luarocks' and still see tons of places where luarocks is mentioned.
I want to change luarocks to tarantoolctl rocks only where it used as 
program name in helps and stay luaroks where it used as a module name.
> 

  reply	other threads:[~2020-04-05 15:15 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-25 21:50 [Tarantool-patches] [PATCH 0/3] Adapt luarocks for tarantoolctl Leonid Vasiliev
2020-03-25 21:50 ` [Tarantool-patches] [PATCH 1/3] Add the chdir option for make Leonid Vasiliev
2020-04-02  9:58   ` lvasiliev
2020-04-04 19:02   ` Vladislav Shpilevoy
2020-04-05 15:03     ` lvasiliev
2020-03-25 21:50 ` [Tarantool-patches] [PATCH 2/3] Add a black list of the tarantoolctl options Leonid Vasiliev
2020-04-04 19:02   ` Vladislav Shpilevoy
2020-04-05 15:11     ` lvasiliev
2020-04-05 18:39       ` Vladislav Shpilevoy
2020-03-25 21:50 ` [Tarantool-patches] [PATCH 3/3] Adapt luarocks help for the tarantoolctl Leonid Vasiliev
2020-04-04 19:02   ` Vladislav Shpilevoy
2020-04-05 15:15     ` lvasiliev [this message]
2020-04-05 18:39       ` Vladislav Shpilevoy

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=8777b0df-f2b8-3fc5-2d9b-1d0faf66ce78@tarantool.org \
    --to=lvasiliev@tarantool.org \
    --cc=tarantool-patches@dev.tarantool.org \
    --cc=v.shpilevoy@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH 3/3] Adapt luarocks help for the tarantoolctl' \
    /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