tarantool / tarantool/doc

[Epic] disable Lua REPL by default

Open
#3,531 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

3.0 config epic
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 the tarantoolsession type. There are two approaches for updating topics containing these code snippets:
    • Add a note that interactive mode can be enabled using the -i command-line option. This approach is mostly applicable to Getting started guides and tutorials as interactive sessions are useful in this case.
    • Update tarantoolsession code blocks to lua. 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).
  • Check all runs of Tarantool instances using the $ tarantool ... command (for example, $ tarantool my_app.lua). As a rule, these snippets use console code block type. Running a script with the -i flag works the same way as if the script contains require('console').start() at the end.
  • Check all samples where the tarantool shebang is used (#!/usr/bin/env tarantool). To run such scripts, in 3.0, it should contain the -i flag: #!/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:

How-tos:

How-tos (replication):

All topics from the Administration section:

Configuration:

Vshard:

Misc:

Affected topics: convert to Lua snippets

Here are some of the affected topics whose examples can be converted to Lua snippets:

Contributing

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.