diff options
author | Vincent Ambo <mail@tazj.in> | 2023-03-06T14·23+0300 |
---|---|---|
committer | tazjin <tazjin@tvl.su> | 2023-03-13T20·30+0000 |
commit | 5d9bfd7735373cde72ebac4be4a05f1c846c13ba (patch) | |
tree | 1420e8d149454eca61c7cba7970fdb7e524854a9 /tvix/eval/src/builtins | |
parent | 43b0416bd8b5c4c7c99b146f8cee7b1a979a7782 (diff) |
fix(tvix/eval): emit warnings from builtins.import again r/5983
Wires up generator logic to emit warnings that already have spans attached again. Change-Id: I9f878cec3b9d4f6f7819e7c71bab7ae70bd3f08b Reviewed-on: https://cl.tvl.fyi/c/depot/+/8224 Tested-by: BuildkiteCI Reviewed-by: raitobezarius <tvl@lahfa.xyz>
Diffstat (limited to 'tvix/eval/src/builtins')
-rw-r--r-- | tvix/eval/src/builtins/mod.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tvix/eval/src/builtins/mod.rs b/tvix/eval/src/builtins/mod.rs index e24285f5c23a..ba31d66b11d9 100644 --- a/tvix/eval/src/builtins/mod.rs +++ b/tvix/eval/src/builtins/mod.rs @@ -923,7 +923,8 @@ mod pure_builtins { #[builtin("placeholder")] async fn builtin_placeholder(co: GenCo, #[lazy] _x: Value) -> Result<Value, ErrorKind> { - generators::emit_warning(&co, WarningKind::NotImplemented("builtins.placeholder")).await; + generators::emit_warning_kind(&co, WarningKind::NotImplemented("builtins.placeholder")) + .await; Ok("<builtins.placeholder-is-not-implemented-in-tvix-yet>".into()) } @@ -1017,7 +1018,7 @@ mod placeholder_builtins { #[lazy] _context: Value, #[lazy] val: Value, ) -> Result<Value, ErrorKind> { - generators::emit_warning(&co, WarningKind::NotImplemented("builtins.addErrorContext")) + generators::emit_warning_kind(&co, WarningKind::NotImplemented("builtins.addErrorContext")) .await; Ok(val) } @@ -1028,7 +1029,7 @@ mod placeholder_builtins { _name: Value, _attrset: Value, ) -> Result<Value, ErrorKind> { - generators::emit_warning( + generators::emit_warning_kind( &co, WarningKind::NotImplemented("builtins.unsafeGetAttrsPos"), ) |