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

Hash collisions #14

Closed
ayebear opened this issue Jan 30, 2017 · 1 comment
Closed

Hash collisions #14

ayebear opened this issue Jan 30, 2017 · 1 comment
Assignees
Labels

Comments

@ayebear
Copy link
Owner

ayebear commented Jan 30, 2017

Using the following component names: "A", "B", "A:B", the queries will break and mix the results of entities with A and B components with those of A:B components.

Possible solutions:

  • Detect component names with ":", make them invalid and throw an error
  • Escape the ":" characters with a backslash - then backslashes would have to be escaped as well
  • Use a numeric hash format instead. Each new unique group of components would increment an integer. Or, each component type would double in size and act as a single positional bit, to efficiently allow any combination of components. Might start running into issues with 32 or 64 components though.
@ayebear ayebear added the bug label Jan 30, 2017
@ayebear ayebear self-assigned this Jan 30, 2017
@ayebear
Copy link
Owner Author

ayebear commented Apr 5, 2018

Can fix this and all edge cases with JSON.stringify().

@ayebear ayebear mentioned this issue Apr 5, 2018
@ayebear ayebear closed this as completed Apr 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant