LuaLS / LuaLS/lua-language-server
[Feature Request] Multiple-project/Monorepo support
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Lua
- Sterne
- 4.4k
- Forks
- 442
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
I work with a large monorepo that contains multiple Lua project roots. You can actually see the list of Lua projects here, as an example: https://github.com/SmartThingsCommunity/SmartThingsEdgeDrivers/tree/main/drivers/SmartThings
Loading this entire repo at once doesn't work well because of how the require paths are established via runtime.path. The primary issue is that it leads to ambiguous require resolution if two of the roots have files with the same name.
Obviously, one workaround is to use a multi-root workspace and only add the folders for the projects I currently care about, but that's tedious since I'd be adding and removing folders from the workspace constantly.
One idea that I had was being able to specify an "entrypoint" glob. The plugin could traverse up the directory tree looking for a file that matches the glob, and then use that as the root for all local requires. But that might not be a good "general" solution even though it works well for my use case.
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
Beginne mit der Prüfung, wie runtime.path lokale require-Roots festlegt und wie sich das verhält, wenn das Repository mehrere Lua-Projekt-Roots enthält. Das Issue nennt einen entrypoint glob als eine mögliche Richtung, legt aber weder das bevorzugte Design noch die zu ändernden Dateien fest. Als erledigt sollte gelten, dass das Monorepo ohne mehrdeutige require-Auflösung geladen werden kann.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- lua
- Bereich
- developer-experience, tooling
- Issue-Typ
- Feature
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 32/100