From 270b1084e890d2c69456d342e6e2cad7e13ad9a7 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Tue, 13 Dec 2022 00:12:13 +0300 Subject: feat(tvix/eval): use `EvalIO::import_path` when coercing paths This "ties the knot" of importing files into a store when referring to them through path literals, e.g. inside of strings. I'm not yet sure if this interface is sufficient for builtins.path (which we haven't implemented at all yet), but it's enough to wire up eval & store initially. In the default implementations nothing interesting happens in this function at all. Change-Id: Ie01ff4161617d1e743a68dbd1a5e54c1b40c0990 Reviewed-on: https://cl.tvl.fyi/c/depot/+/7582 Reviewed-by: grfn Tested-by: BuildkiteCI --- tvix/eval/tests/nix_oracle.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'tvix/eval/tests/nix_oracle.rs') diff --git a/tvix/eval/tests/nix_oracle.rs b/tvix/eval/tests/nix_oracle.rs index 4910a18bec..e241a26f8f 100644 --- a/tvix/eval/tests/nix_oracle.rs +++ b/tvix/eval/tests/nix_oracle.rs @@ -40,7 +40,10 @@ fn nix_eval(expr: &str) -> String { #[track_caller] fn compare_eval(expr: &str) { let nix_result = nix_eval(expr); - let tvix_result = tvix_eval::Evaluation::new(expr, None) + let mut eval = tvix_eval::Evaluation::new(expr, None); + eval.io_handle = Box::new(tvix_eval::StdIO); + + let tvix_result = eval .evaluate() .value .expect("tvix evaluation should succeed") -- cgit 1.4.1