LuaLS / LuaLS/lua-language-server
[Feature Request] Multiple-project/Monorepo support
Nessuno ha ancora preso questa issue.
- Lingua principale
- Lua
- Stelle
- 4.4k
- Fork
- 442
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
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.
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia esaminando come runtime.path stabilisce le radici locali di require e come si comporta quando il repository contiene più radici di progetti Lua. L’issue suggerisce un entrypoint glob come possibile direzione, ma non specifica il design preferito né i file da modificare. Il lavoro dovrebbe considerarsi completato quando il monorepo può essere caricato senza una risoluzione ambigua di require.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- lua
- Ambito
- developer-experience, tooling
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 32/100