hyperweb-io / hyperweb-io/ts-codegen

query and execute messages with same name creates collisions

Open
#26 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
126
Forks
31
Avg merge
19m
Merged PRs (30d)
2

Description

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?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.