From be449e9359882cd15aa4e58c5dd8af5360e8012ca6e92c5288563ef05d009e8e Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Wed, 29 Jun 2022 21:21:37 +0000 Subject: [PATCH] - Update to 3.4.0: - NEW diagnostics: cast-local-type assign-type-mismatch param-type-mismatch unknown-cast-variable cast-type-mismatch missing-return-value redundant-return-value missing-return return-type-mismatch - NEW settings: diagnostics.groupSeverity diagnostics.groupFileStatus type.castNumberToInteger type.weakUnionCheck hint.semicolon - CHG infer nil as redundant return value local function f() end local x = f() -- `x` is `nil` instead of `unknown` - CHG infer called function by params num ---@overload fun(x: number, y: number):string ---@overload fun(x: number):number ---@return boolean local function f() end local n1 = f() -- `n1` is `boolean` local n2 = f(0) -- `n2` is `number` local n3 = f(0, 0) -- `n3` is `string` - CHG semicolons and parentheses can be used in DocTable ---@type { (x: number); (y: boolean) } OBS-URL: https://build.opensuse.org/package/show/devel:languages:lua/lua-language-server?expand=0&rev=21 --- 3.2.4.tar.gz | 3 - 3.4.0.tar.gz | 3 + lua-language-server-3.2.4-submodules.zip | 3 - lua-language-server-3.4.0-submodules.zip | 3 + lua-language-server.changes | 98 ++++++++++++++++++++++++ lua-language-server.spec | 2 +- 6 files changed, 105 insertions(+), 7 deletions(-) delete mode 100644 3.2.4.tar.gz create mode 100644 3.4.0.tar.gz delete mode 100644 lua-language-server-3.2.4-submodules.zip create mode 100644 lua-language-server-3.4.0-submodules.zip diff --git a/3.2.4.tar.gz b/3.2.4.tar.gz deleted file mode 100644 index 908fab6..0000000 --- a/3.2.4.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9d644ac9b553d5c7666d99adb38bab6fb2b2fa4d44b0af7f75bef5bb7ca4d341 -size 1229617 diff --git a/3.4.0.tar.gz b/3.4.0.tar.gz new file mode 100644 index 0000000..f84f024 --- /dev/null +++ b/3.4.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d7693bf37e18038b79eb74c8f5f35231844fb61557bc502efc42919b00fbf311 +size 1954656 diff --git a/lua-language-server-3.2.4-submodules.zip b/lua-language-server-3.2.4-submodules.zip deleted file mode 100644 index ad9467d..0000000 --- a/lua-language-server-3.2.4-submodules.zip +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:cce786fb1f9332a545730cc164107c97046e993cf7ccb98f88519a4c05cfecc5 -size 26456715 diff --git a/lua-language-server-3.4.0-submodules.zip b/lua-language-server-3.4.0-submodules.zip new file mode 100644 index 0000000..f47e1ed --- /dev/null +++ b/lua-language-server-3.4.0-submodules.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d32a5c96169cd93b60a2d6dd079904f436eac2d5ba698d55a0f74d4c0c670f3e +size 27231592 diff --git a/lua-language-server.changes b/lua-language-server.changes index 8492ba4..2059e87 100644 --- a/lua-language-server.changes +++ b/lua-language-server.changes @@ -1,3 +1,101 @@ +------------------------------------------------------------------- +Wed Jun 29 21:05:12 UTC 2022 - Matej Cepl + +- Update to 3.4.0: + - NEW diagnostics: + cast-local-type + assign-type-mismatch + param-type-mismatch + unknown-cast-variable + cast-type-mismatch + missing-return-value + redundant-return-value + missing-return + return-type-mismatch + - NEW settings: + diagnostics.groupSeverity + diagnostics.groupFileStatus + type.castNumberToInteger + type.weakUnionCheck + hint.semicolon + - CHG infer nil as redundant return value + + local function f() end + local x = f() -- `x` is `nil` instead of `unknown` + + - CHG infer called function by params num + + ---@overload fun(x: number, y: number):string + ---@overload fun(x: number):number + ---@return boolean + local function f() end + + local n1 = f() -- `n1` is `boolean` + local n2 = f(0) -- `n2` is `number` + local n3 = f(0, 0) -- `n3` is `string` + + - CHG semicolons and parentheses can be used in DocTable + + ---@type { (x: number); (y: boolean) } + + CHG return names and parentheses can be used in DocFunction + + ---@type fun():(x: number, y: number, ...: number) + + - CHG supports ---@return boolean ... + - CHG improve experience for diagnostics and semantic-tokens + - FIX diagnostics flash when opening a file + - FIX sometimes workspace diagnostics are not triggered + +- Update to 3.3.0: + - NEW LuaDoc supports `CODE` + + ---@type `CONST.X` | `CONST.Y` + local x + + if x == -- suggest `CONST.X` and `CONST.Y` here + + - CHG infer type by error + + ---@type integer|nil + local n + + if not n then + error('n is nil') + end + + print(n) -- `n` is `integer` here + + - CHG infer type by t and t.x + + ---@type table|nil + local t + + local s = t and t.x or 1 -- `t` in `t.x` is `table` + + - CHG infer type by type(x) + + local x + + if type(x) == 'string' then + print(x) -- `x` is `string` here + end + + local tp = type(x) + + if tp == 'boolean' then + print(x) -- `x` is `boolean` here + end + + - CHG infer type by >/=/<= + FIX with clients that support LSP 3.17 (VSCode), workspace + diagnostics are triggered every time when opening a file. + FIX #1204 + FIX #1208 + +- Update to 3.2.5: + - NEW provide config docs in LUA_LANGUAGE_SERVER/doc/ + ------------------------------------------------------------------- Sat May 28 06:07:09 UTC 2022 - Soc Virnyl Estela diff --git a/lua-language-server.spec b/lua-language-server.spec index 90fba3a..9f299a2 100644 --- a/lua-language-server.spec +++ b/lua-language-server.spec @@ -18,7 +18,7 @@ Name: lua-language-server -Version: 3.2.4 +Version: 3.4.0 Release: 0 Summary: Lua Language Server coded by Lua License: MIT