hyperweb-io / hyperweb-io/ts-codegen

query and execute messages with same name creates collisions

Abierto
#26 3 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
TypeScript
Estrellas
126
Forks
31
Merge medio
19 min
PR fusionados (30 d)
2

Descripción

Currently we're generating two TS clients as classes with the codegen: one class that is readonly for the queries, and a 2nd that extends via inheritance this class for the execute messages. This essentially means the names currently must be unique.

The issue is that if you have an identical method name on a query and execute, you end up with a naming collision.

One idea is to potentially come up with a recommended convention to keep names unique across queries/executes, This does make some sense, but some have brought up a good point that it is sub-optimal to put constraints on contract message naming.

the current "fix" is to not create name collisions between query and execute messages: https://github.com/DA0-DA0/dao-contracts/issues/369

However, the question remains, should we build a way to split clients into two instead of using inheritance where all contract names are unique?

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Línea de trabajo

No files or tests are named. Start by tracing the generated readonly query client and inherited execute client, then examine the identical-name collision described; done requires an agreed approach for allowing identical query and execute names without collisions.

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

Evaluación

Stack tecnológico
typescript
Área
tooling
Tipo de issue
Nueva funcionalidad
Dificultad
5/5
Tiempo estimado
Más de una semana
Estado de actividad
Estancado
Claridad
Necesita aclaración
Aptitud para principiantes
25/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.