LuaLS / LuaLS/lua-language-server

Annotation warnings are bleeding over from other workspaces

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

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

Info Needed
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?

Windows

What is the issue affecting?

Annotations, Diagnostics/Syntax Checking

Expected Behaviour

Annotation warning from another workspace do not show up in the current workspace.

Actual Behaviour

Workspace structure is as follows

\Projects
  -- Annotations (separate workspace, VS Code has setting "Lua.workspace.library" referencing this folder)
  -- Project 1 (separate workspace)

Annotations are over 100 files defining the API surface of a hosting program. In the workspace for the annotations, the diagnostic for missing-return is turned off for that workspace. This is to allow for the annotation of methods on the API via function nomenclature. Naturally, these functions do not have any implementation and the diagnostic warning appears.

When the annotations are referenced (---@type) in another project workspace (e.g., Project 1 above), these diagnostic warnings can appear in the workspace for Project 1. Clicking the warning in the Problems area to open the file and then closing the file dismisses the warnings for that file.

Reproduction steps

There are no specific "steps" to recreate this problem.

Additional Notes

No response

Log File

file_e%3A_Games_RedGuides_MacroQuest_lua_FightForge.zip

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

Mở hướng dẫn đóng góp

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 bằng cách kiểm tra log đính kèm và tái hiện bố cục được mô tả với một Annotations workspace được tham chiếu thông qua Lua.workspace.library và một workspace Project 1 riêng biệt. Truy tìm lý do các chẩn đoán về giá trị trả về bị thiếu vượt qua ranh giới workspace; hoàn tất khi các cảnh báo bị tắt trong Annotations workspace không xuất hiện trong Project 1 mà không yêu cầu mở rồi đóng tệp.

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
Cần làm rõ
Mức phù hợp với người mới
25/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.