LuaLS / LuaLS/lua-language-server
Diagnostics can become stale when switching between `<module>.lua` and `<module>/init.lua` structures (such as when going back and forth between git branches)
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Lua
- Sterne
- 4.4k
- Forks
- 442
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
How are you using the lua-language-server?
Visual Studio Code Extension (sumneko.lua)
Which OS are you using?
Linux
What is the issue affecting?
Diagnostics/Syntax Checking
Expected Behaviour
Diagnostics should always be performed on the current version of a module that is on disk.
Actual Behaviour
When switching between two different ways of structuring the same module as described in the title, diagnostics can populate the Problems panel in VS Code with information about the version of the module that was on-disk before switching using a mechanism such as git checkout <branch>
Reproduction steps
- Make sure
Runtime Pathincludes?.lua;?/init.lua - Create a module at
foo.lua, populate it with working Lua code. - Create a new
gitbranch - Refactor
foo.luatofoo/init.lua - Various diagnostics will show up in the VS Code Problems Panel, such as duplicate definitions, missing annotations, etc. It almost looks like the LSP is trying to process both files at the same time.
Additional Notes
No response
Log File
I won't be able to provide logs as this is a proprietary codebase. Apologies.
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Reproduziere das Problem mit auf ?.lua;?/init.lua gesetztem Runtime Path, indem du einen git-Branch von foo.lua zu foo/init.lua wechselst; untersuche anschließend das VS Code Problems panel auf Diagnosen aus dem vorherigen Modul-Layout. Vergleiche die Diagnosen mit den aktuellen Dateien auf der Festplatte; abgeschlossen ist die Aufgabe, wenn nach dem Wechsel nur die aktuelle Modulstruktur analysiert wird.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- lua, vscode
- Bereich
- devtools
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100