Allow registering multiple handlers for a notification

Đang mở
#520 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.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
35/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
haskell
Lĩnh vực
api, devtools

Hướng nghiên cứu

Issue không nêu tệp hay test nào. Hãy bắt đầu bằng cách xác định các điểm vào của việc đăng ký và dispatch notification, sau đó theo dõi cách một handler duy nhất được lưu trữ và gọi. Hoàn thành nghĩa là có thể cùng tồn tại nhiều handler cho notification, handler của người dùng là tùy chọn và việc xử lý request vẫn không thay đổi; hãy bổ sung coverage cho cả hai trường hợp.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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!

Ngôn ngữ chính
Haskell
Star
426
Fork
107
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

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.

Issue khác của haskell/lsp

Tất cả issue của haskell/lsp

Issue tương tự

Thêm issue về Haskell

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.