[Epic] disable Lua REPL by default
Nobody has claimed this yet.
- Dominant language
- CSS
- Stars
- 15
- Forks
- 49
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 3
Description
Related dev. issue(s): part of https://github.com/tarantool/tarantool/issues/8613
Product: Tarantool
Since: 3.0
Root document: see the affected topics below
SME: @ igormunkin
Details
Previously Tarantool binary entered interactive mode starting Lua REPL
by default. As a result of the patch Tarantool binary yields the message
with usage and doesn't run Lua interpreter.
Requested by @ igormunkin in https://github.com/tarantool/tarantool/commit/255b6ca766e706a0b848e239a6bec617f7ff1572.
Example:
% tarantool -i
Tarantool 3.0.0-entrypoint-582-g3774e85d2
type 'help' for interactive help
tarantool>
How to find affected topics
This change affects many topics in Tarantool docs. To find these topics:
- Find all topics containing the 'interactive mode' phrase.
- Check all code snippets that contain the
tarantool>prompt. As a rule, these code snippets are code blocks with thetarantoolsessiontype. There are two approaches for updating topics containing these code snippets:- Add a note that interactive mode can be enabled using the
-icommand-line option. This approach is mostly applicable to Getting started guides and tutorials as interactive sessions are useful in this case. - Update
tarantoolsessioncode blocks tolua. Where necessary, simulate the interactive mode's output using multiline comments for better visibility. See the Checks module examples. This approach is applicable to API references (including CRUD operations).
- Add a note that interactive mode can be enabled using the
- Check all runs of Tarantool instances using the
$ tarantool ...command (for example,$ tarantool my_app.lua). As a rule, these snippets useconsolecode block type. Running a script with the-iflag works the same way as if the script containsrequire('console').start()at the end. - Check all samples where the
tarantoolshebang is used (#!/usr/bin/env tarantool). To run such scripts, in 3.0, it should contain the-iflag:#!/usr/bin/env tarantool -i. In this case, the script can be run in the interactive mode (./my_app.lua).
Affected topics: show how to enable the interactive mode
Here are some of the affected topics where we should mention how to enable the interactive mode:
Interactive console:
Get started:
- https://www.tarantool.io/en/doc/latest/how-to/getting_started_db/#attaching-to-tarantool
- https://www.tarantool.io/en/doc/latest/how-to/getting_started_db/#starting-tarantool
- https://www.tarantool.io/en/doc/latest/how-to/getting_started_db/#connecting-remotely
How-tos:
- https://www.tarantool.io/en/doc/latest/how-to/db/crud/
- https://www.tarantool.io/en/doc/latest/how-to/getting_started_net_box/
- https://www.tarantool.io/en/doc/latest/how-to/app/lua_tutorials/
How-tos (replication):
- https://www.tarantool.io/en/doc/latest/how-to/replication/repl_bootstrap/
- https://www.tarantool.io/en/doc/latest/how-to/replication/repl_add_instances/
- https://www.tarantool.io/en/doc/latest/how-to/replication/repl_remove_instances/
- https://www.tarantool.io/en/doc/latest/how-to/replication/repl_sync/
- https://www.tarantool.io/en/doc/latest/how-to/replication/repl_leader_elect/
All topics from the Administration section:
- https://www.tarantool.io/en/doc/latest/book/admin/modules/
- https://www.tarantool.io/en/doc/latest/book/admin/replication/repl_monitoring/
- ... and so on
Configuration:
Vshard:
- https://www.tarantool.io/en/doc/latest/reference/reference_rock/vshard/vshard_router/
- https://www.tarantool.io/en/doc/latest/reference/reference_rock/vshard/vshard_storage/
Misc:
- https://www.tarantool.io/en/doc/latest/reference/reference_rock/dbms/
- https://www.tarantool.io/en/doc/latest/reference/lua_tips/
- https://www.tarantool.io/en/doc/latest/dev_guide/building_from_source/#verify-your-tarantool-installation
- https://www.tarantool.io/en/doc/latest/how-to/app/cookbook/#console-start-lua
Affected topics: convert to Lua snippets
Here are some of the affected topics whose examples can be converted to Lua snippets:
- https://www.tarantool.io/en/doc/latest/how-to/app/c_tutorial/#easy-c
- https://www.tarantool.io/en/doc/latest/concepts/data_model/value_store/
- https://www.tarantool.io/en/doc/latest/concepts/data_model/indexes/
- https://www.tarantool.io/en/doc/latest/concepts/data_model/operations/
- https://www.tarantool.io/en/doc/latest/concepts/coop_multitasking/#example-2
- https://www.tarantool.io/en/doc/latest/concepts/replication/repl_architecture/#replica-set-and-instance-uuids
- https://www.tarantool.io/en/doc/latest/reference/reference_lua/box_schema/space_create/
- https://www.tarantool.io/en/doc/latest/reference/reference_lua/box_space/auto_increment/
- ... and other API reference topics
- ...
- Tarantool EE (read views, audit log, tuple compression, developer’s guide (contains
$ tarantool))
Contributing
- https://www.tarantool.io/en/doc/latest/contributing/docs/api/#examples-and-templates: here we can clarify when to use interactive session and when to use Lua samples.
It's impossible to update all the samples in API docs at once, so, we can fix the most important ones and work on other docs gradually when fixing tech debt issues.
See also
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by searching the documentation for “interactive mode”, the tarantool> prompt, tarantoolsession blocks, console blocks, and #!/usr/bin/env tarantool. Review the listed interactive console, getting-started, how-to, administration, reference, and API topics, then update examples to explain -i or use Lua snippets as appropriate. Done means affected examples no longer assume interactive mode is enabled by default.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua
- Domain
- cli, documentation
- Issue type
- Documentation
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100