Allow registering multiple handlers for a notification

Abierto
#520 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
35/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
haskell
Área
api, devtools

Línea de trabajo

El issue no menciona archivos ni tests. Empieza localizando los puntos de entrada del registro y el dispatch de notificaciones; después, sigue cómo se almacena y se invoca un único handler. La tarea estará terminada cuando puedan coexistir varios handlers para las notificaciones, los handlers de usuario sean opcionales y el manejo de requests no cambie; añade cobertura para ambos casos.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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!

Lenguaje dominante
Haskell
Estrellas
426
Forks
107
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de haskell/lsp

Todos los issues de haskell/lsp

Issues similares

Más issues de Haskell

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.