hyperweb-io / hyperweb-io/ts-codegen
query and execute messages with same name creates collisions
- Lingua principale
- TypeScript
- Stelle
- 126
- Fork
- 31
- Merge medio
- 19m
- PR unite (30g)
- 2
Descrizione
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?
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- typescript
- Ambito
- tooling
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 25/100