about summary refs log tree commit diff
path: root/tvix/serde/src/de.rs
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2023-03-17T21·10+0300
committerclbot <clbot@tvl.fyi>2023-03-22T13·44+0000
commitba138712e4c4a067e438a62ad20d54091f5f4446 (patch)
tree79ece7a20ac6872b344c5841eb1d93f8d20daad9 /tvix/serde/src/de.rs
parenta5f28eea94d74f98e37487ed04a024b83b8a94ff (diff)
feat(tvix/eval): add Evaluation::strict to toggle top-level deepseq r/6037
This makes it possible for callers to control whether they can receive
partially evaluated values from an evaluation or not.

We're actually flipping the default behaviour to non-strict top-level
evaluation, which means that callers have to set `strict = true` on
the Evaluation to get the previous behaviour.

Change-Id: Ic048e9ba09c88866d4c3177d5fa07db11c4eb20e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8325
Autosubmit: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
Diffstat (limited to 'tvix/serde/src/de.rs')
-rw-r--r--tvix/serde/src/de.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/tvix/serde/src/de.rs b/tvix/serde/src/de.rs
index 0285c386ca..43efc71c6f 100644
--- a/tvix/serde/src/de.rs
+++ b/tvix/serde/src/de.rs
@@ -33,7 +33,8 @@ where
     T: serde::Deserialize<'code>,
 {
     // First step is to evaluate the Nix code ...
-    let eval = tvix_eval::Evaluation::new(src, None);
+    let mut eval = tvix_eval::Evaluation::new(src, None);
+    eval.strict = true;
     let source = eval.source_map();
     let result = eval.evaluate();