-
-
Notifications
You must be signed in to change notification settings - Fork 383
-
Here's my workspace config:
{ "Lua.runtime.version": "LuaJIT", "Lua.diagnostics.globals": ["ngx", "lfs"], "Lua.workspace.library": ["${3rd}/OpenResty/library", "${3rd}/lfs/library"] }
when I use openresty's function, I found there's an incorrect function signature: set_resp_header
should have 4 params, but lsp's has none.
In the function definition file C:/Users/me/.vscode/extensions/sumneko.lua-3.15.0-win32-x64/server/meta/3rd/OpenResty/library/resty/core/response.lua
, the content is below:
---@meta local resty_core_response = {} function resty_core_response.set_resp_header() end resty_core_response.version = require("resty.core.base").version return resty_core_response
That's inconsist with the definition in LuaCATS/openresty, which is the upstream of 3rd/Openresty.
Beta Was this translation helpful? Give feedback.
All reactions
AFAIK, the server built-in 3rd party library is deprecated long ago: #1950
(this is actually a pinned discussion in the discussion page 🙈 )
You will need to use the LLS addon manager to download / install library, and link to them using
"workspace.library": [ "${addons}/openresty/module/library" ],
(the addon manager will auto adjust your project's .luarc.json
when you install the library)
but ...
Even if I added OpenResty library in this way, still the cloned library is the old version 😕
I then opened the submodule at my LLS addon path, seems that the submodule commit is not updated in the LLS-addon registry repo 🤔
https://github.com/LuaLS/LLS-Addons/tree/main/addons/op...
Replies: 2 comments 1 reply
-
And there's a lot of wrong signatures in github: code search result.
Beta Was this translation helpful? Give feedback.
All reactions
-
AFAIK, the server built-in 3rd party library is deprecated long ago: #1950
(this is actually a pinned discussion in the discussion page 🙈 )
You will need to use the LLS addon manager to download / install library, and link to them using
"workspace.library": [ "${addons}/openresty/module/library" ],
(the addon manager will auto adjust your project's .luarc.json
when you install the library)
but ...
Even if I added OpenResty library in this way, still the cloned library is the old version 😕
image
I then opened the submodule at my LLS addon path, seems that the submodule commit is not updated in the LLS-addon registry repo 🤔
https://github.com/LuaLS/LLS-Addons/tree/main/addons/openresty
=> it is still pointing to an old commit: https://github.com/LuaCATS/openresty/tree/cc15b6401f553756e44e7ebdade7f4a382079521
maybe someone need to open PR and update it in the registry first
Beta Was this translation helpful? Give feedback.
All reactions
-
Thank you for your excellent answer! I tried to open a PR for it.
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 1