-
Notifications
You must be signed in to change notification settings - Fork 74
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
refactor(daemon): rework power structure for easier persistence + platform abstraction #1797
Conversation
packages/daemon/src/types.d.ts
Outdated
getSha512Hex: () => Promise<string>; | ||
}>; | ||
makeHashedContentReadeableBlob: (statePath: string, sha512: string) => { | ||
stream: () => Promise<FarRef<Reader<Uint8Array>>>; |
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.
is FarRef
correct?
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 Promise<FarRef<T>>
simplifies to FarRef<T>
and it seems right to me. cc @michaelfig
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.
If you intend for stream
to be potentially remote but returned async
, then you indeed need Promise<FarRef<T>>
. If it's potentially remote but synchronously returned, you can get away with FarRef<T>
.
packages/daemon/src/types.d.ts
Outdated
getSha512Hex: () => Promise<string>; | ||
}>; | ||
makeHashedContentReadeableBlob: (statePath: string, sha512: string) => { | ||
stream: () => Promise<FarRef<Reader<Uint8Array>>>; |
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 Promise<FarRef<T>>
simplifies to FarRef<T>
and it seems right to me. cc @michaelfig
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 am feeling good about the progress in this stack. Please feel free to squash these and assign the review to me when you think it’s ready for review. I’ve made some naming suggestions. Given that the project is far from stone, I’m happy to merge progress as long as it’s in a working state (as defined by the tests and a run-through of the demo (until we have a test for that!)).
459521f
to
fc011ee
Compare
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
8249d19
to
3e10ebe
Compare
trying to abstract over