LuaLS / LuaLS/lua-language-server
"Save as" can cause "duplicate defined alias"
まだ誰も着手していません。
- 主要言語
- 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
Expected Behaviour
"Save as" should clear the cached aliases from the previous file (in the case of no workspace/folder)
Actual Behaviour
With a new window with no workspace, when I used "save as" I noticed the aliases from the file were still being used, causing a conflict duplicate defined alias with the newly named file. See repro steps.
Reproduction steps
- Start with a new window, no workspace, etc
- Create a new file, e.g., "test.lua"
- Add some code and save the file (
--@alias id integer\n) - "Save as" test_2.lua
- (Optional) You may need to repeatedly "Save as" (e.g., test_3.lua) to trigger the bug, I couldn't 100% repro
- Observe Duplicate defined alias
id
Reload editor to clear error
Additional Notes
This is an edge case, as typically you'd have an workspace or folder open (in which case 'save as' should keep the previous file cached also).
Log File
No response
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
ソースファイルもテストも指定されていません。まず、新しいウィンドウを開き、ワークスペースなしの状態で Visual Studio Code 拡張機能における問題を再現し、その後 Save as の処理とキャッシュされたアノテーションエイリアスを追跡してください。完了条件は、Save as 操作を繰り返しても定義済みエイリアスの重複が報告されず、記載されたワークスペースの動作が維持されることです。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- lua, vscode
- 領域
- tooling
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 42/100