🐞 Language Server Requests Should Timeout
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 25/100
Hướng nghiên cứu
Bắt đầu bằng cách xác định phần xử lý yêu cầu language server và tắt trong CodeEdit, sau đó tái hiện vấn đề bằng binary sourcekit-lsp được cung cấp trong Xcode 16. Xác định hành vi timeout cho các yêu cầu thông thường, chạy dài và tức thời; hoàn thành có nghĩa là các yêu cầu không còn chờ vô thời hạn và trường hợp thoát cho phép thoát.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Description
There is a chance that language servers (maliciously or due to a bug) may not respond to requests made by the client (CodeEdit). This can cause problems, for example:
- Memory build up as syntax token requests pile up with no responses.
- App refusing to quit before the language server exits, but the language server does not respond to the
exitmessage. - UI hanging forever after a request (eg for a definition search).
In each of these cases one solution would be to time out the request. I think our LSP requests should have a default timeout length.
This has the caveat for requests that may take a long time. Those requests will need to be overridable so they can take longer. The same goes for requests that need immediate response (like the exit message), which will need to be shorter.
To Reproduce
The sourcekit-lsp binary that ships with Xcode 16 is bugged, and will not respond to the exit message. This leaves CodeEdit hanging when quitting the app and requires a force quit.
The same LSP does not respond to semantic token requests (despite declaring the capability, this is a bug with sourcekit-lsp). This may cause cached request handlers to build up over time.
Expected Behavior
Each language server request should have a timeout parameter. This likely means creating a new LanguageServer connection type that passes messages through to another type, but provides a timeout handler for requests. This may be something we can contribute back to the LanguageServer package.
Version Information
CodeEdit: 0.3.3
Additional Context
No response
Screenshots
No response
- Ngôn ngữ chính
- Swift
- Star
- 23k
- Fork
- 1.2k
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
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.
Issue khác của CodeEditApp/CodeEdit
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
CodeEditApp/CodeEdit#2190 ·
-
Is this project dead? Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 15/100
CodeEditApp/CodeEdit#2195 · 5 reaction ·
-
enhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
CodeEditApp/CodeEdit#2185 ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
CodeEditApp/CodeEdit#2181 ·
-
creashes on starting Đang mởbug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
CodeEditApp/CodeEdit#2180 ·
Tất cả issue của CodeEditApp/CodeEdit
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
manaflow-ai/cmux#13763 ·
-
type: feature request
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
googleapis/google-cloud-swift#1036 · 1 bình luận ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
wultra/mtoken-sdk-ios#253 ·
-
The correction-threshold rationale says 17 restraint cases collide; the current corpus has 16 Đang mởarea:dictation documentation P2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
uttrflow/uttrflow-swift#1180 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100