Skip to content

Commit

Permalink
lua-language-server: update to version 3.8.3
Browse files Browse the repository at this point in the history
Changelog:

## 3.8.3
`2024-4-23`
* `FIX` server may crash when the workspace is using a non-English path.

## 3.8.2
`2024-4-23`
* This is a fake version only for the new version of VSCode, with a core of 3.8.0.

## 3.8.1
`2024-4-23`
* This is a fake version only for the old version of VSCode, with a core of `3.7.4`. Starting from the next minor version, the version requirement for VSCode will be raised to prevent users still using the old version of VSCode from updating to the new version and experiencing compatibility issues.

## 3.8.0
`2024-4-22`
* `NEW` supports tuple type (@[lizho])
  ```lua
  ---@type [string, number, boolean]
  local t

  local x = t[1] --> x is `string`
  local y = t[2] --> y is `number`
  local z = t[3] --> z is `boolean`
  ```
* `NEW` generic pattern (@[fesily])
  ```lua
  ---@Generic T
  ---@param t Cat.`T`
  ---@return T
  local function f(t) end

  local t = f('Smile') --> t is `Cat.Smile`
  ```
* `NEW` alias and enums supports attribute `partial`
  ```lua
  ---@alias Animal Cat

  ---@alias(partial) Animal Dog

  ---@type Animal
  local animal --> animal is `Cat|Dog` here
  ```

  ```lua
  ---@enum(key) ErrorCodes
  local codes1 = {
      OK = 0,
      ERROR = 1,
      FATAL = 2,
  }

  ---@enum(key, partial) ErrorCodes
  local codes2 = {
      WARN = 3,
      INFO = 4,
  }

  ---@type ErrorCodes
  local code

  code = 'ERROR' --> OK
  code = 'WARN'  --> OK

  ```
* `NEW` plugin: add `OnTransFormAst` interface (@[fesily])
* `NEW` plugin: add `OnNodeCompileFunctionParam` interface (@[fesily])
* `NEW` plugin: add `ResolveRequire` interface (@[Artem Dzhemesiuk])
* `NEW` plugin: support multi plugins (@[fesily])
  + setting: `Lua.runtime.plugin` can be `string|string[]`
  + setting: `Lua.runtime.pluginArgs` can be `string[]|table<string, string>`
* `NEW` CLI: `--doc` add option `--doc_out_path <PATH>` (@[Andreas Matthias])
* `NEW` CLI: `--doc_update`, update an existing `doc.json` without using `--doc` again (@[Andreas Matthias])
* `NEW` CLI: `--trust_all_plugins`, this is potentially unsafe for normal use and meant for usage in CI environments only (@[Paul Emmerich])
* `CHG` CLI: `--check` will run plugins (@[Daniel Farrell])
* `FIX` diagnostic: `discard-returns` not works in some blocks (@clay-golem)
* `FIX` rename in library files

## 3.7.4
`2024-1-5`
* `FIX` rename to unicode with `Lua.runtime.unicodeName = true`

## 3.7.3
`2023-11-14`
* `FIX` can not infer arg type in some cases.

