Closed matebeulm closed 2 years ago
Can't reproduce, the following commands works for me:
Task start cmake configure
Task start cmake build
Task set_module_param cmake target
Task start cmake run
That works for me, too It is :Task start cmake run that causes the error
------ Original Message ------ From "Hennadii Chernyshchyk" @.> To "Shatur/neovim-tasks" @.> Cc "Matthias Eberhardt" @.>; "Author" @.> Date 2022-10-26 00:29:13 Subject Re: [Shatur/neovim-tasks] error running cmake run (Issue #2)
Can't reproduce, the command :Task start cmake configure configures project successfully.
— Reply to this email directly, view it on GitHub https://github.com/Shatur/neovim-tasks/issues/2#issuecomment-1291208849, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABJ42NPM72MXGEYG3SULEGTWFBNLTANCNFSM6AAAAAAROKMJWU. You are receiving this because you authored the thread.Message ID: @.***>
Can't reproduce on my machine. Maybe other plugins are causing this?
The issues happens when you forget Task set_module_param cmake target
(no target set in neovim.json) before running/debugging.
Tried the following on a new project without settings but no such error:
:Task start cmake configure
:Task start cmake run
it says No selected target, please set "target" parameter
, but it's expected.
Interesting I get the error https://asciinema.org/a/krw39Xl33dfLUX8oISlMXKLFg
Maybe it is related to the neovim version? Tried with 0.8.1 and the latest master.
I also have 0.8.1 on ArchLinux. What OS are you using?
Arch Linux everything up to date.
Hm... Are you sure that you using the latest version of https://github.com/rcarriga/nvim-notify? It looks like this plugin is causing the error judging by the log.
I wasn't using this plugin at all. Installing it fixed the issue => see the expected error message in a message box. So the default vim.notify causes the problem?
It looks like it is! I think we should try use vim.schedule_wrap
here:
https://github.com/Shatur/neovim-tasks/blob/75a548c7a16d84548ad71ec2d25ddffe973f5a1e/lua/tasks/runner.lua#L168
Could you try it and send a PR if it works? I currently at work.
Thanks for your effort with this new plugin. I tried to use it instead of neovim-cmake. But while I can execute the cmake configure and cmake build tasks, I get an error when I execute the run task:
Task start cmake run
The error I get in neovim 0.8 is:
Error executing luv callback: vim/_editor.lua:0: E5560: nvim_err_writeln must not be called in a lua loop callback stack traceback: [C]: in function 'nvim_err_writeln' vim/_editor.lua: in function 'notify' .../site/pack/packer/start/neovim-tasks/lua/tasks/utils.lua:10: in function 'notify' ...ack/packer/start/neovim-tasks/lua/tasks/module/cmake.lua:180: in function 'command' ...site/pack/packer/start/neovim-tasks/lua/tasks/runner.lua:101: in function 'chain_commands' ...site/pack/packer/start/neovim-tasks/lua/tasks/runner.lua:168: in function 'fn' ...im/site/pack/packer/opt/plenary.nvim/lua/plenary/job.lua:594: in function 'v' ...im/site/pack/packer/opt/plenary.nvim/lua/plenary/job.lua:244: in function '_shutdown' ...im/site/pack/packer/opt/plenary.nvim/lua/plenary/job.lua:46: in function <...im/site/pack/p acker/opt/plenary.nvim/lua/plenary/job.lua:37> [C]: in function 'nvim_command' ...site/pack/packer/start/neovim-tasks/lua/tasks/runner.lua:146: in function '' vim/_editor.lua: in function <vim/_editor.lua:0>
Here is the project to reproduce. It works perfectly fine with the old cmake plugin.
CMakeLists.txt
main.cpp