Allow registering multiple handlers for a notification

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

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

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
haskell
領域
api, devtools

調査の方向性

この issue にはファイルもテストも記載されていません。まず通知の登録と dispatch のエントリーポイントを見つけ、次に単一の handler がどのように保存され、呼び出されるかを追跡してください。通知に対して複数の handler が共存でき、ユーザー handler が任意であり、request の処理が変更されないことが完了条件です。両方のケースのカバレッジを追加してください。

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

説明

good first issue v3 ZuriHac

At the moment we only allow one handler per method. This is partly because it's unclear how we could respond to a request if we have multiple handlers (HLS has stuff to allow that, but it's complicated and I don't think we want it in here). But it's perfectly fine to have multiple handlers for a notification.

This would simplify part of our processing system. At the moment we intercept certain notifications in order to update our state before then calling the registered handler. But if we could have multiple handlers, then we could just install our own handler to update our state, and have it coexist with any user-provided handlers.

This would also simplify the situation if the user doesn't want to respond to those notifications. At the moment, they need to install a (possibly-empty) handler, otherwise they get errors about there being no handler!

主要言語
Haskell
スター
426
フォーク
107
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

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

haskell/lsp のほかの issue

haskell/lsp の issue をすべて見る

似ている issue

Haskell の issue をもっと見る

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

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