about summary refs log tree commit diff
path: root/tvix/glue/src/known_paths.rs
AgeCommit message (Collapse)AuthorFilesLines
2024-02-17 r/7541 test(tvix/glue/known_paths): add testsFlorian Klink1-0/+97
Change-Id: I02dc891c49ed650c66c403107767b11b6d5e2734 Reviewed-on: https://cl.tvl.fyi/c/depot/+/10949 Reviewed-by: flokli <flokli@flokli.de> Tested-by: BuildkiteCI Reviewed-by: Peter Kolloch <info@eigenvalue.net> Autosubmit: flokli <flokli@flokli.de>
2024-02-17 r/7540 refactor(tvix/glue/known_paths): use StorePathFlorian Klink1-8/+4
Passing a StorePathRef is annoying if we only (already) have a StorePath. Change-Id: Ic3b36c0041707230515a6745a57f0d25b2bafd16 Reviewed-on: https://cl.tvl.fyi/c/depot/+/10948 Autosubmit: flokli <flokli@flokli.de> Tested-by: BuildkiteCI Reviewed-by: flokli <flokli@flokli.de> Reviewed-by: Peter Kolloch <info@eigenvalue.net>
2024-02-17 r/7539 feat(tvix/glue/known_paths): add get_drv_by_output_pathFlorian Klink1-0/+27
This allows getting a Derivation struct producing the passed output path. Change-Id: I89858d91bffc2ef7f1d86314c16fa4f850f21426 Reviewed-on: https://cl.tvl.fyi/c/depot/+/10791 Autosubmit: flokli <flokli@flokli.de> Tested-by: BuildkiteCI Reviewed-by: flokli <flokli@flokli.de> Reviewed-by: Peter Kolloch <info@eigenvalue.net>
2024-02-17 r/7534 refactor(tvix/glue/KnownPaths): track Derivation struct tooFlorian Klink1-15/+52
We need to not only store a map from drv path to hash derivation modulo, but also keep the original Derivation struct - because we'll use that later to trigger builds. Change-Id: I78e2e8431ab5ae853188866b797a79025200de98 Reviewed-on: https://cl.tvl.fyi/c/depot/+/10790 Tested-by: BuildkiteCI Reviewed-by: raitobezarius <tvl@lahfa.xyz>
2024-01-16 r/7389 refactor(nix-compat): use StorePathRef for hash derivation moduloFlorian Klink1-6/+6
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/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-03 r/7338 feat(tvix/glue): contextful derivationRyan Lahfa1-123/+8
We calculate the input context by performing the union of context over all input of the derivation. Then, we just pass the rest of it to the remaining machinery. Finally, we re-emit an `outPath` and a `drvPath` containing the expected contexts. Change-Id: I74905fb258b5bee8b08d1208c9eb87f51b92a890 Reviewed-on: https://cl.tvl.fyi/c/depot/+/10436 Autosubmit: raitobezarius <tvl@lahfa.xyz> Reviewed-by: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI
2023-12-12 r/7160 chore(tvix/glue): allow unused_variablesFlorian Klink1-0/+1
cl/9364 did introduce a warning here, which is visible when building in release mode - or invoking `cargo bench` in tvix-glue. Change-Id: Ia82082a58543f0fdd32866fdfcd37d0a5fdfda9c Reviewed-on: https://cl.tvl.fyi/c/depot/+/10261 Autosubmit: flokli <flokli@flokli.de> Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su>
2023-12-10 r/7142 fix(tvix/cli): panic on root cause of the fetchurl(non-boot) bugAdam Joseph1-1/+27
Currently we produce wrong drvPaths for a large number of packages that use fetchurl (but not fetchurlBoot, which is what stdenv uses). A simple reproducer is `pkgs.perl538`. I debugged this down to the root cause, which is the fact that tvix doesn't realize that the mapping from FOD-paths to outputHash is *NOT* a 1:1 mapping. It is a many-to-one mapping. You can have lots of different FODs with the same outputHash or even the same outPath. For example, perl538.src and perldevel.src use the same source tarball but a different `version`. Anyways, I have found the root cause but have run out of time for a while, so I've added a panic!() to in the spot where we have a logic bug in order to call it out. Change-Id: I9766b39cfe2fe7eafec84945b2ad6cc28f9c4b7d Reviewed-on: https://cl.tvl.fyi/c/depot/+/9364 Reviewed-by: flokli <flokli@flokli.de> Tested-by: BuildkiteCI Autosubmit: Adam Joseph <adam@westernsemico.com>
2023-11-04 r/6936 refactor(tvix): move tvix glue code into glue crateFlorian Klink1-0/+186
There's various bits and pieces in tvix-cli that use both the store and evaluator, as well as nix-compat. For example, builtins.derivation, as well as the reference scanning implementation. This "glue code" currently isn't accessible from anywhere else, but it'd be very useful if it were. Move it out into a `glue` crate, and make `tvix-cli` a consumer of it. All the KnownPaths setup and passing around, as well as NIX_PATH handling is also something that should probably be moved into the glue crate as well, but that's something left for a future CL. Change-Id: I080ed3d1825ab23790666486840f301f00856277 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9908 Autosubmit: flokli <flokli@flokli.de> Tested-by: BuildkiteCI Reviewed-by: raitobezarius <tvl@lahfa.xyz>