-
Notifications
You must be signed in to change notification settings - Fork 23
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 AddStoreToNar operation #265
Comments
The current Regarding conduit - I think this can be abstracted enough so that anything goes. I'll get to this sometimes this week when I'm done with the protocol stuff. |
The current
|
I have some partial work and a failing test here: https://github.com/haskell-nix/hnix-store/compare/master...squalus:hnix-store:addtostorenar?expand=1 The initial command part is mostly there. The streaming isn't there yet. There's a loop that needs to happen where nix-daemon returns |
You're right! I've confused this with
Neat! |
Adds `setDataSource` which can be used to set a function to be polled when daemon asks for data using `Logger_Read`. Function should return `Nothing` when all data was read. `clearDataSource` should be used after the operation using the data source is finished. Related to #265
Adds `setDataSource` which can be used to set a function to be polled when daemon asks for data using `Logger_Read`. Function should return `Nothing` when all data was read. `clearDataSource` should be used after the operation using the data source is finished. Related to #265
Adds `setDataSource` which can be used to set a function to be polled when daemon asks for data using `Logger_Read`. Function should return `Nothing` when all data was read. `clearDataSource` should be used after the operation using the data source is finished. Related to #265
Adds `setDataSource` which can be used to set a function to be polled when daemon asks for data using `Logger_Read`. Function should return `Nothing` when all data was read. `clearDataSource` should be used after the operation using the data source is finished. Related to #265
I think I've unblocked this, see 57cc9e3 It is implemented in similar manner as Implementing the ops is a bit different now (but not too different!) - you need to implement both sides so QuickCheck prop can check it (also don't forget to add it to the Feel free to ask if anything is not clear, I can write a longer "guide" iff needed. |
The problem here seems to be that the op requires We could possibly be smart about this and do in-memory if dumping small stuff and go thru files for big NARs. |
For AddToStoreNar, we already need the full data size in the form of the Metadata's FramedSource itself doesn't need the full data size up front. It looks like it repeatedly reads (chunk size, bytes) pairs. The chunk size is chosen by the client. I made a PR with a passing test that uses FramedSource. |
Cool! I've read the C++ framing thing wrong and @Ericson2314 corrected me - it would be a poor framing otherwise! |
My use case is that I have a bunch of NARs and narinfos and I'd like to use hnix-store-remote to add the NARs to the Nix Store. To do this, hnix-store-remote needs to support the addToStoreNar operation. It also must not read the entire NAR into memory, since the NARs can be quite large.
I have some code that does this with
conduit
. I imagine usingByteString.Lazy
would be a better fit for this project though.addToStoreNar support was removed in #75
The text was updated successfully, but these errors were encountered: