about summary refs log tree commit diff
path: root/tvix/nix-compat/src/nar (follow)
AgeCommit message (Collapse)AuthorFilesLines
2023-10-18 r/6852 docs(tvix/nix-compat/nar): document the wire formatedef1-2/+66
Change-Id: I6c8e23bad27fa6ada1b8973482b4d99190cf050d Reviewed-on: https://cl.tvl.fyi/c/depot/+/9767 Tested-by: BuildkiteCI Reviewed-by: flokli <flokli@flokli.de> Reviewed-by: raitobezarius <tvl@lahfa.xyz>
2023-10-10 r/6768 feat(tvix/nix-compat): add nar::writer::asyncedef2-0/+239
Change-Id: Ib962f889836659fd278beec461ee329b00e64ea5 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9615 Autosubmit: edef <edef@edef.eu> Reviewed-by: flokli <flokli@flokli.de> Tested-by: BuildkiteCI
2023-10-10 r/6767 refactor(tvix/nix-compat): move nar::writer to nar::writer::syncedef2-223/+227
This is preparation for adding an async port. Change-Id: Id638ec1f6f46e2f3935448184eed51e2233263fe Reviewed-on: https://cl.tvl.fyi/c/depot/+/9618 Tested-by: BuildkiteCI Autosubmit: edef <edef@edef.eu> Reviewed-by: flokli <flokli@flokli.de>
2023-10-10 r/6766 fix(tvix/nix-compat): clean up the debug assertions a bitedef1-12/+11
Consistent error messages, and slightly nicer code layout. We avoid printing the input data, since we primarily want to point out the specific violated invariant. In the one place where we do want to, we use BStr's Debug implementation, since byte slices don't print nicely. Change-Id: I3a9a0c37be270ea5f16cf124922c254608fb849e Reviewed-on: https://cl.tvl.fyi/c/depot/+/9617 Tested-by: BuildkiteCI Reviewed-by: flokli <flokli@flokli.de> Autosubmit: edef <edef@edef.eu>
2023-10-09 r/6754 docs(tvix/nix-compat): mention Directory::close on Node::directoryedef1-0/+3
Change-Id: I19e6a3b63eb1b1609b96544b2529d71234bcb13b Reviewed-on: https://cl.tvl.fyi/c/depot/+/9613 Reviewed-by: flokli <flokli@flokli.de> Autosubmit: edef <edef@edef.eu> Tested-by: BuildkiteCI
2023-10-09 r/6753 docs(tvix/nix-compat): document the name ordering requirementedef1-0/+4
Change-Id: Ia2c5f0b357a23d4bfac1fd52cf01845c78ebfa22 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9612 Autosubmit: edef <edef@edef.eu> Tested-by: BuildkiteCI Reviewed-by: flokli <flokli@flokli.de>
2023-10-09 r/6752 fix(tvix/nix-compat): don't transiently allocate namesedef1-1/+1
The point of clearing and reusing the same Vec is to avoid transiently allocating for every directory entry. This was lost in cl/8974 when we switched from String to Vec<u8>. Change-Id: I65647e5c4e54e88f1fe45e9a752cb5154d98fb33 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9607 Autosubmit: edef <edef@edef.eu> Reviewed-by: flokli <flokli@flokli.de> Tested-by: BuildkiteCI
2023-09-21 r/6623 refactor(tvix/store): Asyncify PathInfoService and DirectoryServiceConnor Brewster1-1/+1
We've decided to asyncify all of the services to reduce some of the pains going back and for between sync<->async. The end goal will be for all the tvix-store internals to be async and then expose a sync interface for things like tvix eval io. Change-Id: I97c71f8db1d05a38bd8f625df5087d565705d52d Reviewed-on: https://cl.tvl.fyi/c/depot/+/9369 Autosubmit: Connor Brewster <cbrewster@hey.com> Tested-by: BuildkiteCI Reviewed-by: flokli <flokli@flokli.de>
2023-07-21 r/6436 refactor(tvix/store): use bytes for node names and symlink targetsFlorian Klink1-13/+14
Some paths might use names that are not valid UTF-8. We should be able to represent them. We don't actually need to touch the PathInfo structures, as they need to represent StorePaths, which come with their own harder restrictions, which can't encode non-UTF8 data. While this doesn't change any of the wire format of the gRPC messages, it does however change the interface of tvix_eval::EvalIO - its read_dir() method does now return a list of Vec<u8>, rather than SmolStr. Maybe this should be OsString instead? Change-Id: I821016d9a58ec441ee081b0b9f01c9240723af0b Reviewed-on: https://cl.tvl.fyi/c/depot/+/8974 Autosubmit: flokli <flokli@flokli.de> Reviewed-by: raitobezarius <tvl@lahfa.xyz> Tested-by: BuildkiteCI
2023-05-10 r/6129 feat(tvix/nix-compat/nar/writer): check for more data in readerFlorian Klink1-1/+14
We already returned UnexpectedEof in case the reader stopped returning bytes too early, but similarly we should also fail if there's still bytes left to be read in the reader passed. We normally use the NAR writer to produce new NAR files, so the readers point to the blobs we actually want to render, and having some data left in there should be an error. If for some reason the reader points to more data than just the blob, the `.take` method can be used to limit it to the (known) size. Change-Id: I9e8fa0a6dd9c794492abb6dc9e55995e619cb3bb Reviewed-on: https://cl.tvl.fyi/c/depot/+/8553 Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su>
2023-01-31 r/5793 refactor(tvix/nix-compat): absorb nar writerFlorian Klink3-0/+253
Expose it at `nix_compat::nar::writer`. Change-Id: I98a8acfa6277074f24608d64fb6c0082b41d10f5 Reviewed-on: https://cl.tvl.fyi/c/depot/+/7969 Autosubmit: flokli <flokli@flokli.de> Reviewed-by: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI