hyperweb-io / hyperweb-io/ts-codegen
query and execute messages with same name creates collisions
- Vorherrschende Sprache
- TypeScript
- Sterne
- 126
- Forks
- 31
- Ø Merge
- 19 Min.
- Gemergte PRs (30 T.)
- 2
Beschreibung
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?
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- typescript
- Bereich
- tooling
- Issue-Typ
- Feature
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 25/100