Skip to content
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

Can we test the plugin in CI? #20

Open
anton-trunov opened this issue Apr 4, 2024 · 6 comments
Open

Can we test the plugin in CI? #20

anton-trunov opened this issue Apr 4, 2024 · 6 comments
Labels
discussion Further information is requested

Comments

@anton-trunov
Copy link
Member

A basic test would be to install everything, including Tact and tact.vim and run some command(s) on a sample contract to make sure we have reproducible installation instructions for Linux/Windows/macOS.

And maybe some other tests for plugin functionality would be be great to have.

@anton-trunov anton-trunov added the discussion Further information is requested label Apr 4, 2024
@anton-trunov
Copy link
Member Author

Perhaps we could also test auto-completion, so that issues like #18 once resolved never appear again

@novusnota
Copy link
Member

I think yes, we can even test auto-completion by envoking vim in headless mode and jumping around the file, while evaluating the "backend" of auto-completion (giant tact#Complete() function from autoload/tact.vim).

From the top of my head I see adding a let g:tact_debug flag check, then if it's set — outputting all the errors in logs and then grepping the logs for errors & such. Maybe, Vim's internal error output can be redirected too, didn't look into that yet.

Great idea, though!

@novusnota
Copy link
Member

Oh, and also — please enable Actions tab in the settings of this repo, otherwise we'll only be able to test locally (which is also nice, but incomplete).

@anton-trunov
Copy link
Member Author

enable Actions tab in the settings of this repo

done

@anton-trunov
Copy link
Member Author

and then grepping the logs for errors & such

Does Vim have some sort of (stable) API that we can use for this task? Grepping makes it brittle

@novusnota
Copy link
Member

and then grepping the logs for errors & such

Does Vim have some sort of (stable) API that we can use for this task? Grepping makes it brittle

I'll look into it more, but I just meant to make a special log file and manually log stuff there in the background upon getting any kind of try-catch-ish error (caught by me), because throughout the code nearly all places are covered in sending various error messages.

It's just that sometimes those errors don't bubble up (#15), so I though it would be nice to log them in the background into some file when a special flag is given, and later inspect

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants