LuaLS / LuaLS/lua-language-server-rust
The generated executable depends on files in the source tree
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- Lua
- Estrellas
- 19
- Forks
- 6
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
It is unexpected that the compiled executable requires the build dir to remain present. This additionally makes it problematic to include this software in any operating system distribution.
Currently the main() function sources main.lua at run-time using load() with a filename, and consequentially all of its required files are also read from the source tree at run-time. Furthermore version.lua parses the changelog at run-time to determine the version number. There might be more similar constructs. I have not looked further.
In order to make the built executable self-sustained, one might wish to use constructs which injects the actual Lua source files into the Rust source using e.g. include_str!(). The AsChunk trait has the required implementations for a &str to be given to load().
As for version strings, the best solution would probably to be solve issue #9, which would make the version string available at build-time in Rust context using the env!() macro with CARGO_PKG_VERSION. If that for some reason is not desired or possible, parsing the changelog at build time using a build.rs script would be an alternative.
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Comienza con crates/luals/src/main.rs, especialmente con el punto de entrada main(), y con script/version.lua; inspecciona otras rutas de carga de archivos en tiempo de ejecución, tal como se sugiere. Compila el ejecutable y, después, pruébalo con los directorios de compilación y de código fuente no disponibles. Se considera terminado cuando el ejecutable funciona sin archivos del árbol de código fuente e informa de su versión sin analizar el changelog durante la ejecución.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- lua, rust
- Área
- build-system, devtools
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100