From 099ca6b7c0b95d1e7d5134ac465b50bbd86660c5 Mon Sep 17 00:00:00 2001 From: Ryan Lahfa Date: Tue, 26 Dec 2023 02:03:05 +0100 Subject: feat(tvix/glue): contextful derivation 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 Reviewed-by: tazjin Tested-by: BuildkiteCI --- tvix/glue/src/tvix_io.rs | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) (limited to 'tvix/glue/src/tvix_io.rs') diff --git a/tvix/glue/src/tvix_io.rs b/tvix/glue/src/tvix_io.rs index 52bbd7bc9cda..77dcb9291032 100644 --- a/tvix/glue/src/tvix_io.rs +++ b/tvix/glue/src/tvix_io.rs @@ -8,30 +8,19 @@ //! otherwise fundamental features like nixpkgs bootstrapping and hash //! calculation will not work. -use std::cell::RefCell; use std::io; use std::path::{Path, PathBuf}; -use std::rc::Rc; use tvix_eval::{EvalIO, FileType}; -use crate::known_paths::KnownPaths; - // TODO: Merge this together with TvixStoreIO? pub struct TvixIO { - /// Ingested paths must be reported to this known paths tracker - /// for accurate build reference scanning. - known_paths: Rc>, - // Actual underlying [EvalIO] implementation. actual: T, } impl TvixIO { - pub fn new(known_paths: Rc>, actual: T) -> Self { - Self { - known_paths, - actual, - } + pub fn new(actual: T) -> Self { + Self { actual } } } @@ -42,10 +31,6 @@ impl EvalIO for TvixIO { fn import_path(&self, path: &Path) -> io::Result { let imported_path = self.actual.import_path(path)?; - self.known_paths - .borrow_mut() - .plain(imported_path.to_string_lossy()); - Ok(imported_path) } -- cgit 1.4.1