refactor(tvix/glue): add BuildService to TvixStoreIO

TvixStoreIO triggers builds whenever IO into a not-yet-built store path
is requested, if it knows how to build that path.

Change-Id: If30e9db6be2f2a30cbc9d0576f357f3ecfa0d35a
Reviewed-on: https://cl.tvl.fyi/c/depot/+/10645
Reviewed-by: raitobezarius <tvl@lahfa.xyz>
Tested-by: BuildkiteCI
This commit is contained in:
Florian Klink 2024-01-16 13:14:07 +02:00 committed by flokli
parent 12ae96cff2
commit 501827db59
8 changed files with 25 additions and 6 deletions

View file

@ -1,7 +1,9 @@
use clap::Parser;
use rustyline::{error::ReadlineError, Editor};
use std::rc::Rc;
use std::sync::Arc;
use std::{fs, path::PathBuf};
use tvix_build::buildservice::DummyBuildService;
use tvix_eval::builtins::impure_builtins;
use tvix_eval::observer::{DisassemblingObserver, TracingObserver};
use tvix_eval::{EvalIO, Value};
@ -88,6 +90,7 @@ fn interpret(code: &str, path: Option<PathBuf>, args: &Args, explain: bool) -> b
blob_service.clone(),
directory_service.clone(),
path_info_service.into(),
Arc::<DummyBuildService>::default(),
tokio_runtime.handle().clone(),
));