about summary refs log tree commit diff
path: root/tvix/glue
diff options
context:
space:
mode:
authorbinarycat <binarycat@envs.net>2024-06-02T17·58+0200
committerclbot <clbot@tvl.fyi>2024-06-11T14·59+0000
commitbeb7f57c73473598c51b14221c5e4996c81d2dde (patch)
treee915fdeee0a6d483cb355f81495afc20b5dee6c8 /tvix/glue
parent154e0d71e0712d2e354c6f795f71b25bf0949a72 (diff)
fix(tvix/eval): handle builtins.split matching the empty string r/8247
This prevents the following statements from looping endlessly:

```
builtins.split "(.*)" ""
builtins.split "([abc]*)" "abc"
builtins.split "(.*)" "abc"
builtins.split ".*" ""
```

Cover these (and some more examples) in the test suite.

Co-Authored-By: Florian Klink <flokli@flokli.de>
Change-Id: Ibd339f971e0f4e3e5c229816e2be5a8e3836fec9
Reviewed-on: https://cl.tvl.fyi/c/depot/+/11743
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
Diffstat (limited to 'tvix/glue')
-rw-r--r--tvix/glue/src/tests/tvix_tests/eval-okay-context-introspection.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/tvix/glue/src/tests/tvix_tests/eval-okay-context-introspection.nix b/tvix/glue/src/tests/tvix_tests/eval-okay-context-introspection.nix
index ecd8ab0073d0..e5719e00c3ae 100644
--- a/tvix/glue/src/tests/tvix_tests/eval-okay-context-introspection.nix
+++ b/tvix/glue/src/tests/tvix_tests/eval-okay-context-introspection.nix
@@ -71,7 +71,7 @@ in
   (builtins.hasAttr "allOutputs" (builtins.getContext drv.drvPath)."${builtins.unsafeDiscardStringContext drv.drvPath}")
   (legit-context == desired-context) # FIXME(raitobezarius): this should not use `builtins.seq`, this is a consequence of excessive laziness of Tvix, I believe.
   (reconstructed-path == combo-path)
-  # Those are too slow?
+  # These still fail with an internal error
   # (etaRule' "foo")
   # (etaRule' combo-path)
   (etaRule "foo")