LuaLS / LuaLS/lua-language-server-rust
The generated executable depends on files in the source tree
まだ誰も着手していません。
- 主要言語
- Lua
- スター
- 19
- フォーク
- 6
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
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.
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
crates/luals/src/main.rs、特に main() エントリーポイントと script/version.lua から始め、提案されているとおり、他のランタイムファイル読み込みパスも調査します。実行ファイルをビルドし、その後、ビルドディレクトリとソースディレクトリを利用できない状態でテストします。実行ファイルがソースツリーのファイルなしで実行でき、実行時に changelog を解析せずにバージョンを報告できれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- lua, rust
- 領域
- build-system, devtools
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100