about summary refs log tree commit diff
path: root/tvix/eval/src/value/list.rs
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2022-10-21T13·45+0300
committertazjin <tazjin@tvl.su>2022-10-22T17·01+0000
commit8724d2fff871827dc66503f9b3dfa1d29149ddc7 (patch)
tree3bbf689c22d45b31e7799793fdc71c95339880bf /tvix/eval/src/value/list.rs
parent6025242fc7bc8ef883547ef81959f271eb847083 (diff)
fix(tvix/eval): use top-level span for `force_with_output` r/5174
When forcing thunks in `force_with_output`, the call stack of the VM
is actually empty (as the calls are synthetic and no longer part of
the evaluation of the top-level expression).

This means that Tvix crashed when constructing error spans for the
`fallible` macro, as the assumption of there being an enclosing span
was violated.

To work around this, we instead pass the span for the whole top-level
expression to force_for_output and set this as the span for the
enclosing error chain. Existing output logic will already avoid
printing the entire expression as an error span.

This fixes b/213.

Change-Id: I93978e0deaf5bcb0f47a6fa95b3f5bebef5bad4c
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7052
Autosubmit: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
Reviewed-by: grfn <grfn@gws.fyi>
Diffstat (limited to 'tvix/eval/src/value/list.rs')
0 files changed, 0 insertions, 0 deletions