Closed prochri closed 3 months ago
Ah no that is not intended behaviour :sweat_smile: I've pushed a fix and it should be working as you'd expect now
Hmm, started seeing an exception Future already set
thrown from neotest that seems related.
Agree, I'm facing it too
Error executing vim.schedule lua callback: ...nvim/site/pack/packer/start/nvim-nio/lua/nio/control.lua:133: Future already set
stack traceback:
[C]: in function 'error'
...nvim/site/pack/packer/start/nvim-nio/lua/nio/control.lua:133: in function 'set_error'
...e/nvim/site/pack/packer/start/nvim-nio/lua/nio/tasks.lua:93: in function 'close_task'
...e/nvim/site/pack/packer/start/nvim-nio/lua/nio/tasks.lua:111: in function 'cb'
...e/nvim/site/pack/packer/start/nvim-nio/lua/nio/tasks.lua:185: in function ''
vim/_editor.lua: in function ''
vim/_editor.lua: in function <vim/_editor.lua:0>
Press ENTER or type command to continue
I'm not seeing the same issue myself but I've pushed a change that I think should fix it. If not, could someone provide a simple reproduction if possible?
I have just checked, bug is still here. To reproduce open any test (in my case it is an Elixir test) , start watcher and after test finishes and marks are set this error message appears.
Ah yes I was able to reproduce with that thank you. I've pushed another fix which should now address the issue
fixed problem with "Future already set" for me https://github.com/nvim-neotest/neotest/issues/402
Looks like fixed! Thanks!
I am trying to close a (potentially long running) process, if it's task is cancelled for some reason (e.g. timeout). Here is a minimal example without processes:
My expectation would be, that after 1 second, both 'cancel the handle!' and 'canceled or success' (caused by the task cancellation) would be printed. However, the callback function is only called after the full 5 seconds.
Is this the intended behavior? If yes, what would be the proper way to do this?