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

Docs for SKStore #246

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Docs for SKStore #246

wants to merge 1 commit into from

Conversation

pikatchu
Copy link
Contributor

First attempt to describe SKStore. Still needs some work.

Comment on lines +38 to +42
myInputDirectory.writeArray(context, myKey, Array[myValue])
```

Removing an element just consists in writing an empty array (also
called a "tomb"). There is no sematic difference between an empty
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two things here:

  • one way wonder why you may associate arrays only, not any type of values and arrays would be a special case (There is no sematic difference between an empty array and no entry gives a hint)
  • it's not obvious that writeArray is replacing and not appending (Removing an element just consists in writing an empty array gives a hint as well)

(context, writer, key, fileIterator) ~> {
values = mutable Vector[];
for(file in fileIterator) {
value = myOtherDirectory.getArray(SID::create(file.value));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
value = myOtherDirectory.getArray(SID::create(file.value));
value = myOtherDirectory.getArray(context, SID::create(file.value));

It is worth noting that this automatically records the dependency

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And the granularity of the dep record.

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

Successfully merging this pull request may close these issues.

3 participants