diff options
author | Aspen Smith <root@gws.fyi> | 2024-08-11T15·15-0400 |
---|---|---|
committer | clbot <clbot@tvl.fyi> | 2024-10-12T12·27+0000 |
commit | b7a6fc2812f3ed281ba1a0b985a2ae150095f7b1 (patch) | |
tree | 8a7703be32a79fc8a6faa03385469efa24fe8be4 /tvix/serde/src/de.rs | |
parent | 934e03c0deb88b3a0cff2e407e28f134c29657af (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/serde/src/de.rs')
-rw-r--r-- | tvix/serde/src/de.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tvix/serde/src/de.rs b/tvix/serde/src/de.rs index 88cb46d618ce..0728311c6a13 100644 --- a/tvix/serde/src/de.rs +++ b/tvix/serde/src/de.rs @@ -3,7 +3,7 @@ use bstr::ByteSlice; use serde::de::value::{MapDeserializer, SeqDeserializer}; use serde::de::{self, EnumAccess, VariantAccess}; -use tvix_eval::{EvalIO, EvaluationBuilder, Value}; +use tvix_eval::{EvalIO, EvalMode, EvaluationBuilder, Value}; use crate::error::Error; @@ -48,7 +48,7 @@ where ) -> EvaluationBuilder<'co, 'ro, 'env, Box<dyn EvalIO>>, { // First step is to evaluate the Nix code ... - let eval = config(EvaluationBuilder::new_pure().strict()).build(); + let eval = config(EvaluationBuilder::new_pure().mode(EvalMode::Strict)).build(); let result = eval.evaluate(src, None); if !result.errors.is_empty() { |