diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-01-18 21:30:24 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-01-18 21:30:24 +0800 |
commit | a3900e86ccf6163db4f34d7b99b85bb883a6ae5f (patch) | |
tree | 1573ef5d1dcdc0296984932c2457727a75f9b316 | |
parent | 140dc03da4d8edb97a61e5ef45e92d391420fc39 (diff) | |
download | lua-language-server-a3900e86ccf6163db4f34d7b99b85bb883a6ae5f.zip |
add logs
-rw-r--r-- | script/library.lua | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/script/library.lua b/script/library.lua index 32eaea8e..45267b37 100644 --- a/script/library.lua +++ b/script/library.lua @@ -218,6 +218,7 @@ local function initBuiltIn(uri) end if scp:get('metaPath') == metaPath:string() then + log.info('Has meta path, skip:', metaPath:string()) return end scp:set('metaPath', metaPath:string()) @@ -227,12 +228,14 @@ local function initBuiltIn(uri) end end, log.error) if not suc then + log.info('Init builtin failed.') return end local out = fsu.dummyFS() local templateDir = ROOT / 'meta' / 'template' for libName, status in pairs(define.BuiltIn) do status = config.get(uri, 'Lua.runtime.builtin')[libName] or status + log.info('Builtin status:', libName, status) if status == 'disable' then goto CONTINUE end @@ -247,7 +250,10 @@ local function initBuiltIn(uri) end ::CONTINUE:: end - fsu.fileSync(out, metaPath) + local result = fsu.fileSync(out, metaPath) + if #result.err > 0 then + log.warn('File sync error:', util.dump(result)) + end end local function loadSingle3rdConfig(libraryDir) |