about summary refs log tree commit diff
path: root/third_party/cgit/ui-log.c
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2022-10-22T13·51+0300
committertazjin <tazjin@tvl.su>2022-10-23T15·50+0000
commit60f24c3c53eae116bb3051f02f05b74a8ecf37af (patch)
tree794d987b22303cfbbb1dd8d251e81ab15d67ad68 /third_party/cgit/ui-log.c
parent4ff06ba67dbe5397a97c2bae78e25d0ab8c026a3 (diff)
fix(tvix/eval): detect cycles when printing infinite values r/5178
Using the same method as in Thunk::deep_force, detect cycles when
printing values by maintaining a set of already seen thunks.

With this, display of infinite values matches that of Nix:

    > nix-instantiate --eval --strict -E 'let as = { x = 123; y = as; }; in as'
    { x = 123; y = { x = 123; y = <CYCLE>; }; }

    > tvix-eval -E 'let as = { x = 123; y = as; }; in as'
    => { x = 123; y = { x = 123; y = <CYCLE>; }; } :: set

Change-Id: I007b918d5131d82c28884e46e46ff365ef691aa8
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7056
Tested-by: BuildkiteCI
Reviewed-by: grfn <grfn@gws.fyi>
Diffstat (limited to 'third_party/cgit/ui-log.c')
0 files changed, 0 insertions, 0 deletions