-
Notifications
You must be signed in to change notification settings - Fork 272
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use pretty text in MsgTrace case of debug toText #5210
Conversation
Example output difference:
|
@dolio What are we even seeing in that example? |
The exact same value rendered two different ways. :) The first is |
So they both represent a triple? But there was a bug encountered in the last element that was causing the original message to print? But now the error that gets printed is better? |
There's no way to decompile a promise to a unison term, so the tracer gives back both the output of Haskell's If you're actually debugging the runtime you might want to see the first thing, but most people don't. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh wow that's a small diff :)
Like @aryairani the bug
confused me. It might be nice to make the output a little clearer. This doesn't seem like a slam dunk in its current form. The old output was super noisy, but at least I could tell that there was a Promise
in there. Is Foreign
necessarily this opaque?
Anyway this shouldn't affect most people, so I think that we can give it a try.
This changes the behavior of the
DBTX
instruction to use the provided 'pretty' text in cases where decompilation isn't complete. I think when this was first written it wouldn't provide much output, but since we have made it so that decompilation always produces something relatively useful, even if there are parts of the value that cannot be decompiled into any term.This should improve e.g. cases that @ceedubs was seeing where looking at debug text for a value with a promise in it would produce massively more verbose
show
output rather than somewhat more comprehensible 'pretty' output.