PowerShell / PowerShell/PowerShellEditorServices

Debugger relies on case-insensitive paths

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

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

Area-Debugging Issue-Bug
Ngôn ngữ chính
C#
Star
767
Fork
266
Merge trung bình
3 ngày 16 giờ
Pull request đã merge (30 ngày)
1

Mô tả

This odd behavior was first noticed in a test:

https://github.com/PowerShell/PowerShellEditorServices/blob/bfe334df7e4bdd4b92c5c0319655e40444e185ff/test/PowerShellEditorServices.Test/Debugging/DebugServiceTests.cs#L140-L141

It turns out that the URIs and paths we're receiving "over the wire" (in the raw LSP requests themselves) are mostly cased correctly, with the exception of driver letters being lower case. Because of this, when https://github.com/PowerShell/PowerShell/issues/20057 was temporarily fixed by making PowerShell's debugger's _pendingBreakpoints collection case-sensitive, it broke the extension's debugger https://github.com/PowerShell/vscode-powershell/issues/4668.

We need to figure out why those drive letters are coming over lower-case, as the rest of the Windows ecosystem doesn't expect drive letters to be lowercase. Worst case scenario is that we fix the casing as we handle the request, but I'd like to see where the issue originates (thinking perhaps in the LSP client library...) and try to fix it there. Though technically c:/ is valid, and it's mostly PowerShell that's caring about it not being C:/.

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 với test/PowerShellEditorServices.Test/Debugging/DebugServiceTests.cs tại khoảng dòng 140-141 và tái hiện hành vi viết hoa/viết thường. Theo dõi cách các yêu cầu LSP thô và các đường dẫn có ký tự ổ đĩa được xử lý, bao gồm cả thư viện máy khách LSP được tham chiếu. Hoàn tất khi đã xác định được nguồn gốc của các ký tự ổ đĩa bị chuyển thành chữ thường và hành vi của trình gỡ lỗi được bao phủ bằng một kiểm thử hồi quy hoặc một bản sửa phù hợ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ệ
csharp, powershell, vscode
Lĩnh vực
devtools, tooling
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.