about summary refs log tree commit diff
path: root/tvix/eval
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2023-02-02T12·47+0300
committerclbot <clbot@tvl.fyi>2023-02-02T14·30+0000
commit503e6810e739b288fbbc54d6f97d344311ff2c46 (patch)
treeaffe31b8637ac9769a207093a840efd2c86d4891 /tvix/eval
parent75d1b72b7c8619692999df339471aee7aab5a085 (diff)
fix(tvix/eval): unsafeDiscardStringContext is a no-op r/5823
... not just a TODO.

Most use-cases of unsafeDiscardStringContext are for cases where a
string is processed in some ways and no longer contains a "physical"
reference, but still has its context attached in C++ Nix.

We don't need to do this. This does diverge in behaviour in use-cases
related to build scheduling, but that whole behaviour will be
different in Tvix.

Change-Id: I4056d4c09f62d44d6bd52b791db03fe5556672b5
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8016
Reviewed-by: flokli <flokli@flokli.de>
Autosubmit: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/eval')
-rw-r--r--tvix/eval/src/builtins/mod.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/tvix/eval/src/builtins/mod.rs b/tvix/eval/src/builtins/mod.rs
index 4f3c93ec1451..42b217d55f77 100644
--- a/tvix/eval/src/builtins/mod.rs
+++ b/tvix/eval/src/builtins/mod.rs
@@ -1011,12 +1011,10 @@ mod placeholder_builtins {
 
     #[builtin("unsafeDiscardStringContext")]
     fn builtin_unsafe_discard_string_context(
-        vm: &mut VM,
+        _: &mut VM,
         #[lazy] s: Value,
     ) -> Result<Value, ErrorKind> {
-        vm.emit_warning(WarningKind::NotImplemented(
-            "builtins.unsafeDiscardStringContext",
-        ));
+        // Tvix does not manually track contexts, and this is a no-op for us.
         Ok(s)
     }