Skip to content

Support tarantool #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Nov 21, 2022
Merged

Support tarantool #1

merged 7 commits into from
Nov 21, 2022

Conversation

usenko-timur
Copy link
Collaborator

No description provided.

@usenko-timur usenko-timur self-assigned this Aug 4, 2022
Copy link

@tsafin tsafin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

За исключением пары замечаний про хардкод констант (которые не блокирующие, и можно вернуться к этому позже) всё остальное LGTM.

У нас есть возможность отлаживать встроенные модули в Тарантуле. Woohoo!

@usenko-timur usenko-timur force-pushed the tarantool-support branch 2 times, most recently from 792dc4a to bee7a0e Compare August 5, 2022 18:21
tsafin and others added 2 commits November 10, 2022 00:09
- Conditional call to tarantool.debug.getsources() (to make it work
  with unpatched tarantool executables also);
Conditional tarantool.debug.getsources() usage
README.md Outdated

!["lua-local.interpreter": "lua5.1"](resources/settings.png '"lua-local.interpreter": "lua5.1"')
### Tarantool Lua Stand-Alone Interpreter
To debug a Lua program using a stand-alone interpreter, set `lua-tarantool.interpreter` in your user or workspace settings.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. I assume we now should refer to lua-tarantool.tarantool parameter here;
  2. I'd rephrase it slightly (t omake it more Tarantool specific), e.g:

"To debug a Lua program using particular Tarantool executable, set lua-tarantool.tarantool in your user or workspace settings."

```lua
require("lldebugger").start()
```
Note that the path to `lldebugger` will automatically be appended to the `LUA_PATH` environment variable, so it can be found by Lua.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd keep this information elsewhere (at the end of standard configuration part?):
"Note that the path to lldebugger will automatically be appended to the LUA_PATH environment variable, so it can be found by Lua."

@@ -213,7 +213,7 @@ export class LuaDebugSession extends LoggingDebugSession {
env: Object.assign({}, process.env),
cwd,
shell: true,
detached: process.platform !== "win32"
detached: true,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd also cleanup usage of detached as it's always true now.

: "";
const processArgs: string[] = [
"-e",
"\"require 'strict'.off()\"",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Soon after our discussion I've realized that we do not need to mess with strict mode at all (even under debugging), as we do not use any global variable anymore (as it used to be before), but rather simple require "tarantool".debug which is perfectly compatible with strict mode.

i.e. those 2 lines adding call to "require 'strict'.off()" are not needed.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like we do need to have it enabled as there is rawlen used

package.json Outdated
@@ -20,9 +20,6 @@
"tstl",
"typescripttolua",
"typescript-to-lua",
"love",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:)

Copy link

@tsafin tsafin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Almost there (with a few documentation changes, and single, small code tweek)

@usenko-timur usenko-timur merged commit 63189c6 into master Nov 21, 2022
@usenko-timur usenko-timur deleted the tarantool-support branch November 21, 2022 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants