about summary refs log tree commit diff
path: root/tvix/eval/src/value/mod.rs
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2022-12-12T14·38+0300
committertazjin <tazjin@tvl.su>2022-12-21T22·37+0000
commitc3c4d752c91f64eff8e7f7f7b21fbcc1209d27a6 (patch)
tree290dba7b8cf36dfbca53a499891dcddaf3cbe735 /tvix/eval/src/value/mod.rs
parent25fc6b7c25d75075461e7976b27b81ba6a8140fe (diff)
feat(tvix/eval): add EvalIO to public crate API r/5459
This lets users set the `io_handle` field on an `Evaluation`, which is
then propagated to the VM.

Change-Id: I616d7140724fb2b4db47c2ebf95451d5303a487a
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7566
Reviewed-by: grfn <grfn@gws.fyi>
Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/eval/src/value/mod.rs')
-rw-r--r--tvix/eval/src/value/mod.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/tvix/eval/src/value/mod.rs b/tvix/eval/src/value/mod.rs
index af75bc9a7346..583d0c38e46e 100644
--- a/tvix/eval/src/value/mod.rs
+++ b/tvix/eval/src/value/mod.rs
@@ -565,7 +565,7 @@ mod tests {
         #[proptest(ProptestConfig { cases: 5, ..Default::default() })]
         fn reflexive(x: Value) {
             let mut observer = NoOpObserver {};
-            let mut vm = VM::new(Default::default(), &mut observer);
+            let mut vm = VM::new(Default::default(), Box::new(crate::DummyIO), &mut observer);
 
             assert!(x.nix_eq(&x, &mut vm).unwrap())
         }
@@ -573,7 +573,7 @@ mod tests {
         #[proptest(ProptestConfig { cases: 5, ..Default::default() })]
         fn symmetric(x: Value, y: Value) {
             let mut observer = NoOpObserver {};
-            let mut vm = VM::new(Default::default(), &mut observer);
+            let mut vm = VM::new(Default::default(), Box::new(crate::DummyIO), &mut observer);
 
             assert_eq!(
                 x.nix_eq(&y, &mut vm).unwrap(),
@@ -584,7 +584,7 @@ mod tests {
         #[proptest(ProptestConfig { cases: 5, ..Default::default() })]
         fn transitive(x: Value, y: Value, z: Value) {
             let mut observer = NoOpObserver {};
-            let mut vm = VM::new(Default::default(), &mut observer);
+            let mut vm = VM::new(Default::default(), Box::new(crate::DummyIO), &mut observer);
 
             if x.nix_eq(&y, &mut vm).unwrap() && y.nix_eq(&z, &mut vm).unwrap() {
                 assert!(x.nix_eq(&z, &mut vm).unwrap())
@@ -594,7 +594,7 @@ mod tests {
         #[test]
         fn list_int_float_fungibility() {
             let mut observer = NoOpObserver {};
-            let mut vm = VM::new(Default::default(), &mut observer);
+            let mut vm = VM::new(Default::default(), Box::new(crate::DummyIO), &mut observer);
 
             let v1 = Value::List(NixList::from(vec![Value::Integer(1)]));
             let v2 = Value::List(NixList::from(vec![Value::Float(1.0)]));