PowerShell / PowerShell/PowerShellEditorServices

Investigate using LanguagePrimitives.ConvertTo rather than the converter attribute

Đang mở
#1,579 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.

Area-Debugging Issue-Enhancement
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ả

In the debugger code we currently go to great lengths to find and execute a type conversion attribute on variables:

https://github.com/PowerShell/PowerShellEditorServices/blob/f9bde73000a6e2a8ebfc721d675dcb1c60316092/src/PowerShellEditorServices/Services/DebugAdapter/DebugService.cs#L489-L522

Most of this can't be avoided, but one thing we do here is use the EngineIntrinsics value to execute the conversion attribute on the pipeline thread, which means we need to contend for and wait on a pipeline thread execution.

Instead of this, we could maybe call LanguagePrimitives.ConvertTo() with the known target type and ideally not need to use the pipeline thread.

This might not be possible, but is worth investigating...

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 đọc phần xử lý chuyển đổi trong src/PowerShellEditorServices/Services/DebugAdapter/DebugService.cs tại các dòng 489-522, đặc biệt là việc sử dụng EngineIntrinsics và pipeline-thread. So sánh đường đi đó với LanguagePrimitives.ConvertTo() cho kiểu đích đã biết. Được xem là hoàn tất khi xác định được liệu việc chuyển đổi có thể tránh thực thi trên pipeline-thread hay không và cách tiếp cận khả thi được ghi lại hoặc triển khai.

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
Lĩnh vực
devtools
Loại issue
Tái cấu trúc
Độ 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.