From 38beb846ea216dbca75174692f142fb215d9f896 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Wed, 19 Jul 2023 15:54:14 +0800 Subject: remove fixed code see http://www.lua.org/bugs.html#5.4.4-7 --- script/workspace/workspace.lua | 2 -- 1 file changed, 2 deletions(-) (limited to 'script/workspace/workspace.lua') diff --git a/script/workspace/workspace.lua b/script/workspace/workspace.lua index 3e85e0fc..a55e6246 100644 --- a/script/workspace/workspace.lua +++ b/script/workspace/workspace.lua @@ -471,8 +471,6 @@ function m.flushFiles(scp) end collectgarbage() collectgarbage() - -- TODO: wait maillist - collectgarbage 'restart' end ---@param scp scope -- cgit v1.2.3 From 83aa702b33d5dd66e35ddb6883cd8d7417b5f83b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Wed, 19 Jul 2023 16:14:06 +0800 Subject: speed up tests --- script/workspace/workspace.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'script/workspace/workspace.lua') diff --git a/script/workspace/workspace.lua b/script/workspace/workspace.lua index a55e6246..da2f9daf 100644 --- a/script/workspace/workspace.lua +++ b/script/workspace/workspace.lua @@ -469,8 +469,6 @@ function m.flushFiles(scp) for uri in pairs(cachedUris) do files.delRef(uri) end - collectgarbage() - collectgarbage() end ---@param scp scope @@ -491,6 +489,8 @@ end ---@async ---@param scp scope function m.awaitReload(scp) + await.unique('workspace reload:' .. scp:getName()) + await.sleep(0.1) scp:set('ready', false) scp:set('nativeMatcher', nil) scp:set('libraryMatcher', nil) -- cgit v1.2.3 From 1055a8547668308633601a8b67f1a0b52075de3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Fri, 11 Aug 2023 19:04:34 +0800 Subject: commandline parameter `--force-accept-workspace` resolve #2159 --- script/workspace/workspace.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'script/workspace/workspace.lua') diff --git a/script/workspace/workspace.lua b/script/workspace/workspace.lua index da2f9daf..97518e84 100644 --- a/script/workspace/workspace.lua +++ b/script/workspace/workspace.lua @@ -50,8 +50,10 @@ function m.create(uri) m.folders[#m.folders+1] = scp if uri == furi.encode '/' or uri == furi.encode(os.getenv 'HOME' or '') then - client.showMessage('Error', lang.script('WORKSPACE_NOT_ALLOWED', furi.decode(uri))) - scp:set('bad root', true) + if not FORCE_ACCEPT_WORKSPACE then + client.showMessage('Error', lang.script('WORKSPACE_NOT_ALLOWED', furi.decode(uri))) + scp:set('bad root', true) + end end end -- cgit v1.2.3