Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Randomly generate names #1080

Open
jasonkuhrt opened this issue Sep 11, 2024 · 1 comment
Open

Randomly generate names #1080

jasonkuhrt opened this issue Sep 11, 2024 · 1 comment

Comments

@jasonkuhrt
Copy link
Member

Perceived Problem

Currently it is required to use --name when multiple clients are being used. Requires more effort from the user.

Ideas / Proposed Solution(s)

  • Have a default that is a randomly generated identifier of schema<unixTimestamp>.
  • Giving a name will override this still
  • The benefit is that now a user can generate one client after another and only have to think about the different directories they will be stored in.
  • When using the default randomly generated name the exported namespace should not be altered meaning it stays as Graffle or alternatively we get rid of the predefined namespace altogether.
@jasonkuhrt jasonkuhrt added this to the 8 milestone Sep 11, 2024
@jasonkuhrt jasonkuhrt pinned this issue Sep 16, 2024
@jasonkuhrt jasonkuhrt unpinned this issue Sep 27, 2024
@jasonkuhrt
Copy link
Member Author

A downside of random default is that it breaks the default connection between the static library and generated. If that pattern makes up vast majority, then default random seems to make things worse not better.

Perhaps what we could do is default to finding the first key in the interface... Keys are not ordered though and the TS for this is ugly (key of and then turn the union into a tuple and then select the first one). If we can find a simple dynamic lookup solution though then maybe this becomes feasible.

Note: even with a dynamic default, it could still begin by looking for default and only after do a general search for "anything".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant