about summary refs log tree commit diff
path: root/tvix/eval/src/value/list.rs
diff options
context:
space:
mode:
authorAspen Smith <root@gws.fyi>2024-02-08T21·40-0500
committerclbot <clbot@tvl.fyi>2024-02-08T21·58+0000
commitddb7bc8d18bd11deb87a70ec300a281aaf34c2c7 (patch)
tree89709b6f27f07d1e44d595dccf19c67c761fe9c7 /tvix/eval/src/value/list.rs
parent17036718df7f68c40779e15aced2cffbd92d20fa (diff)
fix(tvix): Catch errors for generator in some builtins r/7487
Nix doesn't propagate errors for the function argument to some builtins,
like genList and map:

    ❯ nix repl
    Welcome to Nix version 2.3.17. Type :? for help.

    nix-repl> (builtins.tryEval (builtins.genList (builtins.throw "a") 10)).success
    true

    nix-repl> (builtins.tryEval (builtins.map (builtins.throw "a") [ "" ])).success
    true

Note that this is untested as of this particular commit, only because a
big test suite covering all sorts of catchable error propagation issues
is coming next

Change-Id: I48c8eb390a541204b1a6d438c753fa1ca9b3877e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/10753
Autosubmit: aspen <root@gws.fyi>
Tested-by: BuildkiteCI
Reviewed-by: raitobezarius <tvl@lahfa.xyz>
Diffstat (limited to 'tvix/eval/src/value/list.rs')
0 files changed, 0 insertions, 0 deletions