PowerShell / PowerShell/PowerShellEditorServices
Bring launch sequencing in line with DAP spec
まだ誰も着手していません。
- 主要言語
- C#
- スター
- 767
- フォーク
- 266
- 平均マージ
- 3日 16時間
- マージ済み PR(30日)
- 1
説明
Prerequisites
- I have written a descriptive issue title.
- I have searched all issues to ensure it has not already been requested.
Summary
Currently, our DAP conversation doesn't follow the spec explicitly in terms of conversation.
What is supposed to happen:
- Initialize is sent and server responds, then responds with capabilities
- Launch is sent by client after receiving capabilities. should be held and deferred until configurationDone
- Server sends initialized event (preferably when ready to receive launch requests)
- Client does config after initialized
- Configuration is done (breakpoints etc.)
- launch request is now responded to after configuration is completed
In actuality, we respond to the launch request immediately before configuration
The spec states:
Once the debug adapter is ready to receive configuration from the client, it sends an initialized event to the client. As described above, the client sends zero or more configuration-related requests before sending a configurationDone request.
After the response to configurationDone is sent, the debug adapter may respond to the launch or attach request, and then the debug session has started.
Proposed Design
We need to hold the launch response until after configurationDone is completed. Fixing this would likely be part of a larger refactor to fix the odd behavior of scripts being started directly within configurationDone handler, rather than configurationDone triggering an event or otherwise to start/release any pending launch messages.
As part of this, because the spec currently does not allow multiplexing requests over a single adapter channel, the launch/attach should singleton and throw an error if any additional launch/attach requests are made until the existing one completes.
Implementation Idea
When a launch task is started, a TaskCompletionSource or otherwise should be started and awaited, and the configurationDone handler will complete that task, enabling the launch task to resume and return its startup response.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、DAP の launch/attach および configurationDone ハンドラーを特定し、そのシーケンスを引用されている DAP 仕様と比較します。現在、launch tasks と responses がどのように完了されているかを追跡します。完了とは、launch または attach の responses が configurationDone まで待機し、適切な時点で initialized が送信され、重複する launch/attach リクエストが拒否されることを意味します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- csharp
- 領域
- devtools
- issue の種類
- バグ
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100