You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 10, 2022. It is now read-only.
Bug description
CMake select_target fails with error:
E5108: Error executing lua ...site/pack/packer/start/plenary.nvim/lua/plenary/path.lua:699: ENOENT: no such file or directory:
stack traceback:
[C]: in function 'assert'
...site/pack/packer/start/plenary.nvim/lua/plenary/path.lua:699: in function 'read'
...ack/packer/opt/neovim-cmake/lua/cmake/project_config.lua:71: in function 'get_codemodel_targets'
...vim/site/pack/packer/opt/neovim-cmake/lua/cmake/init.lua:201: in function 'command_func'
...site/pack/packer/opt/neovim-cmake/lua/cmake/commands.lua:25: in function 'run_command'
[string ":lua"]:1: in main chunk
Additional context
I tried to debug it myself and got to this:
If I change function ProjectConfig:get_codemodel_targets to this
function ProjectConfig:get_codemodel_targets()
local reply_dir = self:get_reply_dir().filename
local codemodel_vim = vim.fn.globpath(reply_dir, 'codemodel*')
local codemodel = Path:new(codemodel_vim)
utils.notify('reply_dir = ' .. reply_dir)
utils.notify('codemodel = ' .. codemodel.filename)
local codemodel_json = vim.fn.json_decode(codemodel:read())
return codemodel_json['configurations'][1]['targets']
end
I get this in :Notifications
2022-01-21T18:12:21 CMake INFO reply_dir = /home/arcashka/projects/test2/build/linux-debug/.cmake/api/v1/reply
2022-01-21T18:12:21 CMake INFO codemodel =
This folder exists. And there is a file codemodel-v2-750e6d2bc098a122e68e.json. So I don't understand why vim.fn.globpath returns empty value. I'm totally new to lua too, so I can't make a progress with debug.
The text was updated successfully, but these errors were encountered:
Bug description
CMake select_target fails with error:
Steps to reproduce
I use default neovim-cmake settings.
Steps:
Expected behavior
Target selection works
Environment
86c74676f73096d5d979a524d832d74c243de15c
Additional context
I tried to debug it myself and got to this:
If I change function
ProjectConfig:get_codemodel_targets
to thisI get this in
:Notifications
This folder exists. And there is a file
codemodel-v2-750e6d2bc098a122e68e.json
. So I don't understand whyvim.fn.globpath
returns empty value. I'm totally new to lua too, so I can't make a progress with debug.The text was updated successfully, but these errors were encountered: