Closed natpuncher closed 1 week ago
Hi,
If you use zig zig/master
then use neotest-zig/main
If you use zig/0.13.0
then use neotest-zig/1.3.0
Let me know if this doesn't work with the respective tagged version
I changed commit in lazy-lock.json file to the last release db005bb...
hash and when I start tests or open tests window I got this errors.
Error 10:56:16 msg_show.lua_error Error executing vim.schedule lua callback: .local/share/nvim/lazy/nvim-nio/lua/nio/tasks.lua:100: Async task failed without callback: The coroutine failed with this message:
...0.10.2_1/share/nvim/runtime/lua/vim/treesitter/query.lua:252: Query error at 2:3. Invalid node type "TestDecl":
(TestDecl
^
stack traceback:
[C]: in function '_ts_parse_query'
...0.10.2_1/share/nvim/runtime/lua/vim/treesitter/query.lua:252: in function 'fn'
...im/0.10.2_1/share/nvim/runtime/lua/vim/func/_memoize.lua:58: in function 'parse_query'
...re/nvim/lazy/neotest/lua/neotest/lib/treesitter/init.lua:104: in function 'normalise_query'
...re/nvim/lazy/neotest/lua/neotest/lib/treesitter/init.lua:161: in function 'parse_positions_from_string'
...cal/share/nvim/lazy/neotest-zig/lua/neotest-zig/init.lua:136: in function '_does_file_contain_tests'
...cal/share/nvim/lazy/neotest-zig/lua/neotest-zig/init.lua:108: in function 'is_test_file'
...ocal/share/nvim/lazy/neotest/lua/neotest/client/init.lua:346: in function 'get_adapter'
...ocal/share/nvim/lazy/neotest/lua/neotest/client/init.lua:356: in function '_set_focused_file'
...ocal/share/nvim/lazy/neotest/lua/neotest/client/init.lua:508: in function '_start'
...ocal/share/nvim/lazy/neotest/lua/neotest/client/init.lua:186: in function '_ensure_started'
...ocal/share/nvim/lazy/neotest/lua/neotest/client/init.lua:198: in function <...ocal/share/nvim/lazy/neotest/lua/neotest/client/init.lua:197>
...al/share/nvim/lazy/neotest/lua/neotest/consumers/run.lua:39: in function 'get_tree_from_args'
...al/share/nvim/lazy/neotest/lua/neotest/consumers/run.lua:80: in function 'func'
.local/share/nvim/lazy/nvim-nio/lua/nio/tasks.lua:173: in function <.local/share/nvim/lazy/nvim-nio/lua/nio/tasks.lua:172>
stack traceback:
[C]: in function 'error'
.local/share/nvim/lazy/nvim-nio/lua/nio/tasks.lua:100: in function 'close_task'
.local/share/nvim/lazy/nvim-nio/lua/nio/tasks.lua:122: in function 'cb'
.local/share/nvim/lazy/nvim-nio/lua/nio/tasks.lua:188: in function <.local/share/nvim/lazy/nvim-nio/lua/nio/tasks.lua:187>
Error 10:56:16 msg_show.lua_error Error executing vim.schedule lua callback: .local/share/nvim/lazy/nvim-nio/lua/nio/tasks.lua:100: Async task failed without callback: The coroutine failed with this message:
...0.10.2_1/share/nvim/runtime/lua/vim/treesitter/query.lua:252: Query error at 2:3. Invalid node type "TestDecl":
(TestDecl
^
stack traceback:
[C]: in function '_ts_parse_query'
...0.10.2_1/share/nvim/runtime/lua/vim/treesitter/query.lua:252: in function 'fn'
...im/0.10.2_1/share/nvim/runtime/lua/vim/func/_memoize.lua:58: in function 'parse_query'
...re/nvim/lazy/neotest/lua/neotest/lib/treesitter/init.lua:104: in function 'normalise_query'
...re/nvim/lazy/neotest/lua/neotest/lib/treesitter/init.lua:161: in function 'parse_positions_from_string'
...cal/share/nvim/lazy/neotest-zig/lua/neotest-zig/init.lua:136: in function '_does_file_contain_tests'
...cal/share/nvim/lazy/neotest-zig/lua/neotest-zig/init.lua:108: in function 'is_test_file'
...ocal/share/nvim/lazy/neotest/lua/neotest/client/init.lua:346: in function '_get_adapter'
...ocal/share/nvim/lazy/neotest/lua/neotest/client/init.lua:203: in function 'get_position'
...ocal/share/nvim/lazy/neotest/lua/neotest/client/init.lua:150: in function 'get_nearest'
...ocal/share/nvim/lazy/neotest/lua/neotest/client/init.lua:496: in function <...ocal/share/nvim/lazy/neotest/lua/neotest/client/init.lua:495>
stack traceback:
[C]: in function 'error'
.local/share/nvim/lazy/nvim-nio/lua/nio/tasks.lua:100: in function 'close_task'
.local/share/nvim/lazy/nvim-nio/lua/nio/tasks.lua:122: in function 'cb'
.local/share/nvim/lazy/nvim-nio/lua/nio/tasks.lua:188: in function <.local/share/nvim/lazy/nvim-nio/lua/nio/tasks.lua:187>
I see, you are using the newer version of tree sitter, this was fixed in main
here #32 but was never ported into 1.3.0
.
I cherry-picked the fix and released tag 1.3.1
, try it out and let know if that solves the issue!
Btw, if you are using Lazy, you can set the tag like this instead of modifying the lazy-lock.json
file:
{ "lawrence-laz/neotest-zig", tag = '1.3.1' },
It is working! thanks a lot!
Hi there. It would be great to use this test-runner with master version 0.13.0 of zig. I've tried, but got this error and all my tests marked as failed.
Thanks in advance.