LuaLS / LuaLS/lua-language-server-rust

The generated executable depends on files in the source tree

Đang mở
#10 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Ngôn ngữ chính
Lua
Star
19
Fork
6
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Bắt đầu với crates/luals/src/main.rs, đặc biệt là điểm vào main(), và script/version.lua; kiểm tra các đường dẫn tải tệp runtime khác như đã gợi ý. Xây dựng tệp thực thi, sau đó kiểm thử nó khi các thư mục build và mã nguồn không khả dụng. Được xem là hoàn thành khi tệp thực thi chạy mà không cần các tệp trong cây mã nguồn và báo cáo phiên bản của nó mà không phân tích changelog trong thời gian chạy.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
lua, rust
Lĩnh vực
build-system, devtools
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.