PowerShell / PowerShell/PowerShellEditorServices

Investigate using LanguagePrimitives.ConvertTo rather than the converter attribute

オープン
#1,579 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

Area-Debugging Issue-Enhancement
主要言語
C#
スター
767
フォーク
266
平均マージ
3日 16時間
マージ済み PR(30日)
1

説明

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...

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず、src/PowerShellEditorServices/Services/DebugAdapter/DebugService.cs の 489-522 行にある変換処理を読み、特に EngineIntrinsics と pipeline-thread の使用に注目します。その経路を、既知のターゲット型に対する LanguagePrimitives.ConvertTo() と比較します。変換によって pipeline-thread での実行を回避できるかどうかを明らかにし、実行可能なアプローチを文書化または実装できれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
csharp, powershell
領域
devtools
issue の種類
リファクタリング
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。