LuaLS / LuaLS/lua-language-server
Annotation warnings are bleeding over from other workspaces
还没有人认领这个 Issue。
- 主要语言
- Lua
- 星标
- 4.4k
- 派生
- 442
- PR 合并指标
- 30 天内没有已合并 PR
描述
How are you using the lua-language-server?
Visual Studio Code Extension (sumneko.lua)
Which OS are you using?
Windows
What is the issue affecting?
Annotations, Diagnostics/Syntax Checking
Expected Behaviour
Annotation warning from another workspace do not show up in the current workspace.
Actual Behaviour
Workspace structure is as follows
\Projects
-- Annotations (separate workspace, VS Code has setting "Lua.workspace.library" referencing this folder)
-- Project 1 (separate workspace)
Annotations are over 100 files defining the API surface of a hosting program. In the workspace for the annotations, the diagnostic for missing-return is turned off for that workspace. This is to allow for the annotation of methods on the API via function nomenclature. Naturally, these functions do not have any implementation and the diagnostic warning appears.
When the annotations are referenced (---@type) in another project workspace (e.g., Project 1 above), these diagnostic warnings can appear in the workspace for Project 1. Clicking the warning in the Problems area to open the file and then closing the file dismisses the warnings for that file.
Reproduction steps
There are no specific "steps" to recreate this problem.
Additional Notes
No response
Log File
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先检查附加的日志,并使用通过 Lua.workspace.library 引用的 Annotations workspace 和单独的 Project 1 workspace 重现所述布局。追踪缺少返回值的诊断为何会跨越 workspace 边界;完成标准是,在 Annotations workspace 中禁用的警告不会出现在 Project 1 中,且不需要打开并关闭文件。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- lua, vscode
- 领域
- devtools
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 25/100