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

Continuum: URIs are not unique #3

Open
ybakos opened this issue Nov 4, 2020 · 0 comments
Open

Continuum: URIs are not unique #3

ybakos opened this issue Nov 4, 2020 · 0 comments

Comments

@ybakos
Copy link
Owner

ybakos commented Nov 4, 2020

When storing new information via Rhizome#store, the Rhizome delegates to Continuum#store. The Continuum creates a Uri using the default constructor, Uri(). Because == between two Uri objects is based on the hashCode of the toString representation of a Uri, just using distinct default Uri objects does not create unique Uris for each newly-created Thing.

This results in the Continuum's hashtable to overwrite the Thing value associated with the Uri key. It also probably fucks up the index in the Repertory.

Soooo... time to focus on Uris for each Thing in the system, to ensure that they are, somehow, unique.

void main() {
  final u1 = Uri();
  final u2 = Uri();
  print(u1 == u2); // true
}
ybakos added a commit that referenced this issue Nov 5, 2020
Uris need to, ultimately, be unique, but Continuum creates default
Uri objects which are value-equivalent in Dart.

As an initial solution for text information, use the information
to create a unique Uri.

References #3.
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

1 participant