aboutsummaryrefslogtreecommitdiff
path: root/lua/cmake/fileapi.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua/cmake/fileapi.lua')
-rw-r--r--lua/cmake/fileapi.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/lua/cmake/fileapi.lua b/lua/cmake/fileapi.lua
index 2f61677..47a7459 100644
--- a/lua/cmake/fileapi.lua
+++ b/lua/cmake/fileapi.lua
@@ -47,6 +47,8 @@ function FileApi.read_reply(path, callback)
if object.kind == "codemodel" then
utils.read_file(Path:new(reply_dir, object.jsonFile):absolute(), function(codemodel_data)
local codemodel = vim.json.decode(codemodel_data)
+ --FIX: this loop does not read all files if codemodel contains many targets. This is because libuv (or some external settings) forbids to open files
+ -- in async mode more than some limit number. Seems like the solution is to queue these calls and limit max number for opened files per time
for _, target in ipairs(codemodel.configurations[1].targets) do
utils.read_file(
Path:new(reply_dir, target.jsonFile):absolute(),