LuaLS / LuaLS/lua-language-server-rust
The generated executable depends on files in the source tree
Ninguém assumiu esta issue ainda.
- Linguagem predominante
- Lua
- Estrelas
- 19
- Forks
- 6
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Descrição
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.
Guia de contribuição
Nenhum guia de contribuição indexado para este repositório
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Direção de pesquisa
Comece por crates/luals/src/main.rs, especialmente pelo ponto de entrada main(), e por script/version.lua; inspecione outros caminhos de carregamento de arquivos em tempo de execução conforme sugerido. Compile o executável e, em seguida, teste-o com os diretórios de build e de código-fonte indisponíveis. Considera-se concluído quando o executável é executado sem arquivos da árvore de código-fonte e informa sua versão sem analisar o changelog em tempo de execução.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Stack de tecnologia
- lua, rust
- Domínio
- build-system, devtools
- Tipo de issue
- Bug
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Status de atividade
- Estagnada
- Clareza
- Razoavelmente clara
- Facilidade para iniciantes
- 35/100