about summary refs log tree commit diff
path: root/tvix/eval/src (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2024-01-17 r/7399 fix(tvix/eval): context-aware… `hasContext`Ryan Lahfa1-1/+1
Yes, `hasContext e` should work where `e` is a contextful strings, otherwise, it is really useless. Change-Id: I5eb071fc257217d6e8a63fe519132ebd98186696 Reviewed-on: https://cl.tvl.fyi/c/depot/+/10617 Tested-by: BuildkiteCI Reviewed-by: flokli <flokli@flokli.de>
2024-01-17 r/7398 feat(tvix/eval): move away from `test_generator` to `rstest`Ryan Lahfa4-39/+209
`test-generator` has not been updated in the past 2 years. `rstest` has not been updated in the past 5 months. This is an improvement in the maintenance state… I guess? We get also new features, it changes the name of the tests with numbers too. Change-Id: I5376104c7704f525dba7524da78daa09867cc669 Reviewed-on: https://cl.tvl.fyi/c/depot/+/10623 Tested-by: BuildkiteCI Reviewed-by: flokli <flokli@flokli.de>
2024-01-17 r/7397 chore(third_party/crate2nix): run tests in /build/sourceFlorian Klink3-0/+81
Cherry-pick of https://github.com/nix-community/crate2nix/pull/328. This should fix rstest runs inside crate2nix-generated derivations. Change-Id: I9d393768f7f764e33c5938bd8fa14bd1bb0b72e1 Reviewed-on: https://cl.tvl.fyi/c/depot/+/10650 Reviewed-by: raitobezarius <tvl@lahfa.xyz> Tested-by: BuildkiteCI
2024-01-17 r/7396 chore(third_party/patches): drop unused crate2nix patchFlorian Klink1-12/+0
Change-Id: I4adaca20a7efffc0a98d880f15fcbe9340419971 Reviewed-on: https://cl.tvl.fyi/c/depot/+/10649 Tested-by: BuildkiteCI Reviewed-by: raitobezarius <tvl@lahfa.xyz>
2024-01-16 r/7395 fix(tvix/eval): lift VM ops over Catchableedef2-115/+102
We want to handle bottoms in a consistent fashion. Previously this was handled by repetitive is_catchable checks, which were not consistently present. Change-Id: I9614c479cc6297d1f64efba22b620a26e2a96802 Reviewed-on: https://cl.tvl.fyi/c/depot/+/10485 Reviewed-by: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI
2024-01-16 r/7394 chore(3p/agenix): add target for cli atributesterni1-0/+2
Change-Id: Ib2ffff6a399f50d24efc33ab9ddfdcbabc270060 Reviewed-on: https://cl.tvl.fyi/c/depot/+/10616 Tested-by: BuildkiteCI Autosubmit: sterni <sternenseemann@systemli.org> Reviewed-by: flokli <flokli@flokli.de>
2024-01-16 r/7393 fix(tvix/cli/ci): prevent unnecessary dep on compared out/drv pathsterni1-1/+1
Change-Id: Ieab16fd5fad67a4ed0124f118aef8abbefd51cdb Reviewed-on: https://cl.tvl.fyi/c/depot/+/10646 Reviewed-by: flokli <flokli@flokli.de> Tested-by: BuildkiteCI Autosubmit: sterni <sternenseemann@systemli.org>
2024-01-16 r/7392 chore(3p/overlays): unvendor clickhousesterni3-216/+0
Change-Id: I1b8f2f7bc42ce436ece888daa5fc0ae69a454f41 Reviewed-on: https://cl.tvl.fyi/c/depot/+/10643 Autosubmit: sterni <sternenseemann@systemli.org> Tested-by: BuildkiteCI Reviewed-by: flokli <flokli@flokli.de>
2024-01-16 r/7391 chore(users/sterni/secrets): remove key of killed machinesterni4-12/+10
Change-Id: I98be0d1ad80b13b35844f29b99201dc92c91d054 Reviewed-on: https://cl.tvl.fyi/c/depot/+/10642 Tested-by: BuildkiteCI Autosubmit: sterni <sternenseemann@systemli.org> Reviewed-by: sterni <sternenseemann@systemli.org>
2024-01-16 r/7390 feat(sterni/ingeborg): add tv user for accessing media archivesterni2-0/+14
Change-Id: I8070b44b15b585e32d4939515d742a2800a2d762 Reviewed-on: https://cl.tvl.fyi/c/depot/+/10641 Reviewed-by: sterni <sternenseemann@systemli.org> Tested-by: BuildkiteCI Autosubmit: sterni <sternenseemann@systemli.org>
2024-01-16 r/7389 refactor(nix-compat): use StorePathRef for hash derivation moduloFlorian Klink4-30/+34
Rather than passing strings around, use a StorePathRef. This makes things a bit more typesafe, and more aligned with what we want to do in b/264. Change-Id: Ib7080addf27e7f1a9c8da1d8aaa66744468e3b5a Reviewed-on: https://cl.tvl.fyi/c/depot/+/10633 Tested-by: BuildkiteCI Reviewed-by: raitobezarius <tvl@lahfa.xyz>
2024-01-15 r/7388 chore(third_party/overlays): bump crate2nix to 0.13.0Florian Klink2-9/+34
We need to vendor in the package expression, as it's not possible to override cargoHash. Change-Id: Ib123647bb9b96d41f4630daa431d020f1cb8d4fa Reviewed-on: https://cl.tvl.fyi/c/depot/+/10624 Tested-by: BuildkiteCI Reviewed-by: raitobezarius <tvl@lahfa.xyz> Autosubmit: flokli <flokli@flokli.de>
2024-01-15 r/7387 feat(tvix/build): add CLI entrypointFlorian Klink4-0/+160
This starts a BuildService as a separate process, currently defaulting to the DummyBuildService. Change-Id: Ic206f00831641d3ffebaa44883b7dc053700b9ca Reviewed-on: https://cl.tvl.fyi/c/depot/+/10631 Autosubmit: flokli <flokli@flokli.de> Reviewed-by: raitobezarius <tvl@lahfa.xyz> Tested-by: BuildkiteCI
2024-01-15 r/7386 feat(tvix/build): add from_addr methodFlorian Klink5-0/+99
This allows constructing a BuildService from a URI, similar to how it's done in tvix-[ca]store. Change-Id: Ib962b329535c6c7e378ab7ac7f4dd254366497b3 Reviewed-on: https://cl.tvl.fyi/c/depot/+/10630 Tested-by: BuildkiteCI Reviewed-by: raitobezarius <tvl@lahfa.xyz> Autosubmit: flokli <flokli@flokli.de>
2024-01-15 r/7385 feat(tvix/build): add gRPC clientFlorian Klink4-1/+32
Change-Id: I0d917a9a308227b13d096def22945db917830d18 Reviewed-on: https://cl.tvl.fyi/c/depot/+/10629 Reviewed-by: raitobezarius <tvl@lahfa.xyz> Autosubmit: flokli <flokli@flokli.de> Tested-by: BuildkiteCI
2024-01-15 r/7384 feat(tvix/build): add GRPCBuildServiceWrapperFlorian Klink2-0/+39
This produces a gRPC BuildService server for anything implementing our BuildService trait. Change-Id: I59c690a432b5e1f59209fd67e2718cb8c935adf2 Reviewed-on: https://cl.tvl.fyi/c/depot/+/10628 Autosubmit: flokli <flokli@flokli.de> Reviewed-by: raitobezarius <tvl@lahfa.xyz> Tested-by: BuildkiteCI
2024-01-15 r/7383 feat(tvix/build): add BuildService traitFlorian Klink6-0/+38
Also provide a dummy implementation that just fails on any build that's requested. Change-Id: I0df743a730c5331ec9ce6e97a966abe18ce067f5 Reviewed-on: https://cl.tvl.fyi/c/depot/+/10627 Autosubmit: flokli <flokli@flokli.de> Reviewed-by: raitobezarius <tvl@lahfa.xyz> Tested-by: BuildkiteCI
2024-01-15 r/7382 refactor(tvix/glue): have derivation_to_build_request consume inputsFlorian Klink1-58/+14
Determining the inputs might trigger additional builds/substitutions, so answering these lookups via a lambda in a lazy fashion gets complicated. You end up assembling the list of input nodes upfront, and the lambda will just be a dumb lookup into that preassembled list. Rather than doing that, simply have derivation_to_build_request leave the work of determining the inputs to the caller. Change-Id: I75880132916c76b930807c989090da298b6891bd Reviewed-on: https://cl.tvl.fyi/c/depot/+/10626 Reviewed-by: raitobezarius <tvl@lahfa.xyz> Autosubmit: flokli <flokli@flokli.de> Tested-by: BuildkiteCI
2024-01-15 r/7381 refactor(tvix/glue/known_paths): drop some unused stuffFlorian Klink1-51/+3
This are leftovers from the "reference scanning" approach (which we didn't end up using). We still want a concept of known paths, so we can trace IO into storepaths back to the build recipe that'll produce it, so let's keep the rest of this struct around. Change-Id: I73d38e21e5b97950b8fc2a42176cae5f80d371c8 Reviewed-on: https://cl.tvl.fyi/c/depot/+/10632 Autosubmit: flokli <flokli@flokli.de> Reviewed-by: raitobezarius <tvl@lahfa.xyz> Tested-by: BuildkiteCI
2024-01-15 r/7380 feat(tvix/castore): implement Ord for node::NodeFlorian Klink1-0/+14
This allows assembling BTreeSets of node::Node. Change-Id: I97b83be5ffc3e891307a8ef2b5fc31e38b747a62 Reviewed-on: https://cl.tvl.fyi/c/depot/+/10625 Tested-by: BuildkiteCI Reviewed-by: raitobezarius <tvl@lahfa.xyz> Autosubmit: flokli <flokli@flokli.de>
2024-01-14 r/7379 fix(tvix/eval): catchable-aware builtinsRyan Lahfa6-42/+329
A bunch of operations in Tvix are not aware of catchable values and does not propagate them. In the meantime, as we wait for a better solution, we just offer this commit for moving the needle. Change-Id: Ic3f0e1550126b0847b597dfc1402c35e0eeef469 Reviewed-on: https://cl.tvl.fyi/c/depot/+/10473 Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su>
2024-01-12 r/7378 feat(tazjin/emacs): format Firefox window names in EXWMVincent Ambo1-0/+4
Change-Id: I2f6e662fcfab43f6d7538bb78e666cc86e5ef1ac Reviewed-on: https://cl.tvl.fyi/c/depot/+/10613 Autosubmit: tazjin <tazjin@tvl.su> Reviewed-by: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI
2024-01-12 r/7377 feat(tvix/glue): input derivation context testsRyan Lahfa1-0/+32
`args` was not propagating context, here's a regression test for it. Change-Id: I8b6a3148508d40df0077128f0bafe68c098a03bd Reviewed-on: https://cl.tvl.fyi/c/depot/+/10610 Tested-by: BuildkiteCI Reviewed-by: flokli <flokli@flokli.de>
2024-01-12 r/7376 feat(tvix/glue/derivationStrict): support __structuredAttrsFlorian Klink6-197/+267
This adds support to handle the __structuredAttrs argument, which can be passed to builtins.derivationStrict. If __structuredAttrs is passed, and set to true, most of the arguments passed to builtins.derivationStrict are not simply coerced to a string and passed down to "environments", but instead kept in a more structured fashion. Inside ATerm, which is what's relevant as far as path calculation is concerned, a virtual `__json` environment variable is present, containing these structured values. Inside Builds, these structured values are not made available as an environment variable, but a JSON file (and source-able bash script). This will need to be respected once we start emitting BuildRequests, and for that we can probably just parse the `__json` key in Derivation.environment again - or keep this additionally in non-serialized form around during Evaluation. No matter what, this is left for a followup CL. The existing handle_derivation_parameters and populate_outputs helper function were removed, as __structuredAttrs causes quite a change in behaviour, and so handling both in the same place makes it more readable. There's some open questions w.r.t. string contexts for structured attrs itself. A TODO is left for this, but at least path calculation for individual structured attrs derivations are correct now. Part of b/366. Change-Id: Ic293822266ced6f8c4826d8ef0d2e098a4adccaa Reviewed-on: https://cl.tvl.fyi/c/depot/+/10604 Tested-by: BuildkiteCI Reviewed-by: raitobezarius <tvl@lahfa.xyz>
2024-01-12 r/7375 feat(tvix/eval): make into_json publicFlorian Klink1-1/+1
Allow other crates (like tvix-glue) to look at a Value in JSON, which is used by the structured attrs feature. Change-Id: Iba02ace6e11a74c3f9b19dcbef4b008b76dec046 Reviewed-on: https://cl.tvl.fyi/c/depot/+/10602 Reviewed-by: tazjin <tazjin@tvl.su> Reviewed-by: raitobezarius <tvl@lahfa.xyz> Tested-by: BuildkiteCI
2024-01-12 r/7374 docs(tvix/glue): misc reflowing of commentsRyan Lahfa1-7/+5
My OCD could not be stopped. Change-Id: I2bf504fe0865a5084ad02aee18e6180a8a3e19d7 Reviewed-on: https://cl.tvl.fyi/c/depot/+/10609 Reviewed-by: flokli <flokli@flokli.de> Tested-by: BuildkiteCI
2024-01-12 r/7373 fix(tvix/glue/tvix_build): fn_input_drvs_to_output_nodesFlorian Klink1-47/+36
The Derivation input_derivations field contains a list of input derivations and (a subset of their) output names. This means, multiple nodes can be returned, so return a Vec. Also, update the name to better reflect the nodes are the nodes of the selected outputs, not a node representing the .drv file itself. Additionally, use a proto::node::Node (the naked enum), rather than proto::Node, which wraps this in an optional struct field until realizing the BuildRequest. Change-Id: Iec5620b5d7ac0462f2c76acac4abcaeea2de0aad Reviewed-on: https://cl.tvl.fyi/c/depot/+/10608 Tested-by: BuildkiteCI Reviewed-by: raitobezarius <tvl@lahfa.xyz> Autosubmit: flokli <flokli@flokli.de>
2024-01-12 r/7372 refactor(tvix/glue/tvix_store_io): async store_path_to_nodeFlorian Klink1-17/+23
Provide a store_path_to_node_sync function which uses the runtime handle to block on the async function internally, but make store_path_to_node itself async, so it can call async functions internally. We'll use that later when triggering builds and waiting on their results. Change-Id: Idae9da7aa5b0878e0d3a2eba34ea2623e1ba84b2 Reviewed-on: https://cl.tvl.fyi/c/depot/+/10607 Tested-by: BuildkiteCI Autosubmit: flokli <flokli@flokli.de> Reviewed-by: raitobezarius <tvl@lahfa.xyz>
2024-01-12 r/7371 refactor(tvix/store/pathinfoservice): make more genericFlorian Klink6-54/+51
We don't need Arcs in most of the cases, we're fine with some container. Change-Id: Ic4f8acb5b9d93e2b0923bb607463fb91e9d0e4fe Reviewed-on: https://cl.tvl.fyi/c/depot/+/10606 Autosubmit: flokli <flokli@flokli.de> Tested-by: BuildkiteCI Reviewed-by: raitobezarius <tvl@lahfa.xyz>
2024-01-12 r/7370 refactor(tvix/store/nar/renderer): don't require Arc, Clone or SyncFlorian Klink1-28/+45
To render NARs, we're fine with a simple AsRef to a BlobService and DirectoryService. We just need to have the function pass back the references, so we can reuse it after the recursion. Change-Id: I8a1b899134ddda26cf14aa829a08383986101850 Reviewed-on: https://cl.tvl.fyi/c/depot/+/10605 Autosubmit: flokli <flokli@flokli.de> Reviewed-by: raitobezarius <tvl@lahfa.xyz> Tested-by: BuildkiteCI
2024-01-12