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