tarantool / tarantool/tarantool

Change console output format for zero ret values

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

Nobody has claimed this yet.

console discussion feature lua
Dominant language
Lua
Stars
3.7k
Forks
419
Avg merge
1d 23h
Merged PRs (30d)
88

Description

Tarantool prints result of expression as yaml array in case ret_arg_cnt > 0:

tarantool> 1
---
- 1
...

tarantool> 1, 2
---
- 1
- 2
...

However for ret_arg_cnt == 0 it returns hardcoded value:

tarantool> 
---
...

Which is encoded as null according to yaml spec.

There are two proposals to make the output more consistent:

  1. Return an empty array:
--- []
...
  1. Return blank string.

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

The issue does not name implementation files or tests; start by locating the console output path that handles ret_arg_cnt == 0 and compare it with the existing array output. Resolve which proposed representation is intended, then add coverage confirming the selected zero-return format.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua
Domain
cli
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.