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

How to track names uniqueness? #556

Closed
artalar opened this issue Apr 23, 2023 · 2 comments
Closed

How to track names uniqueness? #556

artalar opened this issue Apr 23, 2023 · 2 comments

Comments

@artalar
Copy link
Owner

artalar commented Apr 23, 2023

One of the main priority of Reatom is the best debug experience. A state management hard as itself and it is important to think about this as a default feature, which should be integrated in all other features.

One of the important and difficult by default feature of debuggability is a state identification. We should provide reach (sound) names for all atoms and actions, but how to grant their uniqueness?

We need a tool to validate atoms and actions names uniqueness. It easy to implement - just parse logs (ctx.subscribe(logs => ...)) and throw an error, if some name (log.proto.name) is doubled. A couple important notes:

  • to prevent memory leaks we should use Map<string, AtomProto> (string is a name) AND FinalizationRegistry
  • we have a conversion that dynamically created names includes #${id} pattern - this kind of atoms could be doubled 🤔
@BANOnotIT
Copy link
Collaborator

#493

@BANOnotIT BANOnotIT mentioned this issue Apr 23, 2023
Closed
22 tasks
@artalar
Copy link
Owner Author

artalar commented May 19, 2024

We don't need that. Eslint with domain handling should be enoght.

@artalar artalar closed this as completed May 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants