tact-lang / tact-vscode

Tact VS Code plugin
Apache License 2.0
14 stars 7 forks source link

Proposal: Interactivity akin to Nujan IDE #31

Open novusnota opened 3 months ago

novusnota commented 3 months ago

Context

It's often nice to quickly check the outputs, possible errors, boundaries or gas usage of Tact code without writing lots of Jest tests, which slow down the speed of such exploration (IMO). There, https://ide.nujan.io provides a nice experience — contract receivers and get-methods are readily available to interact with, see:

image

Proposal

OR

Suggested solution ideas

We may use @tact-lang/compiler API or tact-lang/tree-sitter-tact to quickly parse necessary parts of the file, then make tiny test wrappers for each to call using Jest & individual test names.

anton-trunov commented 3 months ago

Exploratory programming is indeed a really nice technique! I love it myself, e.g. all kinds of REPLs and tools like that and would very much like it to be integrated with the Tact VS Code plugin.

novusnota commented 3 months ago

@anton-trunov Yes! REPL is the ultimate thing I was looking for — this proposal can be simplified to just allow the internal LSP of this VSCode plugin semi-arbitrary code execution of given parts of code (get-methods, receivers, etc.) as if Tact is a LISP!

And this can be done using the same suggested ideas, via tree-sitter+Jest combo or @tact-lang/compiler+Jest combo.

UPD: added this as an alternative to making some special button panel, like in Nujan.