fix(tvix/eval): print unevaluated thunks like Nix does

Change-Id: Ie4c563e933f571f45cb4f4efe650d1b65f119e8d
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8324
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
Autosubmit: tazjin <tazjin@tvl.su>
This commit is contained in:
Vincent Ambo 2023-03-18 00:08:05 +03:00 committed by clbot
parent a2c7f7eea1
commit a5f28eea94

View file

@ -299,6 +299,7 @@ impl TotalDisplay for Thunk {
match &*self.0.borrow() {
ThunkRepr::Evaluated(v) => v.total_fmt(f, set),
ThunkRepr::Suspended { .. } | ThunkRepr::Native(_) => f.write_str("<CODE>"),
other => write!(f, "internal[{}]", other.debug_repr()),
}
}