• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

tarantool / tarantool / 9082246470
88%

Build:
DEFAULT BRANCH: master
Ran 14 May 2024 03:51PM UTC
Jobs 1
Files 513
Run time 2min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

14 May 2024 03:41PM UTC coverage: 87.104% (+0.02%) from 87.086%
9082246470

push

github

Totktonada
console: create per-session variables scope

Fixes #9985

@TarantoolBot document
Title: Interactive console now has its own per-session variables scope

It is counter-intuitive that all the non-local assignments in the
console affect globals and may interfere with application's logic.

It is also counter-intuitive that the non-local assignments are shared
between different console sessions.

Now, each console session has its own variables scope and the non-local
assignments use it instead of globals.

Let's consider examples of the new behavior.

Example 1. A console session has a variable scope that is separate from
globals.

```lua
console_1> _G.x = 1
console_1> x = 2

console_1> _G.x
---
- 1
...
console_1> x
---
- 2
...
```

Note: A global variable is still accessible using `_G` even if the same
named session scope variable exists.

Example 2. A global variable is read if there is no session local
variable.

```lua
console_1> _G.x = 1
console_1> x
---
- 1
...
```

Example 3. Different console sessions have separate variable scopes.

```lua
console_1> x = 1
console_2> x = 2

console_1> x
---
- 1
...
console_2> x
---
- 2
...
```

The new behavior is enabled using the `console_session_scope_vars`
compat option. The option is `old` by default in Tarantool 3.X, `new` by
default in 4.X. The `old` behavior is to be removed in 5.X.

Please, create the following page:
https://tarantool.io/compat/console_session_scope_vars

Please, add the new compat option into the configuration reference.

67452 of 119853 branches covered (56.28%)

100157 of 114986 relevant lines covered (87.1%)

2423111.45 hits per line

Jobs
ID Job ID Ran Files Coverage
1 9082246470.1 14 May 2024 03:51PM UTC 0
87.1
GitHub Action Run
Source Files on build 9082246470
Detailed source file information is not available for this build.
  • Back to Repo
  • d36493c0 on github
  • Prev Build on master (#9078779772)
  • Next Build on master (#9108575972)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc