From 8d4aa2c15c88d6e2912882ebf480d89c172d4e1f Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Mon, 11 Dec 2023 23:34:47 -0800 Subject: fix(tvix/eval): add unimplemented __curPos and builtins.filterSource This commit adds __curPos (to the global scope, yuck) and builtins.filterSource. These are not implemented; forcing them will produce the same result as `throw "message"`. Unfortunately these two post-2.3 features are used throughout nixpkgs. Since an unresolved indentifier is a catchable error, this breaks the entire release eval. With this commit, it simply causes those broken packages that use these features to appear as they are: broken. Change-Id: Ib43dea571f6a9fab4d54869349f80ee4ec5424c2 Reviewed-on: https://cl.tvl.fyi/c/depot/+/10297 Reviewed-by: tazjin Tested-by: BuildkiteCI Autosubmit: Adam Joseph --- tvix/eval/src/compiler/mod.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'tvix/eval/src/compiler/mod.rs') diff --git a/tvix/eval/src/compiler/mod.rs b/tvix/eval/src/compiler/mod.rs index f6d6ca7c06bc..f54dc8ba42ae 100644 --- a/tvix/eval/src/compiler/mod.rs +++ b/tvix/eval/src/compiler/mod.rs @@ -147,6 +147,7 @@ const GLOBAL_BUILTINS: &[&str] = &[ "scopedImport", "throw", "toString", + "__curPos", ]; pub struct Compiler<'observer> { -- cgit 1.4.1