From a8ce5a0f0843731153b638986b411ea73eb9db8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Tue, 2 Dec 2025 15:26:47 +0800 Subject: [PATCH 01/10] restore `make.bat` and `make.sh` resolve #3296 --- make.bat | 9 +++++++++ make.sh | 11 +++++++++++ 2 files changed, 20 insertions(+) create mode 100644 make.bat create mode 100644 make.sh diff --git a/make.bat b/make.bat new file mode 100644 index 000000000..39f261a68 --- /dev/null +++ b/make.bat @@ -0,0 +1,9 @@ +git submodule update --init --recursive +cd 3rd\luamake +call compile\build.bat +cd ..\.. +IF "%~1"=="" ( + call 3rd\luamake\luamake.exe rebuild +) ELSE ( + call 3rd\luamake\luamake.exe rebuild --platform %1 +) diff --git a/make.sh b/make.sh new file mode 100644 index 000000000..5c3578ad6 --- /dev/null +++ b/make.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +git submodule update --init --recursive +pushd 3rd/luamake +./compile/build.sh +popd +if [ -z "$1" ]; then + 3rd/luamake/luamake rebuild +else + 3rd/luamake/luamake rebuild --platform "$1" +fi From 7401c1915d04a5adc56dc034b1a5ef438c709124 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Tue, 2 Dec 2025 16:10:16 +0800 Subject: [PATCH 02/10] fix warning --- script/parser/guide.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/script/parser/guide.lua b/script/parser/guide.lua index f4da74b79..c407eca67 100644 --- a/script/parser/guide.lua +++ b/script/parser/guide.lua @@ -74,6 +74,7 @@ local type = type ---@field hasReturn? true ---@field hasBreak? true ---@field hasExit? true +---@field virtual? boolean ---@field [integer] parser.object|any ---@field dot { type: string, start: integer, finish: integer } ---@field colon { type: string, start: integer, finish: integer } From fa2c778847d2294d07cefd67584f9470251e6b8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Tue, 2 Dec 2025 16:12:42 +0800 Subject: [PATCH 03/10] update metas --- .luarc.json | 3 +-- script/meta/bee/channel.lua | 2 +- script/meta/bee/filesystem.lua | 2 +- script/meta/bee/filewatch.lua | 2 +- script/meta/bee/select.lua | 2 +- script/meta/bee/socket.lua | 2 +- script/meta/bee/sys.lua | 2 +- 7 files changed, 7 insertions(+), 8 deletions(-) diff --git a/.luarc.json b/.luarc.json index b56692448..1c17ef2b5 100644 --- a/.luarc.json +++ b/.luarc.json @@ -29,8 +29,7 @@ "script/?.lua", "script/?/init.lua", "test/?.lua", - "test/?/init.lua", - "script/meta/?.lua" + "test/?/init.lua" ], "pathStrict": true }, diff --git a/script/meta/bee/channel.lua b/script/meta/bee/channel.lua index 2319db2c5..cdbf13bc7 100644 --- a/script/meta/bee/channel.lua +++ b/script/meta/bee/channel.lua @@ -1,4 +1,4 @@ ----@meta +---@meta bee.channel ---@class bee.channel local channelMod = {} diff --git a/script/meta/bee/filesystem.lua b/script/meta/bee/filesystem.lua index 90d65419e..278915332 100644 --- a/script/meta/bee/filesystem.lua +++ b/script/meta/bee/filesystem.lua @@ -1,4 +1,4 @@ ----@meta +---@meta bee.filesystem ---@class fs.path ---@operator div: fs.path diff --git a/script/meta/bee/filewatch.lua b/script/meta/bee/filewatch.lua index b5211355e..813548b22 100644 --- a/script/meta/bee/filewatch.lua +++ b/script/meta/bee/filewatch.lua @@ -1,4 +1,4 @@ ----@meta +---@meta bee.filewatch ---@class bee.filewatch.instance local instance = {} diff --git a/script/meta/bee/select.lua b/script/meta/bee/select.lua index 154624b23..6d2abcb53 100644 --- a/script/meta/bee/select.lua +++ b/script/meta/bee/select.lua @@ -1,4 +1,4 @@ ----@meta +---@meta bee.select ---@class bee.select local select = {} diff --git a/script/meta/bee/socket.lua b/script/meta/bee/socket.lua index 55c349a6c..b5e3a7b2b 100644 --- a/script/meta/bee/socket.lua +++ b/script/meta/bee/socket.lua @@ -1,4 +1,4 @@ ----@meta +---@meta bee.socket ---@alias bee.socket.protocol ---| 'tcp' diff --git a/script/meta/bee/sys.lua b/script/meta/bee/sys.lua index 299860b36..bf7fa3a0f 100644 --- a/script/meta/bee/sys.lua +++ b/script/meta/bee/sys.lua @@ -1,4 +1,4 @@ ----@meta +---@meta bee.sys ---@class bee.sys local sys = {} From 23215b4ceade7cfc3453b01243d2c41d86e4f68d Mon Sep 17 00:00:00 2001 From: Douglas Stephen Date: Thu, 4 Dec 2025 15:08:52 -0600 Subject: [PATCH 04/10] Add nil checks for name and file in sortDoc `name` and `file` don't appear to be guaranteed non-nil; because of this, if there are cases where the key is present on one element but not the other, the equality check will fall through to the less-than check and this results in a crash comparing `string` against `nil`. Resolves: https://github.com/LuaLS/lua-language-server/issues/3111 --- script/cli/doc/export.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/script/cli/doc/export.lua b/script/cli/doc/export.lua index cd356b167..4c1403099 100644 --- a/script/cli/doc/export.lua +++ b/script/cli/doc/export.lua @@ -72,11 +72,11 @@ function export.positionOf(rowcol) end function export.sortDoc(a,b) - if a.name ~= b.name then + if a.name and b.name and a.name ~= b.name then return a.name < b.name end - if a.file ~= b.file then + if a.file and b.file and a.file ~= b.file then return a.file < b.file end From b5663a2bc06a21134f9c80952d7ec5f5110010ed Mon Sep 17 00:00:00 2001 From: Douglas Stephen Date: Thu, 4 Dec 2025 15:12:34 -0600 Subject: [PATCH 05/10] Update CHANGELOG.md --- changelog.md | 1 + 1 file changed, 1 insertion(+) diff --git a/changelog.md b/changelog.md index b6caa5050..6dd682698 100644 --- a/changelog.md +++ b/changelog.md @@ -2,6 +2,7 @@ ## Unreleased +* `FIX` Comparison crash in doc export CLI [#3111](https://github.com/LuaLS/lua-language-server/issues/3111) ## 3.16.0 `2025-12-2` From 721591082a35969bd8074b43b894b41b948aef7d 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, 5 Dec 2025 20:40:34 +0800 Subject: [PATCH 06/10] update test --- test/basic/textmerger.lua | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/test/basic/textmerger.lua b/test/basic/textmerger.lua index 1ffd36f02..38c47bbd2 100644 --- a/test/basic/textmerger.lua +++ b/test/basic/textmerger.lua @@ -214,3 +214,29 @@ print(12345) text = "", }, } + +local text = string.rep('abcdefghijklmnopqrstuvwxyz\n', 10000) +local changes = {} +for i = 1, 100 do + changes[#changes+1] = { + range = { + start = { line = i * 10, character = 0 }, + ['end'] = { line = i * 10, character = 5 }, + }, + text = 'changed words', + } +end +for i = 1, 100 do + changes[#changes+1] = { + range = { + start = { line = i * 10 + 5000, character = 10 }, + ['end'] = { line = i * 10 + 5 + 5000, character = 20 }, + }, + text = '', + } +end + +local c1 = os.clock() +tm(text, nil, changes) +local c2 = os.clock() +print('text-merger Large test time:', c2 - c1) From 291d28671904f4d292589c8ce30fd82338555461 Mon Sep 17 00:00:00 2001 From: Ivan Georgiev Date: Thu, 4 Dec 2025 14:13:41 +0200 Subject: [PATCH 07/10] fix diagnostic completions ending --- script/core/completion/completion.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/script/core/completion/completion.lua b/script/core/completion/completion.lua index f751e53d5..97cb093ae 100644 --- a/script/core/completion/completion.lua +++ b/script/core/completion/completion.lua @@ -1925,7 +1925,7 @@ local function tryluaDocBySource(state, position, source, results) kind = define.CompletionItemKind.Enum, textEdit = { start = source.start, - finish = source.start + #source.mode - 1, + finish = source.start + #source.mode, newText = mode, }, } @@ -1940,7 +1940,7 @@ local function tryluaDocBySource(state, position, source, results) kind = define.CompletionItemKind.Value, textEdit = { start = source.start, - finish = source.start + #source[1] - 1, + finish = source.start + #source[1], newText = name, }, } From b6606e62176ce5dcf9aac48badac21d89fbba758 Mon Sep 17 00:00:00 2001 From: Ivan Georgiev Date: Thu, 4 Dec 2025 14:32:38 +0200 Subject: [PATCH 08/10] update changelog --- changelog.md | 1 + 1 file changed, 1 insertion(+) diff --git a/changelog.md b/changelog.md index b6caa5050..910db1227 100644 --- a/changelog.md +++ b/changelog.md @@ -2,6 +2,7 @@ ## Unreleased +* `FIX` Fix diagnostic completions incorrect textEdit.finish ## 3.16.0 `2025-12-2` From 9c9a17101be5fa3223a9b58f80bed0a6dae385d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Mon, 8 Dec 2025 10:26:15 +0800 Subject: [PATCH 09/10] update submodules --- 3rd/bee.lua | 2 +- 3rd/json.lua | 2 +- 3rd/luamake | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/3rd/bee.lua b/3rd/bee.lua index dd7853f1b..ee7efd071 160000 --- a/3rd/bee.lua +++ b/3rd/bee.lua @@ -1 +1 @@ -Subproject commit dd7853f1bd010c701fb5fc4ee0d4082cdbc07ae8 +Subproject commit ee7efd07155c33c2c95f4a66d17b2f3ef122896a diff --git a/3rd/json.lua b/3rd/json.lua index aff2a3d90..f94860ef5 160000 --- a/3rd/json.lua +++ b/3rd/json.lua @@ -1 +1 @@ -Subproject commit aff2a3d90dd35b5761301de0e2af700266aec41a +Subproject commit f94860ef551036490c5b3db6098325267f42ef28 diff --git a/3rd/luamake b/3rd/luamake index 0e9077839..a83fa224d 160000 --- a/3rd/luamake +++ b/3rd/luamake @@ -1 +1 @@ -Subproject commit 0e90778390fb11d917c6e4c5cb963356a0780fb0 +Subproject commit a83fa224d083ad5ee4d39367621ee8c8c8db379b From 0b067fd1e23154c8e5b39c56ede03f2313815d0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Mon, 8 Dec 2025 14:22:48 +0800 Subject: [PATCH 10/10] 3.16.1 --- changelog.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/changelog.md b/changelog.md index 902459b15..cdbe218dc 100644 --- a/changelog.md +++ b/changelog.md @@ -2,6 +2,10 @@ ## Unreleased + +## 3.16.1 +`2025-12-8` +* `FIX` Broken in Linux * `FIX` Fix diagnostic completions incorrect textEdit.finish * `FIX` Comparison crash in doc export CLI [#3111](https://github.com/LuaLS/lua-language-server/issues/3111)