highlights
Nov 21, 2022

Unison produces stack traces for errors

If you haven't upgraded or downloaded the newest version of Unison,M4d,it contains several quality of life improvements for users, including but not limited to a beloved feature for frustrated developers:stack traces.

How to invoke stack traces

A stack trace will be generated upon calls toException.raiseand whenbase.bughas been called. It contains the names of the functions that have been called en-route to generating the failure, with the last term being the entry point to the program.

Check it out in action

gif of calling functions which produce stack traces

A technical detail worth bearing in mind is that Unison supportstail-call elimination,so functions that are in tail call position are evaluated without growing the function call stack. These functions won't show up in the stack-trace.

We hope stack traces will help when you're stuck. Better yet, channel your inner Unison teammate, Cody, when he says: "I don't write bugs so I've never seen a stack trace." 😂