From 503e6810e739b288fbbc54d6f97d344311ff2c46 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Thu, 2 Feb 2023 15:47:51 +0300 Subject: [PATCH] fix(tvix/eval): unsafeDiscardStringContext is a no-op ... 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 Autosubmit: tazjin Tested-by: BuildkiteCI --- tvix/eval/src/builtins/mod.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tvix/eval/src/builtins/mod.rs b/tvix/eval/src/builtins/mod.rs index 4f3c93ec1..42b217d55 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 { - vm.emit_warning(WarningKind::NotImplemented( - "builtins.unsafeDiscardStringContext", - )); + // Tvix does not manually track contexts, and this is a no-op for us. Ok(s) }