about summary refs log tree commit diff
path: root/tvix/eval/docs (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
7 hours r/8094 feat(nix-compat/wire/bytes): read bytes into an existing bufferedef1-1/+60
For small bytestrings (like NAR names), we can read into a preallocated fixed-size buffer, instead of allocating a Vec every time. Change-Id: Id8da9e9cea99c814361230c0ec02606b731c79a3 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11606 Tested-by: BuildkiteCI Reviewed-by: flokli <flokli@flokli.de>
9 hours r/8093 feat(tools/when): support more timestamps with better merging logicVincent Ambo1-15/+72
Adds a FieldSet type which defines which parts of a timestamp to merge into another in a new `mergeTime` function. With this two timestamps can be merged granularly, enabling more queries like `Sep 03 18:00` to return useful results (e.g., in this case, in the current year and location). Change-Id: I8db161608c5f68c8f9c61de8c6fa46067eced39b Reviewed-on: https://cl.tvl.fyi/c/depot/+/11601 Autosubmit: tazjin <tazjin@tvl.su> Reviewed-by: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI
9 hours r/8092 feat(tools/when): try to parse input as one segment firstVincent Ambo1-0/+8
Before getting clever about durations & stuff, try to parse the whole thing at once. This is useful for plain timestamps that contain spaces, like `2024-01-01 15:00:01` for example. Change-Id: I50b0ee8488c153b4e6db75abaea409d55c0b92d6 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11600 Reviewed-by: tazjin <tazjin@tvl.su> Autosubmit: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI
9 hours r/8091 feat(tazjin/nixos): install `when` everywhereVincent Ambo1-0/+1
Change-Id: I49f201250cbcbba98e0641c2868e1cb2230d6b3b Reviewed-on: https://cl.tvl.fyi/c/depot/+/11599 Reviewed-by: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI Autosubmit: tazjin <tazjin@tvl.su>
9 hours r/8090 feat(tools/when): simple time-conversion toolVincent Ambo2-0/+147
I often need unix timestamps, or have unix timestamps, or need timestamps at certain relative offsets etc. This adds a tool called `when` which can do all of this. It has basically no user interface, you just call it with a time query and it does it if it understands what you meant. This will get smarter over time as I find more uses. Example: ~> when yesterday 5PM Local: Mon 06 May 2024 at 17:00:00 MSK UTC: 2024-05-06T14:00:00Z UNIX: 1715004000 It supports all kinds of queries already, see the usage for details. Change-Id: I694ffef7608586acfb1ff8010ac0fac4d9951e2e Reviewed-on: https://cl.tvl.fyi/c/depot/+/11598 Tested-by: BuildkiteCI Autosubmit: tazjin <tazjin@tvl.su> Reviewed-by: tazjin <tazjin@tvl.su>
12 hours r/8089 chore(tvix/tools/crunch-v2): upgrade tokioedef2-5/+20
This drops the Sized requirement on AsyncReadExt. Change-Id: I2a89c708922ca528cb493aefd0613f477f648e83 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11608 Reviewed-by: edef <edef@edef.eu> Tested-by: BuildkiteCI
14 hours r/8088 refactor(nix-compat/wire/bytes): style fixesedef1-13/+10
Change-Id: I65c3c43df83e0c364a4b7f1f3054c5b676bd07d5 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11605 Reviewed-by: flokli <flokli@flokli.de> Tested-by: BuildkiteCI
14 hours r/8087 fix(nix-compat/store_path): use Box<str>edef1-8/+5
We don't actually build up names in place here, so we don't need a capacity field. Saves 8 bytes. Change-Id: Icb01b45561e28fd525b726612f56d4640bc834c7 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11604 Reviewed-by: flokli <flokli@flokli.de> Tested-by: BuildkiteCI
16 hours r/8086 feat(nix-compat/wire/bytes/reader): support buffered readingedef3-6/+195
If our underlying reader supports AsyncBufRead, then we can too. Change-Id: If4b948c983400ca591c1c475bbcf7dc00d562040 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11545 Reviewed-by: flokli <flokli@flokli.de> Tested-by: BuildkiteCI
18 hours r/8085 fix(nix-compat/wire/bytes/reader): always read trailer tag dataedef3-16/+73
Even if we have an aligned (or zero) size (and thus have no padding), we may still have a non-padding trailer. Since an exact read of only the user data bytes must always read the trailer bytes as well, this has to happen for aligned sizes too. For zero-sized trailers, we solve this by reading immediately, since no read is required of the user at all. user_len thus becomes a NonZeroU64, and the definition of "body data" is adjusted to always exclude the final block. Change-Id: I2c6bb51270fb22ad72a65076a3468673ab56ef68 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11597 Reviewed-by: flokli <flokli@flokli.de> Tested-by: BuildkiteCI
18 hours r/8084 fix(nix-compat/wire/bytes/reader): drop allow(dead_code)edef1-1/+0
We're using this in the NAR reader now. Change-Id: I28f17b1ccedd62ffcaf2fa32b517f16bcd036d94 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11603 Tested-by: BuildkiteCI Reviewed-by: flokli <flokli@flokli.de>
18 hours r/8083 refactor(nix-compat/wire/bytes/reader): drop prev_fillededef1-2/+1
We specifically structured the code this way to allow using `this.filled` as-is, so we should use it. Change-Id: I7e11bddceb4d5f37b1dd4c453a9d53b85fc1f6c8 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11602 Tested-by: BuildkiteCI Reviewed-by: flokli <flokli@flokli.de>
2 days r/8082 refactor(tvix): remove usage of async-recursionConnor Brewster8-68/+19
Rust 1.77 supports async recursion as long as there is some form of indirection (ie. `Box::pin`). This removes the need to use the async-recursion crate. Change-Id: Ic9613ab7f32016f0103032a861edff92e2fb8b41 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11596 Reviewed-by: flokli <flokli@flokli.de> Autosubmit: Connor Brewster <cbrewster@hey.com> Tested-by: BuildkiteCI
2 days r/8081 fix(tvix/store/pathinfo/nix_http): update error messageFlorian Klink1-1/+1
Autosubmit was too fast and submitted this before my push went through. Flagged in https://cl.tvl.fyi/c/depot/+/11580/comment/40a56824_7be73334/ Change-Id: I1f835ae60c2c6fd2db6654c1b1c71d90bee141af Reviewed-on: https://cl.tvl.fyi/c/depot/+/11595 Autosubmit: flokli <flokli@flokli.de> Reviewed-by: Connor Brewster <cbrewster@hey.com> Tested-by: BuildkiteCI
2 days r/8080 feat(tvix/store): use async nar reader for ingest_narFlorian Klink7-351/+212
Rename read_nar to ingest_nar, and have it use the async nar reader version, and the ingest_entries machinery. This means we can now drop all code dealing with manually assembling castore nodes. Update our consumer, NixHTTPPathInfoService to use the new API. As we now accept an AsyncRead, we don't need to do any blocking here anymore, and can use the same async-compression crate as in the fetching logic (and support some more compression formats out of the box). Change-Id: I8646d20bd8603f8da47b5c84bc9e4ac236eb7f1a Reviewed-on: https://cl.tvl.fyi/c/depot/+/11580 Tested-by: BuildkiteCI Autosubmit: flokli <flokli@flokli.de> Reviewed-by: Connor Brewster <cbrewster@hey.com>
2 days r/8079 test(tvix-castore/import): add tests for ingest_entriesFlorian Klink1-3/+138
Change-Id: Ia7906533868fd948509419e0d64b64582575a7fa Reviewed-on: https://cl.tvl.fyi/c/depot/+/11591 Tested-by: BuildkiteCI Autosubmit: flokli <flokli@flokli.de> Reviewed-by: Connor Brewster <cbrewster@hey.com>
2 days r/8078 fix(tvix/castore/import): assert end of streamFlorian Klink1-0/+5
Once we break out with the root node, there may be no more elements in the stream. Change-Id: I6f5fc5662095aa2b2a56bcad506d25520d9ad00c Reviewed-on: https://cl.tvl.fyi/c/depot/+/11592 Reviewed-by: Connor Brewster <cbrewster@hey.com> Tested-by: BuildkiteCI Autosubmit: flokli <flokli@flokli.de>
2 days r/8077 fix(tvix/castore/import): deal with entry.path() not having a parentFlorian Klink1-7/+9
We got away with not properly dealing with this for the archive case, where everything is contained inside a toplevel dir, but NARs can encode a single file/symlink. Properly break if the IngestionEntry path has the ROOT as parent, and only create filling directories in the other