about summary refs log tree commit diff
path: root/tvix/eval/src/builtins/impure.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tvix/eval/src/builtins/impure.rs')
-rw-r--r--tvix/eval/src/builtins/impure.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/tvix/eval/src/builtins/impure.rs b/tvix/eval/src/builtins/impure.rs
index 7c98fcb4e192..d73e5ccfa8f2 100644
--- a/tvix/eval/src/builtins/impure.rs
+++ b/tvix/eval/src/builtins/impure.rs
@@ -51,7 +51,7 @@ pub fn builtins_import(
     Builtin::new(
         "import",
         &[true],
-        move |mut args: Vec<Value>, _: &mut VM| {
+        move |mut args: Vec<Value>, vm: &mut VM| {
             let path = match args.pop().unwrap() {
                 Value::Path(path) => path,
                 Value::String(_) => {
@@ -102,9 +102,9 @@ pub fn builtins_import(
                 });
             }
 
-            // TODO: deal with runtime *warnings* (most likely through an
-            // emit_warning function on the VM that might return it together with
-            // the result)
+            for warning in result.warnings {
+                vm.push_warning(warning);
+            }
 
             // Compilation succeeded, we can construct a thunk from whatever it spat
             // out and return that.