## 3.7.2
`2023-11-9`
* `FIX` [#2407]

[#2407]: LuaLS/lua-language-server#2407

## 3.7.1
`2023-11-7`
* `FIX` [#2299]
* `FIX` [#2335]

[#2299]: LuaLS/lua-language-server#2299
[#2335]: LuaLS/lua-language-server#2335

## 3.7.0
`2023-8-24`
* `NEW` support `---@type` and `--[[@as]]` for return statement
* `NEW` commandline parameter `--force-accept-workspace`: allowing the use of the root directory or home directory as the workspace
* `NEW` diagnostic: `inject-field`
* `NEW` `---@enum` supports attribute `key`
  ```lua
  ---@enum (key) AnimalType
  local enum = {
    Cat = 1,
    Dog = 2,
  }

  ---@param animal userdata
  ---@param atp AnimalType
  ---@return boolean
  local function isAnimalType(animal, atp)
    return API.isAnimalType(animal, enum[atp])
  end

  assert(isAnimalType(animal, 'Cat'))
  ```
* `NEW` `---@class` supports attribute `exact`
  ```lua
  ---@Class (exact) Point
  ---@field x number
  ---@field y number
  local m = {}
  m.x = 1 -- OK
  m.y = 2 -- OK
  m.z = 3 -- Warning
  ```

* `FIX` wrong hover and signature for method with varargs and overloads
* `FIX` [#2155]
* `FIX` [#2224]
* `FIX` [#2252]
* `FIX` [#2267]

[#2155]: LuaLS/lua-language-server#2155
[#2224]: LuaLS/lua-language-server#2224
[#2252]: LuaLS/lua-language-server#2252
[#2267]: LuaLS/lua-language-server#2267

## 3.6.25
`2023-7-26`
* `FIX` [#2214]

[#2214]: LuaLS/lua-language-server#2214

## 3.6.24
`2023-7-21`
* `NEW` diagnostic: `missing-fields`
* `FIX` shake of `codeLens`
* `FIX` [#2145]

[#2145]: LuaLS/lua-language-server#2145

## 3.6.23
`2023-7-7`
* `CHG` signature: narrow by inputed literal

## 3.6.22
`2023-6-14`
* `FIX` [#2038]
* `FIX` [#2042]
* `FIX` [#2062]
* `FIX` [#2083]
* `FIX` [#2088]
* `FIX` [#2110]
* `FIX` [#2129]

[#2038]: LuaLS/lua-language-server#2038
[#2042]: LuaLS/lua-language-server#2042
[#2062]: LuaLS/lua-language-server#2062
[#2083]: LuaLS/lua-language-server#2083
[#2088]: LuaLS/lua-language-server#2088
[#2110]: LuaLS/lua-language-server#2110
[#2129]: LuaLS/lua-language-server#2129
  • Loading branch information
nikkicoon committed Apr 30, 2024
1 parent b810eda commit a95dae0
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 701 deletions.
23 changes: 11 additions & 12 deletions devel/lua-language-server/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# $NetBSD: Makefile,v 1.11 2023/09/22 20:17:21 vins Exp $
# $NetBSD: Makefile,v 1.12 2024/04/30 22:01:33 nikita Exp $

DISTNAME= lua-language-server-3.6.21
DISTNAME= lua-language-server-3.8.3
PKGNAME= ${DISTNAME:S/lua/${LUA_PKGPREFIX}/}
CATEGORIES= devel lua
MASTER_SITES= ${MASTER_SITE_GITHUB:=luals/}
Expand Down Expand Up @@ -31,15 +31,14 @@ BUILDLINK_TRANSFORM+= rm:-Werror
INSTALLATION_DIRS+= share/lua-language-server/bin
INSTALLATION_DIRS+= bin

# TODO: Maybe unbundle (some of) them? (lls does build with them included though)
GITHUB_SUBMODULES+= CppCXY EmmyLuaCodeStyle 82aca211b6ee403a832412b9f7938db797c564d8 3rd/EmmyLuaCodeStyle
GITHUB_SUBMODULES+= actboy168 bee.lua a131e39521e230ea2bbca20cb6b1c5abbc6a437b 3rd/bee.lua
GITHUB_SUBMODULES+= actboy168 json.lua bd7b7787bb8b586e59b5afe5886dd1b76c86eb56 3rd/json.lua
GITHUB_SUBMODULES+= love2d-community love-api ab6dc6756683686b5506107116f994253aef5a20 3rd/love-api
GITHUB_SUBMODULES+= bjornbytes lovr-docs 441a21a6eb32e611be889cadf41df16938eda43d 3rd/lovr-api
GITHUB_SUBMODULES+= sqmedeiros lpeglabel e25eb35666201b10dc2778d6147ea36a9f6e033d 3rd/lpeglabel
GITHUB_SUBMODULES+= actboy168 luamake 22f861ac8444d1b85ceb29561b2a599fcbff4e3f 3rd/luamake
GITHUB_SUBMODULES+= actboy168 bee.lua 8ff095021f73f5883d4b67ba6eb233eae44f3bb9 3rd/luamake/bee.lua
GITHUB_SUBMODULES+= CppCXY EmmyLuaCodeStyle 660a26085ff2c1275392a291063404d54fdd32b9 3rd/EmmyLuaCodeStyle
GITHUB_SUBMODULES+= actboy168 bee.lua 8c01c7d79612d47f47f17d80304e66ae14d7b953 3rd/bee.lua
GITHUB_SUBMODULES+= actboy168 json.lua 21c9584d30fa36c542c98b6b1410393318583712 3rd/json.lua
GITHUB_SUBMODULES+= love2d-community love-api 728ba001f3398fd11b0a3909b919a7caf3e329a4 3rd/love-api
GITHUB_SUBMODULES+= bjornbytes lovr-docs e89c753e1c2849b7533481fcf058095f8e050b9f 3rd/lovr-api
GITHUB_SUBMODULES+= sqmedeiros lpeglabel 912b0b9e8641074408ffc2259e069b188e0c717b 3rd/lpeglabel
GITHUB_SUBMODULES+= actboy168 luamake c086f35cfad0236f74ba380d51f211c52a2c8abc 3rd/luamake
GITHUB_SUBMODULES+= actboy168 bee.lua 038aef6f41dc09dad43325e5d3cdc3e207b6d3c0 3rd/luamake/bee.lua

post-extract:
${CP} ${FILESDIR}/lua-language-server ${WRKSRC}/lua-language-server
Expand All @@ -65,7 +64,7 @@ SUBST_STAGE.tests= pre-configure
SUBST_MESSAGE.tests= Do not run randomly failing filewatch tests.
SUBST_FILES.tests+= 3rd/bee.lua/test/test.lua
SUBST_FILES.tests+= 3rd/luamake/bee.lua/test/test.lua
SUBST_SED.tests= -e "s,require 'test_filewatch',,"
SUBST_SED.tests= -e 's,require "test_filewatch",,'

do-build:
# probably needs much more fixes for systems noch supported by luamake.
Expand Down
Loading

0 comments on commit a95dae0

Please sign in to comment.