LuaLS / LuaLS/lua-language-server

Annotation warnings are bleeding over from other workspaces

オープン
#1,765 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

Info Needed
主要言語
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

file_e%3A_Games_RedGuides_MacroQuest_lua_FightForge.zip

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず添付されたログを調べ、Lua.workspace.library を通じて参照される Annotations workspace と、別の Project 1 workspace を使って、説明されているレイアウトを再現します。missing-return diagnostics が workspace の境界を越える理由を追跡します。完了条件は、ファイルを開いて閉じ直さなくても、Annotations workspace で無効にした警告が Project 1 に表示されないことです。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
lua, vscode
領域
devtools
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。