LuaLS / LuaLS/lua-language-server
Diagnostics can become stale when switching between `<module>.lua` and `<module>/init.lua` structures (such as when going back and forth between git branches)
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Lua
- Star
- 4.4k
- Fork
- 442
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
How are you using the lua-language-server?
Visual Studio Code Extension (sumneko.lua)
Which OS are you using?
Linux
What is the issue affecting?
Diagnostics/Syntax Checking
Expected Behaviour
Diagnostics should always be performed on the current version of a module that is on disk.
Actual Behaviour
When switching between two different ways of structuring the same module as described in the title, diagnostics can populate the Problems panel in VS Code with information about the version of the module that was on-disk before switching using a mechanism such as git checkout <branch>
Reproduction steps
- Make sure
Runtime Pathincludes?.lua;?/init.lua - Create a module at
foo.lua, populate it with working Lua code. - Create a new
gitbranch - Refactor
foo.luatofoo/init.lua - Various diagnostics will show up in the VS Code Problems Panel, such as duplicate definitions, missing annotations, etc. It almost looks like the LSP is trying to process both files at the same time.
Additional Notes
No response
Log File
I won't be able to provide logs as this is a proprietary codebase. Apologies.
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Tái hiện vấn đề với Runtime Path được đặt thành ?.lua;?/init.lua bằng cách chuyển một nhánh git từ foo.lua sang foo/init.lua, sau đó kiểm tra bảng VS Code Problems để tìm các chẩn đoán từ bố cục module trước đó. So sánh các chẩn đoán với các tệp hiện tại trên đĩa; hoàn tất khi sau khi chuyển nhánh, chỉ cấu trúc module hiện tại được phân tích.
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, vscode
- Lĩnh vực
- 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