LuaLS / LuaLS/lua-language-server
Annotation warnings are bleeding over from other workspaces
Nobody has claimed this yet.
- Dominant language
- Lua
- Stars
- 4.4k
- Forks
- 442
- PR merge metrics
- No merged PRs in 30d
Description
### 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
[file_e%3A_Games_RedGuides_MacroQuest_lua_FightForge.zip](https://github.com/sumneko/lua-language-server/files/10227851/file_e.3A_Games_RedGuides_MacroQuest_lua_FightForge.zip)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by inspecting the attached log and reproduce the described layout with an Annotations workspace referenced through Lua.workspace.library and a separate Project 1 workspace. Trace why missing-return diagnostics cross the workspace boundary; done means warnings disabled in the annotations workspace do not appear in Project 1, without requiring the file to be opened and closed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua, vscode
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100