LuaLS / LuaLS/lua-language-server

Adding parent or higher directory to workspace.library of the .luarc.json of a subproject produces erroneous duplicate field/etc warnings

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

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

enhancement
主要言語
Lua
スター
4.4k
フォーク
442
PR マージ指標
30日以内にマージされた PR はありません

説明

### How are you using the lua-language-server?

NeoVim

### Which OS are you using?

Linux

### What is the issue affecting?

Annotations, Type Checking, Diagnostics/Syntax Checking

### Expected Behaviour

No warnings issued for duplicate fields and similar.

### Actual Behaviour

Many warnings about duplicates are produced

### Reproduction steps

Create a subproject and add the parent directory to the subproject's .luarc.json, then create some annotated type and observe warnings about duplicates.

### Additional Notes

It is really a small issue but it would be great to be able to work on subprojects and get require() completions for both the true module name of the project, as well as my other projects within the path

### Log File

_No response_

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

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

はじめの一歩

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

調査の方向性

まず、.luarc.json で親ディレクトリを workspace.library に追加しているサブプロジェクトを使い、Linux 上の NeoVim で問題を再現します。注釈付きの型と重複フィールドの診断を比較し、プロジェクトのパス全体で require() の補完を確認します。設定によって重複に関する誤った警告が発生せず、期待される補完が維持されれば完了です。

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

評価

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

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

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