about summary refs log tree commit diff
path: root/tvix/eval/tests/nix_oracle.rs
diff options
context:
space:
mode:
authorAspen Smith <root@gws.fyi>2024-08-11T15·15-0400
committerclbot <clbot@tvl.fyi>2024-10-12T12·27+0000
commitb7a6fc2812f3ed281ba1a0b985a2ae150095f7b1 (patch)
tree8a7703be32a79fc8a6faa03385469efa24fe8be4 /tvix/eval/tests/nix_oracle.rs
parent934e03c0deb88b3a0cff2e407e28f134c29657af (diff)
refactor(tvix/eval): Make `strict` an EvalMode enum r/8796
Refactor the `strict` boolean passed into evaluation at the top-level to
be a (two-variant, so far) EvalMode enum of Lazy and Strict.

This is more explicit than a boolean, and if we ever add more EvalModes
it's a simple extension of the enum.

Change-Id: I3de50e74ec971011664f6cd0999d08b792118410
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12186
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
Autosubmit: aspen <root@gws.fyi>
Diffstat (limited to 'tvix/eval/tests/nix_oracle.rs')
-rw-r--r--tvix/eval/tests/nix_oracle.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/tvix/eval/tests/nix_oracle.rs b/tvix/eval/tests/nix_oracle.rs
index cc2a7b519e8f..137dff6b00f6 100644
--- a/tvix/eval/tests/nix_oracle.rs
+++ b/tvix/eval/tests/nix_oracle.rs
@@ -58,12 +58,12 @@ fn nix_eval(expr: &str, strictness: Strictness) -> String {
 #[track_caller]
 #[cfg(feature = "impure")]
 fn compare_eval(expr: &str, strictness: Strictness) {
-    use tvix_eval::EvalIO;
+    use tvix_eval::{EvalIO, EvalMode};
 
     let nix_result = nix_eval(expr, strictness);
     let mut eval_builder = tvix_eval::Evaluation::builder_pure();
     if matches!(strictness, Strictness::Strict) {
-        eval_builder = eval_builder.strict();
+        eval_builder = eval_builder.mode(EvalMode::Strict);
     }
     let eval = eval_builder
         .io_handle(Box::new(tvix_eval::StdIO) as Box<dyn EvalIO>)