-
Notifications
You must be signed in to change notification settings - Fork 215
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
Implement multifaceted virtual objects #4742
Conversation
43c7d08
to
2f50f8a
Compare
Probably worth calling out for the record one small change to the code as implemented from the implementation design in #3834: this implementation uses a different separator character (in this case, comma) between the main portion of the vref and the facet identifier than the separator character (slash) between the base kind vref and the instance identifier. The design proposed the new multi-facet virtual objects would get |
2f50f8a
to
838a7c7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I reviewed what I understood. But even after it looks good to me, you should get @warner's approval before merging. There too much I simply cannot evaluate.
838a7c7
to
c85e18b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm submitting a partial review to start the discussion, I'll re-request myself for review and continue the process tomorrow. I've only gotten as far as virtualReferences.js
.
|
||
Additional important details: | ||
|
||
- The set of state properties is fully determined by the `init` function. That is, the set of properties that exist on `state` is completely determined by the enumerable properties of the object that `init` returns. State properties cannot thereafter be added or removed. | ||
- The set of state properties of an instance is fully determined by the `init` function. That is, the set of properties that exist on `state` is completely determined by the enumerable properties of the object that `init` returns. State properties cannot thereafter be added or removed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we mention (maybe with a TODO) that this set might vary between instances? Or that init()
"SHOULD" return the same set of properties for all instances, even though maybe we don't catch this yet, and that a future implementation will be strict about enforcing it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need to make a decision whether we are even going to allow init
functions to return different object shapes within a kind.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, but I think we have opinions (we're in favor of fixed-shape, because give us more flexibility to make a real DB schema, right?), so we should make it clear that authors ought to use a fixed shape, even if we aren't enforcing it yet. "All instances of a given kind ought to have the same set of properties" might be enough.
Hi @FUDCo I asked myself for another review. Please don't squash any further changes yet. |
c85e18b
to
deeab24
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- cohort record needs retention
- type naming comments
|
||
Additional important details: | ||
|
||
- The set of state properties is fully determined by the `init` function. That is, the set of properties that exist on `state` is completely determined by the enumerable properties of the object that `init` returns. State properties cannot thereafter be added or removed. | ||
- The set of state properties of an instance is fully determined by the `init` function. That is, the set of properties that exist on `state` is completely determined by the enumerable properties of the object that `init` returns. State properties cannot thereafter be added or removed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, but I think we have opinions (we're in favor of fixed-shape, because give us more flexibility to make a real DB schema, right?), so we should make it clear that authors ought to use a fixed shape, even if we aren't enforcing it yet. "All instances of a given kind ought to have the same set of properties" might be enough.
cd6ca3a
to
e090593
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ceaseRecognition
needs discussion, the rest is minor, we can land once we figure out that one.
My remaining requested changes are cosmetic: comments and assert description strings. Feel free to land after you've added those (and rebased/squashed/etc). @erights said he was satisfied but his review says "Changes requested", so I'm going to dismiss his review so it won't prevent you from landing this (and so we don't have to bother him with a re-review request). |
@erights said he was satisified in the comment
e090593
to
a644780
Compare
a644780
to
0696866
Compare
These changes implement the multifaceted virtual objects API per our current design.
Closes #3834