about summary refs log tree commit diff
path: root/tvix/glue/src/builtins/mod.rs
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2023-12-30T20·36+0100
committerclbot <clbot@tvl.fyi>2023-12-31T13·15+0000
commit4fba57c2c90f2e7b02da9187e59f8d64deef3fb2 (patch)
tree9e29cd30ab4a9c060bc15550ddca400f6af03da4 /tvix/glue/src/builtins/mod.rs
parenta5c5f1a29e8e9b39314a3ab024e170745ac96a3e (diff)
refactor(tvix/eval): remove code and location from struct r/7289
Instead, it's passed in the evaluate/compile_only functions, which feels
more naturally. It lets us set up the Evaluation struct long before
we actually feed it with data to evaluate.

Now that Evaluation::new() would be accepting an empty list of
arguments, we can simply implement Default, making things a bit more
idiomatic.

Change-Id: I4369658634909a0c504fdffa18242a130daa0239
Reviewed-on: https://cl.tvl.fyi/c/depot/+/10475
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
Autosubmit: flokli <flokli@flokli.de>
Diffstat (limited to 'tvix/glue/src/builtins/mod.rs')
-rw-r--r--tvix/glue/src/builtins/mod.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/tvix/glue/src/builtins/mod.rs b/tvix/glue/src/builtins/mod.rs
index 6b39fd362ee3..86924cefef7f 100644
--- a/tvix/glue/src/builtins/mod.rs
+++ b/tvix/glue/src/builtins/mod.rs
@@ -39,14 +39,14 @@ mod tests {
     /// Takes care of setting up the evaluator so it knows about the
     // `derivation` builtin.
     fn eval(str: &str) -> EvaluationResult {
-        let mut eval = tvix_eval::Evaluation::new_impure(str, None);
+        let mut eval = tvix_eval::Evaluation::new_impure();
 
         let known_paths: Rc<RefCell<KnownPaths>> = Default::default();
 
         add_derivation_builtins(&mut eval, known_paths.clone());
 
         // run the evaluation itself.
-        eval.evaluate()
+        eval.evaluate(str, None)
     }
 
     #[test]